Lines Matching refs:chunk
53 struct bt_mesh_blob_chunk chunk = { 0 }; in ZTEST() local
94 chunk.data = chunk_data; in ZTEST()
121 chunk.size = chunk_size(&block, chunk_idx); in ZTEST()
122 chunk.offset = CHUNK_SIZE * chunk_idx; in ZTEST()
124 err = blob_flash_stream.io.rd(&blob_flash_stream.io, &xfer, &block, &chunk); in ZTEST()
126 err, block.offset + chunk.offset, chunk.size); in ZTEST()
128 zassert_mem_equal(&chunk_data, &test_data[tests_data_offset], chunk.size, in ZTEST()
132 remaining -= chunk.size; in ZTEST()
133 tests_data_offset += chunk.size; in ZTEST()
142 chunk.offset++; in ZTEST()
143 err = blob_flash_stream.io.rd(&blob_flash_stream.io, &xfer, &block, &chunk); in ZTEST()
146 chunk.offset--; in ZTEST()
148 err = blob_flash_stream.io.rd(&blob_flash_stream.io, &xfer, &block, &chunk); in ZTEST()
153 err = blob_flash_stream.io.rd(&blob_flash_stream.io, &xfer, &block, &chunk); in ZTEST()
163 struct bt_mesh_blob_chunk chunk = { 0 }; in ZTEST() local
189 chunk.data = chunk_data; in ZTEST()
215 chunk.size = chunk_size(&block, chunk_idx); in ZTEST()
216 chunk.offset = CHUNK_SIZE * chunk_idx; in ZTEST()
218 memcpy(chunk.data, in ZTEST()
219 &test_data[chunk.offset + block.offset], in ZTEST()
220 chunk.size); in ZTEST()
222 err = blob_flash_stream.io.wr(&blob_flash_stream.io, &xfer, &block, &chunk); in ZTEST()
229 ROUND_UP((block.offset + chunk.offset) % in ZTEST()
231 chunk.size, flash_area_align(blob_flash_stream.area)) - in ZTEST()
232 (block.offset + chunk.offset) % in ZTEST()
233 flash_area_align(blob_flash_stream.area) - chunk.size; in ZTEST()
235 flash_area_read(blob_flash_stream.area, block.offset + chunk.offset, in ZTEST()
236 chunk_ctrl_data, chunk.size + end_padding_len); in ZTEST()
238 zassert_mem_equal(chunk_ctrl_data, chunk_data, chunk.size, in ZTEST()
243 zassert_equal(chunk_ctrl_data[chunk.size + j], in ZTEST()
248 remaining -= chunk.size; in ZTEST()
249 tests_data_offset += chunk.size; in ZTEST()
263 chunk.offset++; in ZTEST()
264 err = blob_flash_stream.io.wr(&blob_flash_stream.io, &xfer, &block, &chunk); in ZTEST()
267 chunk.offset--; in ZTEST()
269 err = blob_flash_stream.io.wr(&blob_flash_stream.io, &xfer, &block, &chunk); in ZTEST()
274 err = blob_flash_stream.io.wr(&blob_flash_stream.io, &xfer, &block, &chunk); in ZTEST()