Firmware SDK
|
Driver for internal EEPROM memory. More...
Enumerations | |
enum | twr_eepromc_event_t { TWR_EEPROM_EVENT_ASYNC_WRITE_ERROR = 0 , TWR_EEPROM_EVENT_ASYNC_WRITE_DONE = 1 } |
Functions | |
bool | twr_eeprom_write (uint32_t address, const void *buffer, size_t length) |
Write buffer to EEPROM area and verify it. More... | |
bool | twr_eeprom_async_write (uint32_t address, const void *buffer, size_t length, void(*event_handler)(twr_eepromc_event_t, void *), void *event_param) |
Async write buffer to EEPROM area and verify it. More... | |
void | twr_eeprom_async_cancel (void) |
Cancel async write. | |
bool | twr_eeprom_read (uint32_t address, void *buffer, size_t length) |
Read buffer from EEPROM area. More... | |
size_t | twr_eeprom_get_size (void) |
Return size of EEPROM area. More... | |
Driver for internal EEPROM memory.
enum twr_eepromc_event_t |
Enumerator | |
---|---|
TWR_EEPROM_EVENT_ASYNC_WRITE_ERROR | EEPROM event sync write error. |
TWR_EEPROM_EVENT_ASYNC_WRITE_DONE | EEPROM event sync write done. |
Definition at line 10 of file twr_eeprom.h.
bool twr_eeprom_async_write | ( | uint32_t | address, |
const void * | buffer, | ||
size_t | length, | ||
void(*)(twr_eepromc_event_t, void *) | event_handler, | ||
void * | event_param | ||
) |
Async write buffer to EEPROM area and verify it.
[in] | address | EEPROM start address (starts at 0) |
[in] | buffer | Pointer to source buffer |
[in] | length | Number of bytes to be written |
[in] | event_handler | Function address |
[in] | event_param | Optional event parameter (can be NULL) |
Definition at line 70 of file twr_eeprom.c.
size_t twr_eeprom_get_size | ( | void | ) |
Return size of EEPROM area.
Definition at line 132 of file twr_eeprom.c.
bool twr_eeprom_read | ( | uint32_t | address, |
void * | buffer, | ||
size_t | length | ||
) |
Read buffer from EEPROM area.
[in] | address | EEPROM start address (starts at 0) |
[out] | buffer | Pointer to destination buffer |
[in] | length | Number of bytes to be read |
Definition at line 113 of file twr_eeprom.c.
bool twr_eeprom_write | ( | uint32_t | address, |
const void * | buffer, | ||
size_t | length | ||
) |
Write buffer to EEPROM area and verify it.
[in] | address | EEPROM start address (starts at 0) |
[in] | buffer | Pointer to source buffer |
[in] | length | Number of bytes to be written |
Definition at line 31 of file twr_eeprom.c.