Interface definition for the Maxim DS3231 RTC. More...
Interface definition for the Maxim DS3231 RTC.
Definition in file ds3231.h.
Include dependency graph for ds3231.h:Go to the source code of this file.
Data Structures | |
| struct | ds3231_t |
| Device descriptor for DS3231 devices. More... | |
| struct | ds3231_params_t |
| Set of configuration parameters for DS3231 devices. More... | |
Macros | |
| #define | DS3231_I2C_ADDR 0x68 |
| Default address of DS3231 sensors. | |
Enumerations | |
| enum | { DS3231_OPT_BAT_ENABLE = 0x01, DS2321_OPT_32KHZ_ENABLE = 0x02 } |
| Configuration options. | |
Functions | |
| int | ds3231_init (ds3231_t *dev, const ds3231_params_t *params) |
| Initialize the given DS3231 device. More... | |
| int | ds3231_get_time (const ds3231_t *dev, struct tm *time) |
| Get date and time from the device. More... | |
| int | ds3231_set_time (const ds3231_t *dev, const struct tm *time) |
| Set date and time of the device. More... | |
| int | ds3231_get_aging_offset (const ds3231_t *dev, int8_t *offset) |
| Get the configured aging offset (see datasheet for more information) More... | |
| int | ds3231_set_aging_offset (const ds3231_t *dev, int8_t offset) |
| Set the aging offset (see datasheet for more information) More... | |
| int | ds3231_get_temp (const ds3231_t *dev, int16_t *temp) |
| Get temperature from the device. More... | |
| int | ds3231_enable_bat (const ds3231_t *dev) |
| Enable the backup battery. More... | |
| int | ds3231_disable_bat (const ds3231_t *dev) |
| Disable the backup battery. More... | |