Lines Matching full:flash
9 #include <zephyr/drivers/flash.h>
44 struct bt_mesh_blob_io_flash *flash = FLASH_IO(io); in io_open() local
46 flash->mode = mode; in io_open()
48 return flash_area_open(flash->area_id, &flash->area); in io_open()
54 struct bt_mesh_blob_io_flash *flash = FLASH_IO(io); in io_close() local
56 flash_area_close(flash->area); in io_close()
63 struct bt_mesh_blob_io_flash *flash = FLASH_IO(io); in block_start() local
66 if (flash->mode == BT_MESH_BLOB_READ) { in block_start()
75 flash_dev = flash_area_get_device(flash->area); in block_start()
81 flash->offset + block->offset, &page); in block_start()
91 return flash_area_flatten(flash->area, flash->offset + block->offset, in block_start()
100 struct bt_mesh_blob_io_flash *flash = FLASH_IO(io); in rd_chunk() local
102 return flash_area_read(flash->area, in rd_chunk()
103 flash->offset + block->offset + chunk->offset, in rd_chunk()
112 struct bt_mesh_blob_io_flash *flash = FLASH_IO(io); in wr_chunk() local
115 return flash_area_write(flash->area, in wr_chunk()
116 flash->offset + block->offset + chunk->offset, in wr_chunk()
121 off_t area_offset = flash->offset + block->offset + chunk->offset; in wr_chunk()
134 return flash_area_write(flash->area, in wr_chunk()
139 int bt_mesh_blob_io_flash_init(struct bt_mesh_blob_io_flash *flash, in bt_mesh_blob_io_flash_init() argument
149 flash->area_id = area_id; in bt_mesh_blob_io_flash_init()
150 flash->offset = offset; in bt_mesh_blob_io_flash_init()
151 flash->io.open = io_open; in bt_mesh_blob_io_flash_init()
152 flash->io.close = io_close; in bt_mesh_blob_io_flash_init()
153 flash->io.block_start = block_start; in bt_mesh_blob_io_flash_init()
154 flash->io.block_end = NULL; in bt_mesh_blob_io_flash_init()
155 flash->io.rd = rd_chunk; in bt_mesh_blob_io_flash_init()
156 flash->io.wr = wr_chunk; in bt_mesh_blob_io_flash_init()