summaryrefslogtreecommitdiffstatshomepage
path: root/stmhal/uart.c
diff options
context:
space:
mode:
authorDamien George <damien.p.george@gmail.com>2017-02-06 15:10:03 +1100
committerDamien George <damien.p.george@gmail.com>2017-02-06 15:10:03 +1100
commit8400351d5aa9e4378713f042a8170efafbd112ce (patch)
tree19b76b996a42160895df1b76c38f9920cd44b438 /stmhal/uart.c
parentdee47949cc8782c2d565de6d6b7e5c1339000061 (diff)
downloadmicropython-8400351d5aa9e4378713f042a8170efafbd112ce.tar.gz
micropython-8400351d5aa9e4378713f042a8170efafbd112ce.zip
stmhal: Use MICROPY_EVENT_POLL_HOOK instead of __WFI where appropriate.
Diffstat (limited to 'stmhal/uart.c')
-rw-r--r--stmhal/uart.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/stmhal/uart.c b/stmhal/uart.c
index 81e6f69a58..d53ca5b80c 100644
--- a/stmhal/uart.c
+++ b/stmhal/uart.c
@@ -334,7 +334,7 @@ STATIC bool uart_rx_wait(pyb_uart_obj_t *self, uint32_t timeout) {
if (HAL_GetTick() - start >= timeout) {
return false; // timeout
}
- __WFI();
+ MICROPY_EVENT_POLL_HOOK
}
}
@@ -375,7 +375,7 @@ STATIC bool uart_tx_wait(pyb_uart_obj_t *self, uint32_t timeout) {
if (HAL_GetTick() - start >= timeout) {
return false; // timeout
}
- __WFI();
+ MICROPY_EVENT_POLL_HOOK
}
}