[−][src]Struct stm32l0xx_hal::rtc::RTC
Entry point to the RTC API
Methods
impl RTC
[src]
pub fn new(rtc: RTC, rcc: &mut Rcc, _: &PWR, init: Instant) -> Self
[src]
Initializes the RTC API
The initial_instant
argument will only be used, if the real-time clock
is not already configured. Its subsecond
field will be ignore in any
case.
Panics
Panics, if the ABP1 clock frequency is lower than the RTC clock frequency. The RTC is currently hardcoded to use the LSE as clock source which runs at 32768 Hz.
pub fn set(&mut self, instant: Instant)
[src]
Sets the date/time
pub fn now(&mut self) -> Instant
[src]
Returns the current date/time
pub fn enable_interrupts(&mut self, interrupts: Interrupts)
[src]
Enable interrupts
The interrupts set to true
in interrupts
will be enabled. Those set
to false will not be modified.
pub fn disable_interrupts(&mut self, interrupts: Interrupts)
[src]
Disable interrupts
The interrupts set to true
in interrupts
will be disabled. Those set
to false will not be modified.
pub fn wakeup_timer(&mut self) -> WakeupTimer
[src]
Access the wakeup timer
Auto Trait Implementations
Blanket Implementations
impl<T> From<T> for T
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = !
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Same<T> for T
type Output = T
Should always be Self