RTC: Trigger expired alarms
This commit is contained in:
parent
1a1d5c4689
commit
fdb8ee2e8a
@ -414,7 +414,10 @@ impl RtcDriver {
|
|||||||
let alarm_handle = unsafe { AlarmHandle::new(i as u8) };
|
let alarm_handle = unsafe { AlarmHandle::new(i as u8) };
|
||||||
let alarm = self.get_alarm(cs, alarm_handle);
|
let alarm = self.get_alarm(cs, alarm_handle);
|
||||||
|
|
||||||
self.set_alarm(alarm_handle, alarm.timestamp.get());
|
if !self.set_alarm(alarm_handle, alarm.timestamp.get()) {
|
||||||
|
// If the alarm timestamp has passed, we need to trigger it
|
||||||
|
self.trigger_alarm(i, cs);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user