Commit 12ef8a5b authored by Damien George's avatar Damien George

rp2/mphalport: Optimise exit of mp_hal_delay_ms loop.

best_effort_wfe_or_timeout() already calls time_reached() and returns the
result of it, so no need to call it again.
Signed-off-by: default avatarDamien George <damien@micropython.org>
parent fc94399f
......@@ -192,10 +192,9 @@ void mp_hal_stdout_tx_strn(const char *str, mp_uint_t len) {
void mp_hal_delay_ms(mp_uint_t ms) {
absolute_time_t t = make_timeout_time_ms(ms);
while (!time_reached(t)) {
do {
MICROPY_EVENT_POLL_HOOK_FAST;
best_effort_wfe_or_timeout(t);
}
} while (!best_effort_wfe_or_timeout(t));
}
void mp_hal_time_ns_set_from_rtc(void) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment