nrf/mpconfigport: Call tud_task() in MICROPY_EVENT_POLL_HOOK.

So that the interrupt character can interrupt a long-running loop, like a
sleep.
pull/8849/head
robert-hh 2022-07-09 08:54:29 +02:00 zatwierdzone przez Damien George
rodzic c985a0b514
commit be6f0f3b3b
1 zmienionych plików z 7 dodań i 0 usunięć

Wyświetl plik

@ -346,8 +346,15 @@ typedef long mp_off_t;
/* micro:bit root pointers */ \
void *async_data[2]; \
#if MICROPY_HW_USB_CDC
#define MICROPY_HW_USBDEV_TASK_HOOK extern void tud_task(void); tud_task();
#else
#define MICROPY_HW_USBDEV_TASK_HOOK ;
#endif
#define MICROPY_EVENT_POLL_HOOK \
do { \
MICROPY_HW_USBDEV_TASK_HOOK \
extern void mp_handle_pending(bool); \
mp_handle_pending(true); \
__WFI(); \