embassy-stm32

Crates

git

Versions

stm32l071rb

Flavors

Skip to main content

AnyRtc

Trait AnyRtc 

Source
pub trait AnyRtc {
    // Required methods
    fn set_datetime(&mut self, t: DateTime) -> Result<(), RtcError>;
    fn get_daylight_savings(&self) -> bool;
    fn set_daylight_savings(&mut self, daylight_savings: bool);
    fn read_backup_register(&self, register: usize) -> Option<u32>;
    fn write_backup_register(&self, register: usize, value: u32);
}
Expand description

Trait applicable to an Rtc or an RtcContainer

Required Methods§

Source

fn set_datetime(&mut self, t: DateTime) -> Result<(), RtcError>

Set the datetime to a new value.

Source

fn get_daylight_savings(&self) -> bool

Check if daylight savings time is active.

Source

fn set_daylight_savings(&mut self, daylight_savings: bool)

Enable/disable daylight savings time.

Source

fn read_backup_register(&self, register: usize) -> Option<u32>

Read content of the backup register.

Source

fn write_backup_register(&self, register: usize, value: u32)

Set content of the backup register.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl AnyRtc for Rtc

Source§

impl AnyRtc for RtcContainer

Available on crate feature low-power and non-crate feature _lp-time-driver only.