Bluetooth: Mesh: save stream mode in io_open()
Mode affects access to flash aread for `block_start`. When mode is set to `BT_MESH_BLOB_READ` function return early, and because `BT_MESH_BLOB_READ = 0` this is default behaviour. For write flash area must be erased to allow driver to write there new data - bits can only be pulled down, so overwrite will not be permitted. Signed-off-by: Krzysztof Kopyściński <krzysztof.kopyscinski@codecoup.pl>
This commit is contained in:
parent
70a0364c2a
commit
fc2dcc4665
1 changed files with 2 additions and 0 deletions
|
@ -43,6 +43,8 @@ static int io_open(const struct bt_mesh_blob_io *io,
|
|||
{
|
||||
struct bt_mesh_blob_io_flash *flash = FLASH_IO(io);
|
||||
|
||||
flash->mode = mode;
|
||||
|
||||
return flash_area_open(flash->area_id, &flash->area);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue