Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
TASTE
uPython-mirror
Commits
8400351d
Commit
8400351d
authored
Feb 06, 2017
by
Damien George
Browse files
stmhal: Use MICROPY_EVENT_POLL_HOOK instead of __WFI where appropriate.
parent
dee47949
Changes
2
Hide whitespace changes
Inline
Side-by-side
stmhal/mphalport.c
View file @
8400351d
...
...
@@ -43,7 +43,7 @@ int mp_hal_stdin_rx_chr(void) {
}
else
if
(
MP_STATE_PORT
(
pyb_stdio_uart
)
!=
NULL
&&
uart_rx_any
(
MP_STATE_PORT
(
pyb_stdio_uart
)))
{
return
uart_rx_char
(
MP_STATE_PORT
(
pyb_stdio_uart
));
}
__WFI
();
MICROPY_EVENT_POLL_HOOK
}
}
...
...
stmhal/uart.c
View file @
8400351d
...
...
@@ -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
}
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment