kernel::hil::date_time

Trait DateTime

Source
pub trait DateTime<'a> {
    // Required methods
    fn get_date_time(&self) -> Result<(), ErrorCode>;
    fn set_date_time(&self, date_time: DateTimeValues) -> Result<(), ErrorCode>;
    fn set_client(&self, client: &'a dyn DateTimeClient);
}
Expand description

Interface for reading and setting the current time

Required Methods§

Source

fn get_date_time(&self) -> Result<(), ErrorCode>

Request driver to return date and time

When successful, this function will be followed by the callback callback_get_date which provides the actual date and time or an error.

Source

fn set_date_time(&self, date_time: DateTimeValues) -> Result<(), ErrorCode>

Sets the current date and time

When successful this function call must be followed by a call to callback_set_date.

Source

fn set_client(&self, client: &'a dyn DateTimeClient)

Sets a client that calls the callback function when date and time is requested

Implementors§