/* Example of using FLASH_0 to read and write Flash RWWEE array.  */
void RWW_FLASH_0_example(void)
/* Example of using FLASH_0 to read and write Flash RWWEE array.  */
void RWW_FLASH_0_example(void)
{
	uint32_t page_size;
	uint16_t i;
	page_size = _rww_flash_get_page_size(&FLASH_0.dev);
	for (i = 0; i < page_size; i++) {
		src_data[i] = i;
	}
	if (_rww_flash_write(&FLASH_0.dev, NVMCTRL_RWW_EEPROM_ADDR, src_data, page_size) != ERR_NONE) {
		while (1)
			;
	}
	if (_rww_flash_read(&FLASH_0.dev, NVMCTRL_RWW_EEPROM_ADDR, chk_data, page_size) != ERR_NONE) {
		while (1)
			;
	}
	for (i = 0; i < page_size; i++) {
		if (src_data[i] != chk_data[i]) {
			while (1)
				;
		}
	}
}