mirror of
https://github.com/openmv/openmv.git
synced 2025-11-04 14:49:50 +08:00
Merge pull request #1645 from openmv/usbdbg_wait
usbdbg: Check USB IRQs when blocking on commands.
This commit is contained in:
commit
d8c83eb825
@ -58,7 +58,7 @@ void usbdbg_init()
|
|||||||
|
|
||||||
void usbdbg_wait_for_command(uint32_t timeout)
|
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()
|
bool usbdbg_script_ready()
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user