![]() |
LibDriver DS3231
|
ds3231 base driver modules More...
Data Structures | |
| struct | ds3231_time_s |
| ds3231 time structure definition More... | |
| struct | ds3231_handle_s |
| ds3231 handle structure definition More... | |
| struct | ds3231_info_s |
| ds3231 information structure definition More... | |
Typedefs | |
| typedef struct ds3231_time_s | ds3231_time_t |
| ds3231 time structure definition | |
| typedef struct ds3231_handle_s | ds3231_handle_t |
| ds3231 handle structure definition | |
| typedef struct ds3231_info_s | ds3231_info_t |
| ds3231 information structure definition | |
Enumerations | |
| enum | ds3231_bool_t { DS3231_BOOL_FALSE = 0x00 , DS3231_BOOL_TRUE = 0x01 } |
| ds3231 bool enumeration definition More... | |
| enum | ds3231_alarm_t { DS3231_ALARM_1 = 0x00 , DS3231_ALARM_2 = 0x01 } |
| ds3231 alarm enumeration definition More... | |
| enum | ds3231_am_pm_t { DS3231_AM = 0x00 , DS3231_PM = 0x01 } |
| ds3231 am pm enumeration definition More... | |
| enum | ds3231_pin_t { DS3231_PIN_SQUARE_WAVE = 0x00 , DS3231_PIN_INTERRUPT = 0x01 } |
| ds3231 pin enumeration definition More... | |
| enum | ds3231_format_t { DS3231_FORMAT_12H = 0x01 , DS3231_FORMAT_24H = 0x00 } |
| ds3231 format enumeration definition More... | |
| enum | ds3231_status_t { DS3231_STATUS_ALARM_2 = (1 << 1) , DS3231_STATUS_ALARM_1 = (1 << 0) } |
| ds3231 alarm1 enumeration definition More... | |
Functions | |
| uint8_t | ds3231_info (ds3231_info_t *info) |
| get chip's information | |
| uint8_t | ds3231_init (ds3231_handle_t *handle) |
| initialize the chip | |
| uint8_t | ds3231_deinit (ds3231_handle_t *handle) |
| close the chip | |
| uint8_t | ds3231_irq_handler (ds3231_handle_t *handle) |
| irq handler | |
| uint8_t | ds3231_set_time (ds3231_handle_t *handle, ds3231_time_t *t) |
| set the current time | |
| uint8_t | ds3231_get_time (ds3231_handle_t *handle, ds3231_time_t *t) |
| get the current time | |
| uint8_t | ds3231_set_oscillator (ds3231_handle_t *handle, ds3231_bool_t enable) |
| enable or disable the oscillator | |
| uint8_t | ds3231_get_oscillator (ds3231_handle_t *handle, ds3231_bool_t *enable) |
| get the chip oscillator status | |
| uint8_t | ds3231_get_status (ds3231_handle_t *handle, uint8_t *status) |
| get the chip status | |
ds3231 base driver modules
| typedef struct ds3231_handle_s ds3231_handle_t |
ds3231 handle structure definition
| typedef struct ds3231_info_s ds3231_info_t |
ds3231 information structure definition
| typedef struct ds3231_time_s ds3231_time_t |
ds3231 time structure definition
| enum ds3231_alarm_t |
ds3231 alarm enumeration definition
| Enumerator | |
|---|---|
| DS3231_ALARM_1 | alarm 1 |
| DS3231_ALARM_2 | alarm 2 |
Definition at line 72 of file driver_ds3231.h.
| enum ds3231_am_pm_t |
ds3231 am pm enumeration definition
| Enumerator | |
|---|---|
| DS3231_AM | am |
| DS3231_PM | pm |
Definition at line 81 of file driver_ds3231.h.
| enum ds3231_bool_t |
ds3231 bool enumeration definition
| Enumerator | |
|---|---|
| DS3231_BOOL_FALSE | disable function |
| DS3231_BOOL_TRUE | enable function |
Definition at line 63 of file driver_ds3231.h.
| enum ds3231_format_t |
ds3231 format enumeration definition
| Enumerator | |
|---|---|
| DS3231_FORMAT_12H | 12h format |
| DS3231_FORMAT_24H | 24h format |
Definition at line 99 of file driver_ds3231.h.
| enum ds3231_pin_t |
ds3231 pin enumeration definition
| Enumerator | |
|---|---|
| DS3231_PIN_SQUARE_WAVE | square wave pin |
| DS3231_PIN_INTERRUPT | interrupt pin |
Definition at line 90 of file driver_ds3231.h.
| enum ds3231_status_t |
ds3231 alarm1 enumeration definition
| Enumerator | |
|---|---|
| DS3231_STATUS_ALARM_2 | alarm 2 status |
| DS3231_STATUS_ALARM_1 | alarm 1 status |
Definition at line 108 of file driver_ds3231.h.
| uint8_t ds3231_deinit | ( | ds3231_handle_t * | handle | ) |
close the chip
| [in] | *handle | pointer to a ds3231 handle structure |
Definition at line 1566 of file driver_ds3231.c.
| uint8_t ds3231_get_oscillator | ( | ds3231_handle_t * | handle, |
| ds3231_bool_t * | enable ) |
get the chip oscillator status
| [in] | *handle | pointer to a ds3231 handle structure |
| [out] | *enable | pointer to a bool value buffer |
Definition at line 901 of file driver_ds3231.c.
| uint8_t ds3231_get_status | ( | ds3231_handle_t * | handle, |
| uint8_t * | status ) |
get the chip status
| [in] | *handle | pointer to a ds3231 handle structure |
| [out] | *status | pointer to a chip status buffer |
Definition at line 1272 of file driver_ds3231.c.
| uint8_t ds3231_get_time | ( | ds3231_handle_t * | handle, |
| ds3231_time_t * | t ) |
get the current time
| [in] | *handle | pointer to a ds3231 handle structure |
| [out] | *t | pointer to a time structure |
Definition at line 372 of file driver_ds3231.c.
| uint8_t ds3231_info | ( | ds3231_info_t * | info | ) |
get chip's information
| [out] | *info | pointer to a ds3231 info structure |
Definition at line 1790 of file driver_ds3231.c.
| uint8_t ds3231_init | ( | ds3231_handle_t * | handle | ) |
initialize the chip
| [in] | *handle | pointer to a ds3231 handle structure |
Definition at line 1478 of file driver_ds3231.c.
| uint8_t ds3231_irq_handler | ( | ds3231_handle_t * | handle | ) |
irq handler
| [in] | *handle | pointer to a ds3231 handle structure |
Definition at line 1430 of file driver_ds3231.c.
| uint8_t ds3231_set_oscillator | ( | ds3231_handle_t * | handle, |
| ds3231_bool_t | enable ) |
enable or disable the oscillator
| [in] | *handle | pointer to a ds3231 handle structure |
| [in] | enable | bool value |
Definition at line 856 of file driver_ds3231.c.
| uint8_t ds3231_set_time | ( | ds3231_handle_t * | handle, |
| ds3231_time_t * | t ) |
set the current time
| [in] | *handle | pointer to a ds3231 handle structure |
| [in] | *t | pointer to a time structure |
Definition at line 172 of file driver_ds3231.c.