Lines Matching full:fcb
8 #include <zephyr/fs/fcb.h>
12 fcb_rotate(struct fcb *fcb) in fcb_rotate() argument
17 rc = k_mutex_lock(&fcb->f_mtx, K_FOREVER); in fcb_rotate()
22 rc = fcb_erase_sector(fcb, fcb->f_oldest); in fcb_rotate()
27 if (fcb->f_oldest == fcb->f_active.fe_sector) { in fcb_rotate()
32 sector = fcb_getnext_sector(fcb, fcb->f_oldest); in fcb_rotate()
33 rc = fcb_sector_hdr_init(fcb, sector, fcb->f_active_id + 1); in fcb_rotate()
37 fcb->f_active.fe_sector = sector; in fcb_rotate()
38 fcb->f_active.fe_elem_off = fcb_len_in_flash(fcb, sizeof(struct fcb_disk_area)); in fcb_rotate()
39 fcb->f_active_id++; in fcb_rotate()
41 fcb->f_oldest = fcb_getnext_sector(fcb, fcb->f_oldest); in fcb_rotate()
43 k_mutex_unlock(&fcb->f_mtx); in fcb_rotate()