zephyr: remove flash_area_read_is_empty()
This function was drooped from MCUBoot's porting API. Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
This commit is contained in:
parent
210b31802b
commit
c625da41e3
|
@ -115,24 +115,3 @@ uint8_t flash_area_erased_val(const struct flash_area *fap)
|
|||
(void)fap;
|
||||
return ERASED_VAL;
|
||||
}
|
||||
|
||||
int flash_area_read_is_empty(const struct flash_area *fa, uint32_t off,
|
||||
void *dst, uint32_t len)
|
||||
{
|
||||
uint8_t i;
|
||||
uint8_t *u8dst;
|
||||
int rc;
|
||||
|
||||
rc = flash_area_read(fa, off, dst, len);
|
||||
if (rc) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
for (i = 0, u8dst = (uint8_t *)dst; i < len; i++) {
|
||||
if (u8dst[i] != ERASED_VAL) {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue