Fixed timebase error in Adruino lib
Now using millis() instead of micros() for correct delay inervals
This commit is contained in:
parent
c42e4a4270
commit
0645e007fa
@ -287,15 +287,15 @@ void hal_timebase_busy_wait(uint32_t delay)
|
|||||||
/* Ensure minimum delay or skip if delay is zero*/
|
/* Ensure minimum delay or skip if delay is zero*/
|
||||||
if (delay) {
|
if (delay) {
|
||||||
delay_internal = delay + 1;
|
delay_internal = delay + 1;
|
||||||
start = micros();
|
start = millis();
|
||||||
while ((micros() - start) < delay_internal) {
|
while ((millis() - start) < delay_internal) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
hal_tick_t hal_timebase_get_tick(void)
|
hal_tick_t hal_timebase_get_tick(void)
|
||||||
{
|
{
|
||||||
return micros();
|
return millis();
|
||||||
}
|
}
|
||||||
|
|
||||||
static void check_buttons()
|
static void check_buttons()
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user