38#ifndef DRIVER_DS3231_ALARM_H
39#define DRIVER_DS3231_ALARM_H
56#define DS3231_ALARM_DEFAULT_AGING_OFFSET 0
driver ds3231 interface header file
ds3231_alarm2_mode_t
ds3231 alarm2 enumeration definition
ds3231_alarm1_mode_t
ds3231 alarm1 enumeration definition
struct ds3231_time_s ds3231_time_t
ds3231 time structure definition
ds3231_alarm_t
ds3231 alarm enumeration definition
uint8_t ds3231_alarm_get_time(ds3231_time_t *t)
alarm example get the time
uint8_t ds3231_alarm_set_alarm2(ds3231_time_t *t, ds3231_alarm2_mode_t mode)
alarm example set the alarm 2
uint8_t ds3231_alarm_set_alarm1(ds3231_time_t *t, ds3231_alarm1_mode_t mode)
alarm example set the alarm 1
uint8_t ds3231_alarm_enable(ds3231_alarm_t alarm)
enable the alarm
uint8_t ds3231_alarm_set_timestamp(time_t timestamp)
alarm example set the time by a unix timestamp
uint8_t ds3231_alarm_get_temperature(int16_t *raw, float *s)
alarm example get the current temperature
uint8_t ds3231_alarm_init(void(*alarm_receive_callback)(uint8_t type))
alarm example init
uint8_t ds3231_alarm_disable(ds3231_alarm_t alarm)
disable the alarm
uint8_t ds3231_alarm_clear_flag(ds3231_alarm_t alarm)
alarm clear the interrupt flag
uint8_t ds3231_alarm_set_time(ds3231_time_t *t)
alarm example set the time
uint8_t ds3231_alarm_set_timestamp_time_zone(int8_t zone)
alarm example set the local time zone
uint8_t ds3231_alarm_get_alarm1(ds3231_time_t *t, ds3231_alarm1_mode_t *mode)
alarm example get the alarm 1
uint8_t ds3231_alarm_irq_handler(void)
alarm irq handler
uint8_t ds3231_alarm_get_timestamp(time_t *timestamp)
alarm example get the time in a unix timestamp
uint8_t ds3231_alarm_get_timestamp_time_zone(int8_t *zone)
alarm example get the local time zone
uint8_t ds3231_alarm_get_alarm2(ds3231_time_t *t, ds3231_alarm2_mode_t *mode)
alarm example get the alarm 2
uint8_t ds3231_alarm_alarm_ascii_time(char *buf, uint8_t len)
alarm example get the ascii time
uint8_t ds3231_alarm_deinit(void)
alarm example deinit