![]() |
RTEMS 6.1
|
#include <i2c-rtc.h>
Data Fields | |
| rtems_mutex | mutex |
| const char * | i2c_bus_path |
| uint8_t | i2c_addr |
| bool | initialized |
| int(* | hw_init )(struct i2c_rtc_base *ctx) |
| size_t | clock_offset |
| struct { | |
| size_t year | |
| size_t month | |
| size_t wkday | |
| size_t day | |
| size_t hour | |
| size_t min | |
| size_t sec | |
| } | order |
Base context for the driver.
| size_t i2c_rtc_base::clock_offset |
Offset of the start of the clock register block.
| int(* i2c_rtc_base::hw_init) (struct i2c_rtc_base *ctx) |
Hardware initialization function. Will be called once when the RTC is used for the first time. Can return 0 on success or anything else on error. In an error case, it will be called again on the next use.
| uint8_t i2c_rtc_base::i2c_addr |
I2C address.
| const char* i2c_rtc_base::i2c_bus_path |
The path of the I2C bus device.
| bool i2c_rtc_base::initialized |
Whether the RTC has already been initialized. Used internally.
| rtems_mutex i2c_rtc_base::mutex |
Just initialize with RTEMS_MUTEX_INITIALIZER('mcp7940').
| struct { ... } i2c_rtc_base::order |
Order of the fields of the date.