Bluetooth: Mesh: Switch erase to flash_area_flatten

The flash_area_erase has been replaced with flash_area_flatten,
allowing code to work with devices that do not provide
erase callback.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
This commit is contained in:
Dominik Ermel 2024-03-09 22:59:35 +00:00 committed by Henrik Brix Andersen
commit 5da7df4e7c

View file

@ -88,8 +88,8 @@ static int block_start(const struct bt_mesh_blob_io *io,
erase_size = block->size;
#endif
return flash_area_erase(flash->area, flash->offset + block->offset,
erase_size);
return flash_area_flatten(flash->area, flash->offset + block->offset,
erase_size);
}
static int rd_chunk(const struct bt_mesh_blob_io *io,