Skip to content

Commit c25e554

Browse files
authored
rtc: minor cleanup
1 parent f11e49e commit c25e554

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

hal/src/rtc/mod.rs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -350,11 +350,7 @@ impl Rtc {
350350
/// Returns `None` if the calendar is uninitialized.
351351
#[inline]
352352
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-
}
353+
self.rtc.icsr.read().inits().is_initalized().then(|| ())
358354
}
359355

360356
/// Calibrate the RTC using the low-power mode.

0 commit comments

Comments
 (0)