AIROC™ BTSDK v4.6 - Documentation | ||||
Defines a driver for the I2C EEPROM interface. More...
Functions | |
void | wiced_hal_ieeprom_init (void) |
Status for EEPROM operations. More... | |
void | wiced_hal_ieeprom_set_size (UINT32 size) |
Sets the size of the EEPROM module in bytes, used for bounds checking. More... | |
UINT8 | wiced_hal_ieeprom_read (UINT16 eepromAddress, UINT16 readCount, UINT8 *buffer, UINT8 deviceAddress) |
Load data from a certain location on the EEPROM module into memory. More... | |
UINT8 | wiced_hal_ieeprom_write (UINT16 eepromAddress, UINT16 writeCount, UINT8 *buffer, UINT8 deviceAddress) |
Write data from memory to a certain location on the EEPROM module. More... | |
Defines a driver for the I2C EEPROM interface.
The driver is responsible for interfacing with an EEPROM module via the I2C bus, with its main purpose being data handling operations. For instance, any unused space (from the system partition) can be used for any purpose to store and access data. It is a handy way for an app to save information to non-volatile storage.
Similar to the Serial Flash Interface Driver, this driver includes checks to ensure safe data handling operation–it will not allow any write operations to take place within active sections (i.e., sections that the system currently uses for boot, etc). Note that read operations are unrestricted. Please reference the Kit Guide or HW User Manual for your device for more information regarding these active sections, their importance, and what roles they play in the system.
void wiced_hal_ieeprom_init | ( | void | ) |
Status for EEPROM operations.
#define DRV_STATUS_SUCCESS 0x00 #define DRV_STATUS_NO_ACK 0x01 #define DRV_STATUS_INVALID_ADDR 0xFF Initialize the I2C lines and low-level EEPROM Driver. Call this before performing any operations.
none |
UINT8 wiced_hal_ieeprom_read | ( | UINT16 | eepromAddress, |
UINT16 | readCount, | ||
UINT8 * | buffer, | ||
UINT8 | deviceAddress | ||
) |
Load data from a certain location on the EEPROM module into memory.
eepromAddress | - The starting source address on the EEPROM. |
readCount | - The number of bytes to read. |
buffer | - Pointer to destination data buffer. |
deviceAddress | - The source slave address. |
void wiced_hal_ieeprom_set_size | ( | UINT32 | size | ) |
Sets the size of the EEPROM module in bytes, used for bounds checking.
The default is 32768 bytes (256 kBit)
size | - Size of the installed module in bytes. |
UINT8 wiced_hal_ieeprom_write | ( | UINT16 | eepromAddress, |
UINT16 | writeCount, | ||
UINT8 * | buffer, | ||
UINT8 | deviceAddress | ||
) |
Write data from memory to a certain location on the EEPROM module.
(!) Please ensure that the address and (address + length) of data to be written does not go beyond the size of the memory module.
(!) Note that this function will not allow corruption of certain memory locations, such as currently active sections (boot sectors) and sections required for the proper function of the Bluetooth subsystem.
eepromAddress | - The starting destination address on the EEPROM. |
writeCount | - The number of bytes to write. |
buffer | - Pointer to destination data buffer. |
deviceAddress | - The destination slave address. |