aboutsummaryrefslogtreecommitdiff
path: root/embassy-stm32/src/rtc/v2.rs
diff options
context:
space:
mode:
Diffstat (limited to 'embassy-stm32/src/rtc/v2.rs')
-rw-r--r--embassy-stm32/src/rtc/v2.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/embassy-stm32/src/rtc/v2.rs b/embassy-stm32/src/rtc/v2.rs
index 5d9025bbe..b7d25635b 100644
--- a/embassy-stm32/src/rtc/v2.rs
+++ b/embassy-stm32/src/rtc/v2.rs
@@ -77,7 +77,7 @@ impl super::Rtc {
77 // When the offset is positive (0 to 512), the opposite of 77 // When the offset is positive (0 to 512), the opposite of
78 // the offset (512 - offset) is masked, i.e. for the 78 // the offset (512 - offset) is masked, i.e. for the
79 // maximum offset (512), 0 pulses are masked. 79 // maximum offset (512), 0 pulses are masked.
80 w.set_calp(stm32_metapac::rtc::vals::Calp::INCREASEFREQ); 80 w.set_calp(stm32_metapac::rtc::vals::Calp::INCREASE_FREQ);
81 w.set_calm(512 - clock_drift as u16); 81 w.set_calm(512 - clock_drift as u16);
82 } else { 82 } else {
83 // Minimum (about -510.7) rounds to -511. 83 // Minimum (about -510.7) rounds to -511.
@@ -86,7 +86,7 @@ impl super::Rtc {
86 // When the offset is negative or zero (-511 to 0), 86 // When the offset is negative or zero (-511 to 0),
87 // the absolute offset is masked, i.e. for the minimum 87 // the absolute offset is masked, i.e. for the minimum
88 // offset (-511), 511 pulses are masked. 88 // offset (-511), 511 pulses are masked.
89 w.set_calp(stm32_metapac::rtc::vals::Calp::NOCHANGE); 89 w.set_calp(stm32_metapac::rtc::vals::Calp::NO_CHANGE);
90 w.set_calm((clock_drift * -1.0) as u16); 90 w.set_calm((clock_drift * -1.0) as u16);
91 } 91 }
92 }); 92 });