storage/flash_map: Added function for get erased byte value
Added flash_area_erased_val() function for get value of erased byte of memory which is under flash area. This function already exist in MCUBoot and zephyr dfu subsystem which makes simultaneous usage of both impossible. Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
This commit is contained in:
parent
cc29dbde4f
commit
053857e09a
4 changed files with 39 additions and 9 deletions
|
@ -270,6 +270,15 @@ const struct device *flash_area_get_device(const struct flash_area *fa)
|
|||
return device_get_binding(fa->fa_dev_name);
|
||||
}
|
||||
|
||||
uint8_t flash_area_erased_val(const struct flash_area *fa)
|
||||
{
|
||||
const struct flash_parameters *param;
|
||||
|
||||
param = flash_get_parameters(device_get_binding(fa->fa_dev_name));
|
||||
|
||||
return param->erase_value;
|
||||
}
|
||||
|
||||
#if defined(CONFIG_FLASH_AREA_CHECK_INTEGRITY)
|
||||
int flash_area_check_int_sha256(const struct flash_area *fa,
|
||||
const struct flash_area_check *fac)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue