Go to the documentation of this file.
37 #define DS1307_I2C_ADDRESS (0x68)
48 #ifndef DS1307_I2C_MAX_CLK
49 #define DS1307_I2C_MAX_CLK (I2C_SPEED_FAST)
56 #define DS1307_NVRAM_MAX_SIZE (56U)
int ds1307_get_sqw_mode(const ds1307_t *dev)
Get current mode of square wave / output driver.
i2c_t i2c
I2C bus the device is connected to.
unsigned int i2c_t
Default i2c_t type definition.
Generic non-volatile RAM driver interface.
int ds1307_set_time(const ds1307_t *dev, const struct tm *time)
Set RTC to a given time.
ds1307_sqw_mode_t
Modes for the DS1307 square wave / output driver.
@ DS1307_SQW_MODE_4096HZ
SQW: 4.096 kHz.
nvram_t nvram
on-chip NVRAM (see nvram.h)
int ds1307_halt(const ds1307_t *dev)
Halt clock.
@ DS1307_SQW_MODE_1000HZ
SQW: 1kHz.
int ds1307_init(ds1307_t *dev, const ds1307_params_t *params)
Initialize the given DS1307 device.
Device descriptor for DS1307 devices.
Device descriptor for generic NVRAM devices.
@ DS1307_SQW_MODE_32768HZ
SQW: 32.768 kHz.
@ DS1307_SQW_MODE_0
OUT: 0.
@ DS1307_SQW_MODE_8192HZ
SQW: 8.192 kHz.
i2c_t i2c
I2C bus the device is connected to.
Low-level GPIO peripheral driver interface definitions.
Set of configuration parameters for DS1307 devices.
@ DS1307_SQW_MODE_1
OUT: 1.
int ds1307_get_time(const ds1307_t *dev, struct tm *time)
Get current RTC time.
Low-level I2C peripheral driver interface definition.
int ds1307_set_sqw_mode(const ds1307_t *dev, ds1307_sqw_mode_t mode)
Set mode of square wave / output driver.