/* Verify the contents of a master EEPROM page. 
Verify the contents of a master EEPROM page to ensure that it contains the correct information for this version of the EEPROM emulation service. */
static enum status_code _eeprom_emulator_verify_master_page(void)
/* Verify the contents of a master EEPROM page. 
Verify the contents of a master EEPROM page to ensure that it contains the correct information for this version of the EEPROM emulation service. */
static enum status_code _eeprom_emulator_verify_master_page(void)
{
	const uint32_t magic_key[] = EEPROM_MAGIC_KEY;
	struct _eeprom_master_page master_page;
	_eeprom_emulator_nvm_read_page(EEPROM_MASTER_PAGE_NUMBER, &master_page);
	for (uint8_t c = 0; c < EEPROM_MAGIC_KEY_COUNT; c++) {
		if (master_page.magic_key[c] != magic_key[c]) {
			return STATUS_ERR_BAD_FORMAT;
		}
	}
	if (master_page.emulator_id   != EEPROM_EMULATOR_ID) {
		return STATUS_ERR_IO;
	}
	if (master_page.major_version != EEPROM_MAJOR_VERSION) {
		return STATUS_ERR_IO;
	}
	if (master_page.minor_version != EEPROM_MINOR_VERSION) {
		return STATUS_ERR_IO;
	}
	return STATUS_OK;
}