Firmware SDK
twr_eeprom.h
1 #ifndef _TWR_EEPROM_H
2 #define _TWR_EEPROM_H
3 
4 #include <twr_common.h>
5 
9 
10 typedef enum
11 {
14 
17 
19 
26 
27 bool twr_eeprom_write(uint32_t address, const void *buffer, size_t length);
28 
37 
38 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);
39 
41 
42 void twr_eeprom_async_cancel(void);
43 
50 
51 bool twr_eeprom_read(uint32_t address, void *buffer, size_t length);
52 
55 
56 size_t twr_eeprom_get_size(void);
57 
59 
60 #endif // _TWR_EEPROM_H
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.
Definition: twr_eeprom.c:70
bool twr_eeprom_read(uint32_t address, void *buffer, size_t length)
Read buffer from EEPROM area.
Definition: twr_eeprom.c:113
twr_eepromc_event_t
Definition: twr_eeprom.h:11
size_t twr_eeprom_get_size(void)
Return size of EEPROM area.
Definition: twr_eeprom.c:132
bool twr_eeprom_write(uint32_t address, const void *buffer, size_t length)
Write buffer to EEPROM area and verify it.
Definition: twr_eeprom.c:31
void twr_eeprom_async_cancel(void)
Cancel async write.
Definition: twr_eeprom.c:103
@ TWR_EEPROM_EVENT_ASYNC_WRITE_ERROR
EEPROM event sync write error.
Definition: twr_eeprom.h:13
@ TWR_EEPROM_EVENT_ASYNC_WRITE_DONE
EEPROM event sync write done.
Definition: twr_eeprom.h:16