We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f11e49e commit c25e554Copy full SHA for c25e554
hal/src/rtc/mod.rs
@@ -350,11 +350,7 @@ impl Rtc {
350
/// Returns `None` if the calendar is uninitialized.
351
#[inline]
352
pub fn calendar_initialized(&self) -> Option<()> {
353
- use pac::rtc::icsr::INITS_A;
354
- match self.rtc.icsr.read().inits().variant() {
355
- INITS_A::NotInitalized => None,
356
- INITS_A::Initalized => Some(()),
357
- }
+ self.rtc.icsr.read().inits().is_initalized().then(|| ())
358
}
359
360
/// Calibrate the RTC using the low-power mode.
0 commit comments