Lines Matching refs:buf
77 uint8_t buf[sizeof(expected)]; in single_sector_test() local
97 memset(buf, 0, len); in single_sector_test()
98 rc = flash_read(flash_dev, SPI_FLASH_TEST_REGION_OFFSET, buf, len); in single_sector_test()
103 if (memcmp(erased, buf, len) != 0) { in single_sector_test()
105 SPI_FLASH_TEST_REGION_OFFSET, *(uint32_t *)buf); in single_sector_test()
119 memset(buf, 0, len); in single_sector_test()
120 rc = flash_read(flash_dev, SPI_FLASH_TEST_REGION_OFFSET, buf, len); in single_sector_test()
126 if (memcmp(expected, buf, len) == 0) { in single_sector_test()
130 const uint8_t *rp = buf; in single_sector_test()
136 (uint32_t)(SPI_FLASH_TEST_REGION_OFFSET + (rp - buf)), in single_sector_test()
153 uint8_t buf[sizeof(expected)]; in multi_sector_test() local
174 memset(buf, 0, len); in multi_sector_test()
178 rc = flash_read(flash_dev, offs, buf, len); in multi_sector_test()
183 if (memcmp(erased, buf, len) != 0) { in multi_sector_test()
185 offs, *(uint32_t *)buf); in multi_sector_test()
205 memset(buf, 0, len); in multi_sector_test()
206 rc = flash_read(flash_dev, offs, buf, len); in multi_sector_test()
212 if (memcmp(expected, buf, len) == 0) { in multi_sector_test()
216 const uint8_t *rp = buf; in multi_sector_test()
222 (uint32_t)(offs + (rp - buf)), in multi_sector_test()