![]() |
LibDriver DS3231
|
ds3231 example driver modules More...
Macros | |
| #define | DS3231_ALARM_DEFAULT_AGING_OFFSET 0 |
| ds3231 alarm example default definition | |
| #define | DS3231_BASIC_DEFAULT_AGING_OFFSET 0 |
| ds3231 basic example default definition | |
| #define | DS3231_OUTPUT_DEFAULT_AGING_OFFSET 0 |
| ds3231 output example default definition | |
Functions | |
| uint8_t | ds3231_alarm_irq_handler (void) |
| alarm irq handler | |
| uint8_t | ds3231_alarm_init (void(*alarm_receive_callback)(uint8_t type)) |
| alarm example init | |
| uint8_t | ds3231_alarm_deinit (void) |
| alarm example deinit | |
| 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_get_alarm1 (ds3231_time_t *t, ds3231_alarm1_mode_t *mode) |
| alarm example get the alarm 1 | |
| 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_get_alarm2 (ds3231_time_t *t, ds3231_alarm2_mode_t *mode) |
| alarm example get the alarm 2 | |
| uint8_t | ds3231_alarm_clear_flag (ds3231_alarm_t alarm) |
| alarm clear the interrupt flag | |
| uint8_t | ds3231_alarm_enable (ds3231_alarm_t alarm) |
| enable the alarm | |
| uint8_t | ds3231_alarm_disable (ds3231_alarm_t alarm) |
| disable the alarm | |
| uint8_t | ds3231_alarm_set_time (ds3231_time_t *t) |
| alarm example set the time | |
| uint8_t | ds3231_alarm_get_time (ds3231_time_t *t) |
| alarm example get the time | |
| uint8_t | ds3231_alarm_set_timestamp (time_t timestamp) |
| alarm example set the time by a unix timestamp | |
| uint8_t | ds3231_alarm_get_timestamp (time_t *timestamp) |
| alarm example get the time in a unix timestamp | |
| uint8_t | ds3231_alarm_set_timestamp_time_zone (int8_t zone) |
| alarm example set the local time zone | |
| uint8_t | ds3231_alarm_get_timestamp_time_zone (int8_t *zone) |
| alarm example get the local time zone | |
| uint8_t | ds3231_alarm_get_temperature (int16_t *raw, float *s) |
| alarm example get the current temperature | |
| uint8_t | ds3231_alarm_alarm_ascii_time (char *buf, uint8_t len) |
| alarm example get the ascii time | |
| uint8_t | ds3231_basic_init (void) |
| basic example init | |
| uint8_t | ds3231_basic_deinit (void) |
| basic example deinit | |
| uint8_t | ds3231_basic_set_time (ds3231_time_t *t) |
| basic example set the time | |
| uint8_t | ds3231_basic_get_time (ds3231_time_t *t) |
| basic example get the time | |
| uint8_t | ds3231_basic_set_timestamp (time_t timestamp) |
| basic example set the time by a unix timestamp | |
| uint8_t | ds3231_basic_get_timestamp (time_t *timestamp) |
| basic example get the time in a unix timestamp | |
| uint8_t | ds3231_basic_set_timestamp_time_zone (int8_t zone) |
| basic example set the local time zone | |
| uint8_t | ds3231_basic_get_timestamp_time_zone (int8_t *zone) |
| basic example get the local time zone | |
| uint8_t | ds3231_basic_get_temperature (int16_t *raw, float *s) |
| basic example get the current temperature | |
| uint8_t | ds3231_basic_get_ascii_time (char *buf, uint8_t len) |
| basic example get the ascii time | |
| uint8_t | ds3231_output_init (void) |
| output example init | |
| uint8_t | ds3231_output_deinit (void) |
| output example deinit | |
| uint8_t | ds3231_output_set_time (ds3231_time_t *t) |
| output example set the time | |
| uint8_t | ds3231_output_get_time (ds3231_time_t *t) |
| output example get the time | |
| uint8_t | ds3231_output_set_timestamp (time_t timestamp) |
| output example set the time by a unix timestamp | |
| uint8_t | ds3231_output_set_timestamp_time_zone (int8_t zone) |
| output example set the local time zone | |
| uint8_t | ds3231_output_get_timestamp (time_t *timestamp) |
| output example get the time in a unix timestamp | |
| uint8_t | ds3231_output_get_timestamp_time_zone (int8_t *zone) |
| output example get the local time zone | |
| uint8_t | ds3231_output_get_temperature (int16_t *raw, float *s) |
| output example get the current temperature | |
| uint8_t | ds3231_output_get_ascii_time (char *buf, uint8_t len) |
| output example get the ascii time | |
| uint8_t | ds3231_output_set_square_wave (ds3231_bool_t enable) |
| output example enable or disable the square wave | |
| uint8_t | ds3231_output_get_square_wave (ds3231_bool_t *enable) |
| output example get the square wave status | |
| uint8_t | ds3231_output_set_32khz_output (ds3231_bool_t enable) |
| output example enable or disable the 32KHz output | |
| uint8_t | ds3231_output_get_32khz_output (ds3231_bool_t *enable) |
| output example get the 32KHz output status | |
ds3231 example driver modules
| #define DS3231_ALARM_DEFAULT_AGING_OFFSET 0 |
ds3231 alarm example default definition
0 offset
Definition at line 56 of file driver_ds3231_alarm.h.
| #define DS3231_BASIC_DEFAULT_AGING_OFFSET 0 |
ds3231 basic example default definition
0 offset
Definition at line 58 of file driver_ds3231_basic.h.
| #define DS3231_OUTPUT_DEFAULT_AGING_OFFSET 0 |
ds3231 output example default definition
0 offset
Definition at line 56 of file driver_ds3231_output.h.
| uint8_t ds3231_alarm_alarm_ascii_time | ( | char * | buf, |
| uint8_t | len ) |
alarm example get the ascii time
| [out] | *buf | pointer to an ascii buffer |
| [in] | len | data length |
Definition at line 518 of file driver_ds3231_alarm.c.
| uint8_t ds3231_alarm_clear_flag | ( | ds3231_alarm_t | alarm | ) |
alarm clear the interrupt flag
| [in] | alarm | alarm number |
Definition at line 273 of file driver_ds3231_alarm.c.
| uint8_t ds3231_alarm_deinit | ( | void | ) |
alarm example deinit
Definition at line 165 of file driver_ds3231_alarm.c.
| uint8_t ds3231_alarm_disable | ( | ds3231_alarm_t | alarm | ) |
disable the alarm
| [in] | alarm | alarm number |
Definition at line 321 of file driver_ds3231_alarm.c.
| uint8_t ds3231_alarm_enable | ( | ds3231_alarm_t | alarm | ) |
enable the alarm
| [in] | alarm | alarm number |
Definition at line 294 of file driver_ds3231_alarm.c.
| uint8_t ds3231_alarm_get_alarm1 | ( | ds3231_time_t * | t, |
| ds3231_alarm1_mode_t * | mode ) |
alarm example get the alarm 1
| [out] | *t | pointer to a time structure |
| [out] | *mode | pointer to a alarm 1 interrupt mode buffer |
Definition at line 208 of file driver_ds3231_alarm.c.
| uint8_t ds3231_alarm_get_alarm2 | ( | ds3231_time_t * | t, |
| ds3231_alarm2_mode_t * | mode ) |
alarm example get the alarm 2
| [out] | *t | pointer to a time structure |
| [out] | *mode | pointer to a alarm 2 interrupt mode buffer |
Definition at line 252 of file driver_ds3231_alarm.c.
| uint8_t ds3231_alarm_get_temperature | ( | int16_t * | raw, |
| float * | s ) |
alarm example get the current temperature
| [out] | *raw | pointer to a raw temperature buffer |
| [out] | *s | pointer to a converted temperature buffer |
Definition at line 496 of file driver_ds3231_alarm.c.
| uint8_t ds3231_alarm_get_time | ( | ds3231_time_t * | t | ) |
alarm example get the time
| [out] | *t | pointer to a time structure |
Definition at line 421 of file driver_ds3231_alarm.c.
| uint8_t ds3231_alarm_get_timestamp | ( | time_t * | timestamp | ) |
alarm example get the time in a unix timestamp
| [out] | *timestamp | pointer to a unix timestamp buffer |
Definition at line 442 of file driver_ds3231_alarm.c.
| uint8_t ds3231_alarm_get_timestamp_time_zone | ( | int8_t * | zone | ) |
alarm example get the local time zone
| [out] | *zone | pointer to a local time zone buffer |
Definition at line 480 of file driver_ds3231_alarm.c.
| uint8_t ds3231_alarm_init | ( | void(* | alarm_receive_callback )(uint8_t type) | ) |
alarm example init
| [in] | *alarm_receive_callback | pointer to a alarm receive callback function callback |
Definition at line 71 of file driver_ds3231_alarm.c.
| uint8_t ds3231_alarm_irq_handler | ( | void | ) |
alarm irq handler
Definition at line 50 of file driver_ds3231_alarm.c.
| uint8_t ds3231_alarm_set_alarm1 | ( | ds3231_time_t * | t, |
| ds3231_alarm1_mode_t | mode ) |
alarm example set the alarm 1
| [in] | *t | pointer to a time structure |
| [in] | mode | alarm 1 interrupt mode |
Definition at line 186 of file driver_ds3231_alarm.c.
| uint8_t ds3231_alarm_set_alarm2 | ( | ds3231_time_t * | t, |
| ds3231_alarm2_mode_t | mode ) |
alarm example set the alarm 2
| [in] | *t | pointer to a time structure |
| [in] | mode | alarm 2 interrupt mode |
Definition at line 230 of file driver_ds3231_alarm.c.
| uint8_t ds3231_alarm_set_time | ( | ds3231_time_t * | t | ) |
alarm example set the time
| [in] | *t | pointer to a time structure |
Definition at line 342 of file driver_ds3231_alarm.c.
| uint8_t ds3231_alarm_set_timestamp | ( | time_t | timestamp | ) |
alarm example set the time by a unix timestamp
| [in] | timestamp | unix timestamp |
Definition at line 363 of file driver_ds3231_alarm.c.
| uint8_t ds3231_alarm_set_timestamp_time_zone | ( | int8_t | zone | ) |
alarm example set the local time zone
| [in] | zone | local time zone |
Definition at line 406 of file driver_ds3231_alarm.c.
| uint8_t ds3231_basic_deinit | ( | void | ) |
basic example deinit
Definition at line 164 of file driver_ds3231_basic.c.
| uint8_t ds3231_basic_get_ascii_time | ( | char * | buf, |
| uint8_t | len ) |
basic example get the ascii time
| [out] | *buf | pointer to an ascii buffer |
| [in] | len | data length |
Definition at line 360 of file driver_ds3231_basic.c.
| uint8_t ds3231_basic_get_temperature | ( | int16_t * | raw, |
| float * | s ) |
basic example get the current temperature
| [out] | *raw | pointer to a raw temperature buffer |
| [out] | *s | pointer to a converted temperature buffer |
Definition at line 338 of file driver_ds3231_basic.c.
| uint8_t ds3231_basic_get_time | ( | ds3231_time_t * | t | ) |
basic example get the time
| [out] | *t | pointer to a time structure |
Definition at line 263 of file driver_ds3231_basic.c.
| uint8_t ds3231_basic_get_timestamp | ( | time_t * | timestamp | ) |
basic example get the time in a unix timestamp
| [out] | *timestamp | pointer to a unix timestamp buffer |
Definition at line 284 of file driver_ds3231_basic.c.
| uint8_t ds3231_basic_get_timestamp_time_zone | ( | int8_t * | zone | ) |
basic example get the local time zone
| [out] | *zone | pointer to a local time zone buffer |
Definition at line 322 of file driver_ds3231_basic.c.
| uint8_t ds3231_basic_init | ( | void | ) |
basic example init
Definition at line 50 of file driver_ds3231_basic.c.
| uint8_t ds3231_basic_set_time | ( | ds3231_time_t * | t | ) |
basic example set the time
| [in] | *t | pointer to a time structure |
Definition at line 184 of file driver_ds3231_basic.c.
| uint8_t ds3231_basic_set_timestamp | ( | time_t | timestamp | ) |
basic example set the time by a unix timestamp
| [in] | timestamp | unix timestamp |
Definition at line 205 of file driver_ds3231_basic.c.
| uint8_t ds3231_basic_set_timestamp_time_zone | ( | int8_t | zone | ) |
basic example set the local time zone
| [in] | zone | local time zone |
Definition at line 248 of file driver_ds3231_basic.c.
| uint8_t ds3231_output_deinit | ( | void | ) |
output example deinit
Definition at line 144 of file driver_ds3231_output.c.
| uint8_t ds3231_output_get_32khz_output | ( | ds3231_bool_t * | enable | ) |
output example get the 32KHz output status
| [out] | *enable | pointer to a bool value buffer |
Definition at line 435 of file driver_ds3231_output.c.
| uint8_t ds3231_output_get_ascii_time | ( | char * | buf, |
| uint8_t | len ) |
output example get the ascii time
| [out] | *buf | pointer to an ascii buffer |
| [in] | len | data length |
Definition at line 340 of file driver_ds3231_output.c.
| uint8_t ds3231_output_get_square_wave | ( | ds3231_bool_t * | enable | ) |
output example get the square wave status
| [out] | *enable | pointer to a bool value buffer |
Definition at line 393 of file driver_ds3231_output.c.
| uint8_t ds3231_output_get_temperature | ( | int16_t * | raw, |
| float * | s ) |
output example get the current temperature
| [out] | *raw | pointer to a raw temperature buffer |
| [out] | *s | pointer to a converted temperature buffer |
Definition at line 318 of file driver_ds3231_output.c.
| uint8_t ds3231_output_get_time | ( | ds3231_time_t * | t | ) |
output example get the time
| [out] | *t | pointer to a time structure |
Definition at line 243 of file driver_ds3231_output.c.
| uint8_t ds3231_output_get_timestamp | ( | time_t * | timestamp | ) |
output example get the time in a unix timestamp
| [out] | *timestamp | pointer to a unix timestamp buffer |
Definition at line 264 of file driver_ds3231_output.c.
| uint8_t ds3231_output_get_timestamp_time_zone | ( | int8_t * | zone | ) |
output example get the local time zone
| [out] | *zone | pointer to a local time zone buffer |
Definition at line 302 of file driver_ds3231_output.c.
| uint8_t ds3231_output_init | ( | void | ) |
output example init
Definition at line 50 of file driver_ds3231_output.c.
| uint8_t ds3231_output_set_32khz_output | ( | ds3231_bool_t | enable | ) |
output example enable or disable the 32KHz output
| [in] | enable | bool value |
Definition at line 414 of file driver_ds3231_output.c.
| uint8_t ds3231_output_set_square_wave | ( | ds3231_bool_t | enable | ) |
output example enable or disable the square wave
| [in] | enable | bool value |
Definition at line 372 of file driver_ds3231_output.c.
| uint8_t ds3231_output_set_time | ( | ds3231_time_t * | t | ) |
output example set the time
| [in] | *t | pointer to a time structure |
Definition at line 164 of file driver_ds3231_output.c.
| uint8_t ds3231_output_set_timestamp | ( | time_t | timestamp | ) |
output example set the time by a unix timestamp
| [in] | timestamp | unix timestamp |
Definition at line 185 of file driver_ds3231_output.c.
| uint8_t ds3231_output_set_timestamp_time_zone | ( | int8_t | zone | ) |
output example set the local time zone
| [in] | zone | local time zone |
Definition at line 228 of file driver_ds3231_output.c.