Lines Matching full:fa
25 const struct flash_area *fa; in ZTEST() local
29 rc = flash_area_open(FIXED_PARTITION_ID(disabled_a), &fa); in ZTEST()
31 rc = flash_area_open(FIXED_PARTITION_ID(disabled_b), &fa); in ZTEST()
80 const struct flash_area *fa; in ZTEST() local
85 fa = FIXED_PARTITION(SLOT1_PARTITION); in ZTEST()
87 zassert_true(flash_area_device_is_ready(fa)); in ZTEST()
91 /* Device obtained by label should match the one from fa object */ in ZTEST()
92 zassert_equal(fa->fa_dev, flash_dev_a, "Device for slot1_partition do not match"); in ZTEST()
105 const struct flash_area *fa; in ZTEST() local
110 fa = FIXED_PARTITION(SLOT1_PARTITION); in ZTEST()
112 zassert_true(flash_area_device_is_ready(fa)); in ZTEST()
116 /* Device obtained by label should match the one from fa object */ in ZTEST()
117 zassert_equal(fa->fa_dev, flash_dev_a, "Device for slot1_partition do not match"); in ZTEST()
120 rc = flash_area_sectors(fa, &sec_cnt, fs_sectors); in ZTEST()
129 const struct flash_area *fa; in ZTEST() local
132 fa = FIXED_PARTITION(SLOT1_PARTITION); in ZTEST()
134 val = flash_area_erased_val(fa); in ZTEST()
136 param = flash_get_parameters(fa->fa_dev); in ZTEST()
162 const struct flash_area *fa; in ZTEST() local
165 fa = FIXED_PARTITION(SLOT1_PARTITION); in ZTEST()
168 flash_dev = flash_area_get_device(fa); in ZTEST()
170 rc = flash_erase(flash_dev, fa->fa_off, fa->fa_size); in ZTEST()
173 rc = flash_fill(flash_dev, 0xaa, fa->fa_off, fa->fa_size); in ZTEST()
176 rc = flash_area_erase(fa, 0, fa->fa_size); in ZTEST()
180 TC_PRINT("\tpointer:\t %p\n", &fa); in ZTEST()
181 TC_PRINT("\toffset:\t %ld\n", (long)fa->fa_off); in ZTEST()
182 TC_PRINT("\tsize:\t %ld\n", (long)fa->fa_size); in ZTEST()
186 while (erased && i < fa->fa_size) { in ZTEST()
188 int chunk = MIN(sizeof(buf), fa->fa_size - i); in ZTEST()
190 rc = flash_read(flash_dev, fa->fa_off + i, buf, chunk); in ZTEST()
193 if ((uint8_t)buf[ii] != (uint8_t)flash_area_erased_val(fa)) { in ZTEST()
200 i + fa->fa_off); in ZTEST()
202 rc = flash_fill(flash_dev, 0xaa, fa->fa_off, fa->fa_size); in ZTEST()
205 rc = flash_area_flatten(fa, 0, fa->fa_size); in ZTEST()
209 while (erased && i < fa->fa_size) { in ZTEST()
211 int chunk = MIN(sizeof(buf), fa->fa_size - i); in ZTEST()
213 rc = flash_read(flash_dev, fa->fa_off + i, buf, chunk); in ZTEST()
216 if ((uint8_t)buf[ii] != (uint8_t)flash_area_erased_val(fa)) { in ZTEST()
223 i + fa->fa_off); in ZTEST()