mirror of
https://github.com/micropython/micropython.git
synced 2026-01-06 04:00:28 +01:00
ports: Move MICROPY_INTERNAL_WFE definition to mphalport.h.
It belongs here because the default value is defined in py/mphal.h. Signed-off-by: Damien George <damien@micropython.org>
This commit is contained in:
@@ -48,6 +48,19 @@
|
||||
#define MICROPY_PY_LWIP_REENTER lwip_lock_acquire();
|
||||
#define MICROPY_PY_LWIP_EXIT lwip_lock_release();
|
||||
|
||||
// Port level Wait-for-Event macro
|
||||
//
|
||||
// Do not use this macro directly, include py/runtime.h and
|
||||
// call mp_event_wait_indefinite() or mp_event_wait_ms(timeout)
|
||||
#define MICROPY_INTERNAL_WFE(TIMEOUT_MS) \
|
||||
do { \
|
||||
if ((TIMEOUT_MS) < 0) { \
|
||||
__wfe(); \
|
||||
} else { \
|
||||
best_effort_wfe_or_timeout(make_timeout_time_ms(TIMEOUT_MS)); \
|
||||
} \
|
||||
} while (0)
|
||||
|
||||
extern int mp_interrupt_char;
|
||||
extern ringbuf_t stdin_ringbuf;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user