mirror of https://github.com/ARMmbed/mbed-os.git
If set_interrupt() is used to setup an interrupt for a time in the past, then the callback is invoked right-away.
parent
ac8f3e5522
commit
42f801cc27
|
@ -192,7 +192,7 @@ void us_ticker_set_interrupt(timestamp_t timestamp)
|
|||
}
|
||||
|
||||
uint32_t newCallbackTime = MICROSECONDS_TO_RTC_UNITS(timestamp);
|
||||
if (newCallbackTime == rtc1_getCounter()) {
|
||||
if ((int)(newCallbackTime - rtc1_getCounter()) <= 0) {
|
||||
INVOKE_CALLBACK();
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue