1.3.1.4.8 EMU_EEPROM_BufferWrite Function

C

EMU_EEPROM_STATUS EMU_EEPROM_BufferWrite(
    const uint16_t offset,
    const uint8_t *const data,
    const uint16_t length
);

Summary

Writes a buffer of data to the emulated EEPROM memory space

Description

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

Precondition

Function EMU_EEPROM_Initialize should have been called before calling this function.

Parameters

ParamDescription
offsetStarting byte offset to write to, in emulated EEPROM memory space
dataPointer to the data buffer containing source data to write
lengthLength of the data to write, in bytes

Returns

EMU_EEPROM_STATUS - Enum of type EMU_EEPROM_STATUS. Status code indicating the status of the operation.

Example

uint8_t my_buffer[5];

EMU_EEPROM_BufferWrite(0, my_buffer, 5);

Remarks

Data stored in pages may be cached in volatile RAM memory; to commit any cached data to physical non-volatile memory, the EMU_EEPROM_CachedDataCommit() function should be called.