RTC: Trigger expired alarms

This commit is contained in:
Dániel Buga 2024-11-30 10:50:57 +01:00
parent 1a1d5c4689
commit fdb8ee2e8a
No known key found for this signature in database

View File

@ -414,7 +414,10 @@ impl RtcDriver {
let alarm_handle = unsafe { AlarmHandle::new(i as u8) };
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);
}
}
}