|
px-fwlib 0.10.0
Cross-platform embedded library and documentation for 8/16/32-bit microcontrollers generated with Doxygen 1.9.2
|
This driver interface with an ST M41T00 RTC using I2C.
File(s):
Reference:
Example:
Data Structures | |
| struct | px_m41t00_time_t |
| Structure to store time and date. More... | |
Macros | |
| #define | PX_M41T00_SLA_ADR 0x68 |
| I2C Slave Address. More... | |
Functions | |
| void | px_m41t00_init (px_i2c_handle_t *px_i2c_handle) |
| Initialise driver. More... | |
| bool | px_m41t00_get_time (px_m41t00_time_t *px_rtc_time) |
| Get RTC time using I2C driver. More... | |
| bool | px_m41t00_set_time (const px_m41t00_time_t *px_rtc_time) |
| Set RTC time using I2C driver. More... | |
| struct px_m41t00_time_t |
Structure to store time and date.
Definition at line 53 of file px_m41t00.h.
| #define PX_M41T00_SLA_ADR 0x68 |
I2C Slave Address.
Definition at line 49 of file px_m41t00.h.
| void px_m41t00_init | ( | px_i2c_handle_t * | px_i2c_handle | ) |
Initialise driver.
| px_i2c_handle | Pointer to I2C driver handle |
Definition at line 136 of file px_m41t00.c.
| bool px_m41t00_get_time | ( | px_m41t00_time_t * | px_rtc_time | ) |
Get RTC time using I2C driver.
| [out] | px_rtc_time | Pointer to a structure that will contain the new time. |
| true | Time succesfully retrieved and copied into structure. |
| false | Unable to get the time (I2C communication error) or timer has been stopped (new battery inserted) |
Definition at line 141 of file px_m41t00.c.
| bool px_m41t00_set_time | ( | const px_m41t00_time_t * | px_rtc_time | ) |
Set RTC time using I2C driver.
| [in] | px_rtc_time | Pointer to a structure containing the new time. |
| true | Time succesfully set |
| false | Unable to set the time (I2C communication error) |
Definition at line 182 of file px_m41t00.c.