parent
0733bee926
commit
e012e13858
@ -209,6 +209,7 @@ impl RtcDriver {
|
||||
|
||||
let r = rtc();
|
||||
|
||||
loop {
|
||||
let t = self.now();
|
||||
if timestamp <= t {
|
||||
// If alarm timestamp has passed the alarm will not fire.
|
||||
@ -249,7 +250,12 @@ impl RtcDriver {
|
||||
r.intenclr().write(|w| w.0 = compare_n(n));
|
||||
}
|
||||
|
||||
true
|
||||
// If we have not passed the safe timestamp, we can be sure the alarm will be invoked. Otherwise,
|
||||
// we need to retry setting the alarm.
|
||||
if self.now() <= safe_timestamp {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user