[ion] fix sleep functions in emscripten build

This commit is contained in:
Damien Nicolet
2018-11-09 01:27:47 +01:00
parent f93bf97182
commit 9b818bd963
16 changed files with 38 additions and 28 deletions

View File

@@ -35,14 +35,14 @@
void delay_ms(mp_uint_t delay) {
uint32_t start = millis();
while (millis() - start < delay && !micropython_port_should_interrupt(true)) {
msleep(1);
mssleep(1);
}
}
void delay_us(mp_uint_t delay) {
uint32_t start = micros();
while (micros() - start < delay && !micropython_port_should_interrupt(false)) {
usleep(1);
ussleep(1);
}
}