pub struct RtcDriver<'d> { /* private fields */ }Expand description
Real-Time Clock driver.
Implementations§
Source§impl<'d> RtcDriver<'d>
impl<'d> RtcDriver<'d>
Sourcepub fn configure(&mut self, mode: RtcMode, load_value: u32)
pub fn configure(&mut self, mode: RtcMode, load_value: u32)
Configure the RTC.
§Arguments
mode- Operating mode (free-running or periodic).load_value- In periodic mode, the counter resets when reaching this value.
Sourcepub fn current_value(&self) -> u32
pub fn current_value(&self) -> u32
Read the current counter value (lower 32 bits of the 48-bit counter).
Sourcepub fn enable_interrupt(&mut self)
pub fn enable_interrupt(&mut self)
Enable RTC interrupt (unmask).
Sourcepub fn disable_interrupt(&mut self)
pub fn disable_interrupt(&mut self)
Disable RTC interrupt (mask).
Sourcepub fn interrupt_pending(&self) -> bool
pub fn interrupt_pending(&self) -> bool
Check if an RTC interrupt is pending.
Sourcepub fn clear_interrupt(&self)
pub fn clear_interrupt(&self)
Clear the RTC interrupt.
Auto Trait Implementations§
impl<'d> Freeze for RtcDriver<'d>
impl<'d> RefUnwindSafe for RtcDriver<'d>
impl<'d> Send for RtcDriver<'d>
impl<'d> Sync for RtcDriver<'d>
impl<'d> Unpin for RtcDriver<'d>
impl<'d> UnsafeUnpin for RtcDriver<'d>
impl<'d> UnwindSafe for RtcDriver<'d>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more