29.6.3.3.1 Function rww_eeprom_emulator_write_buffer()

Writes a buffer of data to the emulated RWW EEPROM memory space.

enum status_code rww_eeprom_emulator_write_buffer( const uint16_t offset, const uint8_t *const data, const uint16_t length)

Writes a buffer of data to a section of emulated RWW EEPROM memory space. The source buffer may be of any size, and the destination may lie outside of an emulated RWW EEPROM page boundary.

Note: Data stored in pages may be cached in volatile RAM memory; to commit any cached data to physical non-volatile memory, the rww_eeprom_emulator_commit_page_buffer() function should be called.
Table 29-9. Parameters
Data directionParameter nameDescription

[in]

offset

Starting byte offset to write to, in emulated RWW EEPROM memory space

[in]

data

Pointer to the data buffer containing source data to write

[in]

length

Length of the data to write, in bytes

Returns

Status code indicating the status of the operation.

Table 29-10. Return Values
Return valueDescription

STATUS_OK

If the page was successfully read

STATUS_ERR_NOT_INITIALIZED

If the RWW EEPROM emulator is not initialized

STATUS_ERR_BAD_ADDRESS

If an address outside the valid emulated RWW EEPROM memory space was supplied