1.3.1.4.6 EMU_EEPROM_PageWrite Function

C

EMU_EEPROM_STATUS EMU_EEPROM_PageWrite(
    const uint8_t logical_page,
    const uint8_t *const data
);

Summary

Writes a page of data to an emulated EEPROM memory page.

Description

Writes an emulated EEPROM page of data to the emulated EEPROM memory space

Precondition

Function EMU_EEPROM_Initialize should have been called before calling this function.

Parameters

ParamDescription
logical_pageLogical EEPROM page number to write to
dataPointer to the data buffer containing source data to write

Returns

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

Example

uint8_t my_buffer[EMU_EEPROM_PAGE_DATA_SIZE];

EMU_EEPROM_PageWrite(0, my_buffer);

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.