/* check whether the region which is pointed by address  */
bool _flash_is_locked(struct _flash_device *const device, const uint32_t dst_addr)
/* check whether the region which is pointed by address  */
bool _flash_is_locked(struct _flash_device *const device, const uint32_t dst_addr)
{
	uint16_t region_id;
	region_id = dst_addr / (NVMCTRL_FLASH_SIZE / 16);
	return !(hri_nvmctrl_get_LOCK_reg(device->hw, 1 << region_id));
}