samples/fs/littlefs: Use flash_area_flatten to wipe storage
The commit replaces flash_area_erase with flash_area_flatten, as it allows to emulate erase and scramble data stored on devices that do not require explicit erase before write or do not provide erase callback. Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
This commit is contained in:
parent
c7037532b8
commit
e31b8c8edf
1 changed files with 1 additions and 1 deletions
|
@ -252,7 +252,7 @@ static int littlefs_flash_erase(unsigned int id)
|
|||
|
||||
/* Optional wipe flash contents */
|
||||
if (IS_ENABLED(CONFIG_APP_WIPE_STORAGE)) {
|
||||
rc = flash_area_erase(pfa, 0, pfa->fa_size);
|
||||
rc = flash_area_flatten(pfa, 0, pfa->fa_size);
|
||||
LOG_ERR("Erasing flash area ... %d", rc);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue