Lines Matching refs:ate_size

407 	size_t ate_size;  in nvs_ate_valid()  local
410 ate_size = nvs_al_size(fs, sizeof(struct nvs_ate)); in nvs_ate_valid()
414 (position >= (fs->sector_size - ate_size))) { in nvs_ate_valid()
429 size_t ate_size; in nvs_close_ate_valid() local
436 ate_size = nvs_al_size(fs, sizeof(struct nvs_ate)); in nvs_close_ate_valid()
437 if ((fs->sector_size - entry->offset) % ate_size) { in nvs_close_ate_valid()
486 size_t ate_size; in nvs_recover_last_ate() local
492 ate_size = nvs_al_size(fs, sizeof(struct nvs_ate)); in nvs_recover_last_ate()
494 *addr -= ate_size; in nvs_recover_last_ate()
508 ate_end_addr -= ate_size; in nvs_recover_last_ate()
521 size_t ate_size; in nvs_prev_ate() local
523 ate_size = nvs_al_size(fs, sizeof(struct nvs_ate)); in nvs_prev_ate()
530 *addr += ate_size; in nvs_prev_ate()
531 if (((*addr) & ADDR_OFFS_MASK) != (fs->sector_size - ate_size)) { in nvs_prev_ate()
586 size_t ate_size; in nvs_sector_close() local
588 ate_size = nvs_al_size(fs, sizeof(struct nvs_ate)); in nvs_sector_close()
592 close_ate.offset = (uint16_t)((fs->ate_wra + ate_size) & ADDR_OFFS_MASK); in nvs_sector_close()
596 fs->ate_wra += (fs->sector_size - ate_size); in nvs_sector_close()
633 size_t ate_size; in nvs_gc() local
635 ate_size = nvs_al_size(fs, sizeof(struct nvs_ate)); in nvs_gc()
639 gc_addr = sec_addr + fs->sector_size - ate_size; in nvs_gc()
653 stop_addr = gc_addr - ate_size; in nvs_gc()
735 if (fs->ate_wra >= (fs->data_wra + ate_size)) { in nvs_gc()
752 size_t ate_size, empty_len; in nvs_startup() local
763 ate_size = nvs_al_size(fs, sizeof(struct nvs_ate)); in nvs_startup()
769 (uint16_t)(fs->sector_size - ate_size); in nvs_startup()
796 (uint16_t)(fs->sector_size - ate_size); in nvs_startup()
809 rc = nvs_flash_cmp_const(fs, addr - ate_size, erase_value, in nvs_startup()
867 fs->ate_wra -= ate_size; in nvs_startup()
889 addr = fs->ate_wra + ate_size; in nvs_startup()
890 while ((addr & ADDR_OFFS_MASK) < (fs->sector_size - ate_size)) { in nvs_startup()
901 addr += ate_size; in nvs_startup()
918 fs->ate_wra += (fs->sector_size - 2 * ate_size); in nvs_startup()
954 if (((fs->ate_wra + 2 * ate_size) == fs->sector_size) && in nvs_startup()
974 (fs->sector_size - 2 * ate_size))) { in nvs_startup()
1067 size_t ate_size, data_size; in nvs_write() local
1078 ate_size = nvs_al_size(fs, sizeof(struct nvs_ate)); in nvs_write()
1087 if ((len > (fs->sector_size - 4 * ate_size - NVS_DATA_CRC_SIZE)) || in nvs_write()
1154 required_space = data_size + ate_size + NVS_DATA_CRC_SIZE; in nvs_write()
1208 size_t ate_size; in nvs_read_hist() local
1218 ate_size = nvs_al_size(fs, sizeof(struct nvs_ate)); in nvs_read_hist()
1220 if (len > (fs->sector_size - 2 * ate_size)) { in nvs_read_hist()
1309 size_t ate_size, free_space; in nvs_calc_free_space() local
1316 ate_size = nvs_al_size(fs, sizeof(struct nvs_ate)); in nvs_calc_free_space()
1324 free_space = (fs->sector_count - 1) * (fs->sector_size - (2 * ate_size)); in nvs_calc_free_space()
1351 free_space -= ate_size; in nvs_calc_free_space()
1356 free_space -= ate_size; in nvs_calc_free_space()
1369 size_t ate_size; in nvs_sector_max_data_size() local
1376 ate_size = nvs_al_size(fs, sizeof(struct nvs_ate)); in nvs_sector_max_data_size()
1378 return fs->ate_wra - fs->data_wra - ate_size - NVS_DATA_CRC_SIZE; in nvs_sector_max_data_size()