Trait sd2405al::prelude::Rtcc [−][src]
Real-Time Clock / Calendar
Associated Types
Loading content...Required methods
pub fn get_seconds(&mut self) -> Result<u8, Self::Error>
[src]
Read the seconds.
pub fn get_minutes(&mut self) -> Result<u8, Self::Error>
[src]
Read the minutes.
pub fn get_hours(&mut self) -> Result<Hours, Self::Error>
[src]
Read the hours.
pub fn get_time(&mut self) -> Result<NaiveTime, Self::Error>
[src]
Read the time.
pub fn get_weekday(&mut self) -> Result<u8, Self::Error>
[src]
Read the day of the week [1-7].
pub fn get_day(&mut self) -> Result<u8, Self::Error>
[src]
Read the day of the month [1-31].
pub fn get_month(&mut self) -> Result<u8, Self::Error>
[src]
Read the month [1-12].
pub fn get_year(&mut self) -> Result<u16, Self::Error>
[src]
Read the year (e.g. 2000).
pub fn get_date(&mut self) -> Result<NaiveDate, Self::Error>
[src]
Read the date.
pub fn get_datetime(&mut self) -> Result<NaiveDateTime, Self::Error>
[src]
Read the date and time.
pub fn set_seconds(&mut self, seconds: u8) -> Result<(), Self::Error>
[src]
Set the seconds [0-59].
pub fn set_minutes(&mut self, minutes: u8) -> Result<(), Self::Error>
[src]
Set the minutes [0-59].
pub fn set_hours(&mut self, hours: Hours) -> Result<(), Self::Error>
[src]
Set the hours.
Changes the operating mode to 12h/24h depending on the parameter.
pub fn set_time(&mut self, time: &NaiveTime) -> Result<(), Self::Error>
[src]
Set the time.
pub fn set_weekday(&mut self, weekday: u8) -> Result<(), Self::Error>
[src]
Set the day of week [1-7].
pub fn set_day(&mut self, day: u8) -> Result<(), Self::Error>
[src]
Set the day of month [1-31].
pub fn set_month(&mut self, month: u8) -> Result<(), Self::Error>
[src]
Set the month [1-12].
pub fn set_year(&mut self, year: u16) -> Result<(), Self::Error>
[src]
Set the year. (e.g. 2000)
pub fn set_date(&mut self, date: &NaiveDate) -> Result<(), Self::Error>
[src]
Set the date.
pub fn set_datetime(
&mut self,
datetime: &NaiveDateTime
) -> Result<(), Self::Error>
[src]
&mut self,
datetime: &NaiveDateTime
) -> Result<(), Self::Error>
Set the date and time.
This will set the hour operating mode to 24h and the weekday to the day number starting from Sunday = 1.
Implementors
impl<I2C, E> Rtcc for Sd2405al<I2C> where
I2C: Write<Error = E> + WriteRead<Error = E>,
[src]
I2C: Write<Error = E> + WriteRead<Error = E>,