Go to the documentation of this file.
46 #define DS3231_I2C_ADDR 0x68
52 DS3231_OPT_BAT_ENABLE = 0x01,
53 DS2321_OPT_32KHZ_ENABLE = 0x02,
Device descriptor for DS3231 devices.
int ds3231_set_time(const ds3231_t *dev, const struct tm *time)
Set date and time of the device.
int ds3231_enable_bat(const ds3231_t *dev)
Enable the backup battery.
int ds3231_set_aging_offset(const ds3231_t *dev, int8_t offset)
Set the aging offset (see datasheet for more information)
i2c_t bus
I2C bus the device is connected to.
unsigned int i2c_t
Default i2c_t type definition.
int ds3231_disable_bat(const ds3231_t *dev)
Disable the backup battery.
uint8_t opt
additional options
Set of configuration parameters for DS3231 devices.
i2c_t bus
I2C bus the device is connected to.
int ds3231_get_aging_offset(const ds3231_t *dev, int8_t *offset)
Get the configured aging offset (see datasheet for more information)
int ds3231_init(ds3231_t *dev, const ds3231_params_t *params)
Initialize the given DS3231 device.
int ds3231_get_temp(const ds3231_t *dev, int16_t *temp)
Get temperature from the device.
Low-level I2C peripheral driver interface definition.
int ds3231_get_time(const ds3231_t *dev, struct tm *time)
Get date and time from the device.