aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLi Weiwei2017-10-10 14:22:22 +0800
committerDamien George2017-10-16 13:32:26 +1100
commit5c437963d742627ba172d48d601c118c4577e7b7 (patch)
treea0ac39d7e4249e6db8655725dfdab469b982e278
parent0a30ad96c886aacf897b3e87cbdb24fb46c5c43d (diff)
stm32/mpconfigport.h: Add MICROPY_THREAD_YIELD() macro.
-rw-r--r--ports/stm32/mpconfigport.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/ports/stm32/mpconfigport.h b/ports/stm32/mpconfigport.h
index 06606e62a..2d59a1df8 100644
--- a/ports/stm32/mpconfigport.h
+++ b/ports/stm32/mpconfigport.h
@@ -326,6 +326,8 @@ static inline mp_uint_t disable_irq(void) {
__WFI(); \
} \
} while (0);
+
+#define MICROPY_THREAD_YIELD() pyb_thread_yield()
#else
#define MICROPY_EVENT_POLL_HOOK \
do { \
@@ -333,6 +335,8 @@ static inline mp_uint_t disable_irq(void) {
mp_handle_pending(); \
__WFI(); \
} while (0);
+
+#define MICROPY_THREAD_YIELD()
#endif
// We need an implementation of the log2 function which is not a macro