usbdbg: Check USB IRQs when blocking on commands.

* If USB IRQs are disabled the command will never finish.
This commit is contained in:
iabdalkader 2022-05-25 11:39:41 +02:00
parent f22c6745c8
commit b5147fe6c1

View File

@ -58,7 +58,7 @@ void usbdbg_init()
void usbdbg_wait_for_command(uint32_t timeout)
{
for (mp_uint_t ticks = mp_hal_ticks_ms(); ((mp_hal_ticks_ms() - ticks) < timeout) && (cmd != USBDBG_NONE); );
for (mp_uint_t ticks = mp_hal_ticks_ms(); irq_enabled && ((mp_hal_ticks_ms() - ticks) < timeout) && (cmd != USBDBG_NONE); );
}
bool usbdbg_script_ready()