[][src]Struct stm32l0xx_hal::rtc::RTC

pub struct RTC { /* fields omitted */ }

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

impl Send for RTC

impl !Sync for RTC

impl Unpin for RTC

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.