EEPROM
TWELITE This is a procedure for using the built-in EEPROM of the wireless microcontroller.
A maximum of 64x56=3584 bytes are available.
Definitions
EEPROM_6X_SEGMENT_SIZE |
EEPROM segment size (64 bytes) |
EEPROM_6X_USER_SEGMENTS |
Number of segments in EEPROM |
functions
EEP_6x_bRead()
Reads out the EEPROM.
bool_t EEP_6x_bRead(uint16 u16StartAddr, uint16 u16Bytes, uint8 *pu8Buffer);
Arguments
uint16 |
u16StartAddr |
Read start address (in bytes). |
uint16 |
u16Bytes |
Number of bytes to read. |
uint8 * |
pu8Buffer |
Buffer to store the read data. |
Returns
boot_t |
If TRUE, the read succeeds; if FALSE, it fails. |
EEP_6x_bWrite()
Write to EEPROM.
bool_t EEP_6x_bWrite(uint16 u16StartAddr, uint16 u16Bytes, uint8 *pu8Buffer);
Arguments
uint16 |
u16StartAddr |
Write start address (in bytes). |
uint16 |
u16Bytes |
Number of bytes written. |
uint8 * |
pu8Buffer |
Buffer to store write data. |
Returns
boot_t |
If TRUE, the write succeeds; if FALSE, it fails. |
Sample code