/* This is an example demonstrating the flash lock bits feature.  */
static void flash_protect_example(void)
/* This is an example demonstrating the flash lock bits feature.  */
static void flash_protect_example(void)
{
	printf("\r\nFlash protection example...\n\r");
	flashcalw_lock_page_region(NVRAM_PAGE_NUMBER, true);
	flashcalw_memset((void *)NVRAM_PAGE_ADDRESS, 0x0, 8, FLASH_PAGE_SIZE,
			true);
	if (flashcalw_is_lock_error()) {
		printf("Flash lock operation succeeded.\n\r");
	}
	flashcalw_lock_page_region(NVRAM_PAGE_NUMBER, false);
}