embassy-stm32

Crates

git

Versions

stm32c092cb

Flavors

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.

Implementors§