pub struct Rtc<'d> { /* private fields */ }Expand description
RTC driver.
Implementations§
Source§impl<'d> Rtc<'d>
impl<'d> Rtc<'d>
Sourcepub fn new(peri: Peri<'d, RTC>) -> Self
pub fn new(peri: Peri<'d, RTC>) -> Self
Create a new RTC driver.
The counter keeps running and keeps its value.
§Panics
Panics if the RTC clock is disabled in config.rcc.ls.
Sourcepub fn set_counter(&mut self, value: u32)
pub fn set_counter(&mut self, value: u32)
Set the counter.
This restarts the current second: the counter next increments one second after this call.
Auto Trait Implementations§
impl<'d> !UnwindSafe for Rtc<'d>
impl<'d> Forget for Rtc<'d>
impl<'d> Freeze for Rtc<'d>
impl<'d> Move for Rtc<'d>
impl<'d> RefUnwindSafe for Rtc<'d>
impl<'d> Send for Rtc<'d>
impl<'d> Sync for Rtc<'d>
impl<'d> Unpin for Rtc<'d>
impl<'d> UnsafeUnpin for Rtc<'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