mirror of
https://github.com/licsber/micropython.git
synced 2024-09-20 00:50:24 +08:00
rp2/cyw43_configport: Implement cyw43_delay_ms as mp_hal_delay_ms.
They do the same thing. Signed-off-by: Damien George <damien@micropython.org>
This commit is contained in:
parent
12ef8a5ba2
commit
e182f3862e
@ -116,12 +116,7 @@ static inline void cyw43_delay_us(uint32_t us) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
static inline void cyw43_delay_ms(uint32_t ms) {
|
static inline void cyw43_delay_ms(uint32_t ms) {
|
||||||
uint32_t us = ms * 1000;
|
mp_hal_delay_ms(ms);
|
||||||
int32_t start = mp_hal_ticks_us();
|
|
||||||
while (mp_hal_ticks_us() - start < us) {
|
|
||||||
cyw43_yield();
|
|
||||||
MICROPY_EVENT_POLL_HOOK_FAST;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#define CYW43_EVENT_POLL_HOOK MICROPY_EVENT_POLL_HOOK_FAST
|
#define CYW43_EVENT_POLL_HOOK MICROPY_EVENT_POLL_HOOK_FAST
|
||||||
|
Loading…
Reference in New Issue
Block a user