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:
@@ -245,19 +245,6 @@ extern const struct _mp_obj_type_t mod_network_nic_type_wiznet5k;
|
||||
#define MICROPY_HW_BOOTSEL_DELAY_US 8
|
||||
#endif
|
||||
|
||||
// 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)
|
||||
|
||||
#define MICROPY_MAKE_POINTER_CALLABLE(p) ((void *)((mp_uint_t)(p) | 1))
|
||||
|
||||
#define MP_SSIZE_MAX (0x7fffffff)
|
||||
|
||||
@@ -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