Struct ds1307::DS1307[][src]

pub struct DS1307<I2C> { /* fields omitted */ }

DS1307 driver

Methods

impl<I2C, E> DS1307<I2C> where
    I2C: Write<Error = E> + WriteRead<Error = E>, 
[src]

Read the seconds.

Read the minutes.

Read the hours.

Read the day of the week [1-7].

Read the day of the month [1-31].

Read the month [1-12].

Read the year [2000-2099].

Read the date and time.

Set the seconds [0-59].

Will return an Error::InvalidInputData if the seconds are out of range.

Set the minutes [0-59].

Will return an Error::InvalidInputData if the minutes are out of range.

Set the hours.

Changes the operating mode to 12h/24h depending on the parameter.

Will return an Error::InvalidInputData if the hours are out of range.

Set the day of week [1-7].

Will return an Error::InvalidInputData if the day is out of range.

Set the day of month [1-31].

Will return an Error::InvalidInputData if the day is out of range.

Set the month [1-12].

Will return an Error::InvalidInputData if the month is out of range.

Set the year [2000-2099].

Will return an Error::InvalidInputData if the year is out of range.

Set the date and time.

Will return an Error::InvalidInputData if any of the parameters is out of range.

impl<I2C, E> DS1307<I2C> where
    I2C: Write<Error = E> + WriteRead<Error = E>, 
[src]

Read a data array from the user RAM starting at the given offset.

There is a total of 56 bytes of user RAM available so the valid ranges for the parameters are: address_offset: [0-55] and data array length: [0-56].

Will return an Error::InvalidInputData if attempting to access a position not available or if attempting to read too much data.

Write a data array to the user RAM starting at the given offset.

There is a total of 56 bytes of user RAM available so the valid ranges for the parameters are: address_offset: [0-55] and data array length: [0-56].

Will return an Error::InvalidInputData if attempting to access a position not available or if attempting to write too much data.

impl<I2C, E> DS1307<I2C> where
    I2C: Write<Error = E> + WriteRead<Error = E>, 
[src]

Read if the clock is running.

Set the clock to run (default on power-on). (Does not alter the device register if already running).

Halt the clock. (Does not alter the device register if already halted).

impl<I2C, E> DS1307<I2C> where
    I2C: Write<Error = E> + WriteRead<Error = E>, 
[src]

Read whether the square-wave output is enabled.

Enable the square-wave output. (Does not alter the device register if already enabled).

Disable the square-wave output. (Does not alter the device register if already disabled).

Read status of square-wave output level control bit.

Set square-wave output level high. (Does not alter the device register if level is already high).

Set square-wave output level low. (Does not alter the device register if level is already low).

Set square-wave output level. (Does not alter the device register if same level is already configured).

Read square-wave output rate control bits.

Set square-wave output rate control bits. (Does not alter the device register if the same rate is already configured).

impl<I2C, E> DS1307<I2C> where
    I2C: Write<Error = E> + WriteRead<Error = E>, 
[src]

Create a new instance.

Destroy driver instance, return I²C bus instance.

Trait Implementations

impl<I2C: Debug> Debug for DS1307<I2C>
[src]

Formats the value using the given formatter. Read more

impl<I2C: Default> Default for DS1307<I2C>
[src]

Returns the "default value" for a type. Read more

Auto Trait Implementations

impl<I2C> Send for DS1307<I2C> where
    I2C: Send

impl<I2C> Sync for DS1307<I2C> where
    I2C: Sync