SPRADL4 January 2025 F29H850TU , F29H859TU-Q1
The EEPROM_UpdatePageStatus() function provides functionality for updating the previous page’s status. This function is called from the EEPROM_Write_Page() function. The page status is first read to determine how to proceed.
uint8_t Current_Page_Status = *(Page_Pointer);
If this status indicates that the page is blank, the function exits. The page status will be updated in the EEPROM_Write_Page() function. Otherwise, the page status is updated to show it is full and the page pointer is incremented to prepare to program the next page:
if (Current_Page_Status == BLANK_PAGE)
{
return;
}
Fill_Buffer(Page_Status, status_buffer_len, CURRENT_PAGE);
EEPROM_Write_Buffer(Page_Pointer + WRITE_SIZE_BYTES, Page_Status);
Page_Pointer += EEPROM_PAGE_DATA_SIZE + WRITE_SIZE_BYTES*2;