/* Create master emulated EEPROM management page. 
Creates a new master page in emulated EEPROM, giving information on the emulator used to store the EEPROM data.  */
static void _eeprom_emulator_create_master_page(void)
/* Create master emulated EEPROM management page. 
Creates a new master page in emulated EEPROM, giving information on the emulator used to store the EEPROM data.  */
static void _eeprom_emulator_create_master_page(void)
{
	const uint32_t magic_key[] = EEPROM_MAGIC_KEY;
	struct _eeprom_master_page master_page;
	memset(&master_page, 0xFF, sizeof(master_page));
	for (uint8_t c = 0; c < EEPROM_MAGIC_KEY_COUNT; c++) {
		master_page.magic_key[c] = magic_key[c];
	}
	master_page.emulator_id   = EEPROM_EMULATOR_ID;
	master_page.major_version = EEPROM_MAJOR_VERSION;
	master_page.minor_version = EEPROM_MINOR_VERSION;
	master_page.revision      = EEPROM_REVISION;
	_eeprom_emulator_nvm_erase_row(
			EEPROM_MASTER_PAGE_NUMBER / NVMCTRL_ROW_PAGES);
	_eeprom_emulator_nvm_fill_cache(EEPROM_MASTER_PAGE_NUMBER, &master_page);
	_eeprom_emulator_nvm_commit_cache(EEPROM_MASTER_PAGE_NUMBER);
}