/* Gets the size of the whole flash array.  */
uint32_t flashcalw_get_flash_size(void)
/* Gets the size of the whole flash array.  */
uint32_t flashcalw_get_flash_size(void)
{
	const uint16_t flash_size[(FLASHCALW_FPR_FSZ_Msk >>
	FLASHCALW_FPR_FSZ_Pos) + 1] = {
		4,
		8,
		16,
		32,
		48,
		64,
		96,
		128,
		192,
		256,
		384,
		512,
		768,
		1024,
		2048,
	};
	return ((uint32_t)flash_size[(HFLASHC->FLASHCALW_FPR &
	       FLASHCALW_FPR_FSZ_Msk) >> FLASHCALW_FPR_FSZ_Pos] << 10);
}