Lines Matching refs:offset
21 static int test_flash_ram_erase(const struct device *dev, off_t offset, in test_flash_ram_erase() argument
25 off_t end_offset = offset + len; in test_flash_ram_erase()
27 zassert_true(offset >= 0, "invalid offset"); in test_flash_ram_erase()
28 zassert_true(offset + len <= TEST_PARTITION_SIZE, in test_flash_ram_erase()
31 while (offset < end_offset) { in test_flash_ram_erase()
32 flash_get_page_info_by_offs(dev, offset, &info); in test_flash_ram_erase()
34 offset = info.start_offset + info.size; in test_flash_ram_erase()
40 static int test_flash_ram_write(const struct device *dev, off_t offset, in test_flash_ram_write() argument
43 zassert_true(offset >= 0, "invalid offset"); in test_flash_ram_write()
44 zassert_true(offset + len <= TEST_PARTITION_SIZE, in test_flash_ram_write()
47 memcpy(rambuf + offset, data, len); in test_flash_ram_write()
52 static int test_flash_ram_read(const struct device *dev, off_t offset, in test_flash_ram_read() argument
56 zassert_true(offset >= 0, "invalid offset"); in test_flash_ram_read()
57 zassert_true(offset + len <= TEST_PARTITION_SIZE, in test_flash_ram_read()
60 memcpy(data, rambuf + offset, len); in test_flash_ram_read()