stm32/mpconfigport.h: Add MICROPY_THREAD_YIELD() macro.
This commit is contained in:
parent
0a30ad96c8
commit
5c437963d7
|
@ -326,6 +326,8 @@ static inline mp_uint_t disable_irq(void) {
|
||||||
__WFI(); \
|
__WFI(); \
|
||||||
} \
|
} \
|
||||||
} while (0);
|
} while (0);
|
||||||
|
|
||||||
|
#define MICROPY_THREAD_YIELD() pyb_thread_yield()
|
||||||
#else
|
#else
|
||||||
#define MICROPY_EVENT_POLL_HOOK \
|
#define MICROPY_EVENT_POLL_HOOK \
|
||||||
do { \
|
do { \
|
||||||
|
@ -333,6 +335,8 @@ static inline mp_uint_t disable_irq(void) {
|
||||||
mp_handle_pending(); \
|
mp_handle_pending(); \
|
||||||
__WFI(); \
|
__WFI(); \
|
||||||
} while (0);
|
} while (0);
|
||||||
|
|
||||||
|
#define MICROPY_THREAD_YIELD()
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// We need an implementation of the log2 function which is not a macro
|
// We need an implementation of the log2 function which is not a macro
|
||||||
|
|
Loading…
Reference in New Issue