Lines Matching full:fcb

26  * @defgroup fcb Flash Circular Buffer (FCB)
36 * @ingroup fcb
43 * @brief FCB entry info structure. This data structure describes the element
48 * Entry location is pointer to area (within fcb->f_sectors), and offset
61 uint16_t fe_data_len; /**< Size of data area in fcb entry*/
66 * the fcb flash_area start offset.
68 * @param entry fcb entry structure
73 * @brief Structure for transferring complete information about FCB entry
77 struct fcb_entry loc; /**< FCB entry info */
88 * @brief FCB instance structure
90 * The following data structure describes the FCB itself. First part should
92 * used by FCB for its internal bookkeeping.
94 struct fcb { struct
99 * the beginning of FCB flash sector. FCB uses this when determining
109 * to have scratch space for garbage collecting when FCB fills up.
117 /**< Locking for accessing the FCB data, internal state */
132 /**< Flash area used by the fcb instance, internal state. argument
133 * This can be transfer to FCB user
142 /**< Flags for configuring the FCB. */
152 * @defgroup fcb_api fcb API argument
153 * @ingroup fcb
158 * Initialize FCB instance.
160 * @param[in] f_area_id ID of flash area where fcb storage resides.
161 * @param[in,out] fcbp FCB instance structure.
165 int fcb_init(int f_area_id, struct fcb *fcbp);
172 * flash_area_write() to fcb flash_area.
175 * @param[in] fcbp FCB instance structure.
182 int fcb_append(struct fcb *fcbp, uint16_t len, struct fcb_entry *loc);
187 * @param[in] fcbp FCB instance structure.
192 int fcb_append_finish(struct fcb *fcbp, struct fcb_entry *append_loc);
195 * FCB Walk callback function type.
197 * Type of function which is expected to be called while walking over fcb
212 * Walk over all entries in the FCB sector
214 * @param[in] sector fcb sector to be walked. If null, traverse entire
216 * @param[in] fcbp FCB instance structure.
226 int fcb_walk(struct fcb *fcbp, struct flash_sector *sector, fcb_walk_cb cb, void *cb_arg);
229 * Get next fcb entry location.
231 * Function to obtain fcb entry location in relation to entry pointed by
234 * fcb entry location.
236 * FCB storage. loc->fe_sector is set and loc->fe_elem_off is 0 function fetches
237 * the first entry location in the fcb sector.
239 * @param[in] fcbp FCB instance structure.
244 int fcb_getnext(struct fcb *fcbp, struct fcb_entry *loc);
247 * Rotate fcb sectors
252 * @param[in] fcbp FCB instance structure.
254 int fcb_rotate(struct fcb *fcbp);
262 * @param[in] fcbp FCB instance structure.
266 int fcb_append_to_scratch(struct fcb *fcbp);
271 * @param[in] fcbp FCB instance structure.
275 int fcb_free_sector_cnt(struct fcb *fcbp);
278 * Check whether FCB has any data.
280 * @param[in] fcbp FCB instance structure.
282 * @return Positive value if fcb is empty, otherwise 0.
284 int fcb_is_empty(struct fcb *fcbp);
287 * Finds the fcb entry that gives back up to n entries at the end.
289 * @param[in] fcbp FCB instance structure.
290 * @param[in] entries number of fcb entries the user wants to get
295 int fcb_offset_last_n(struct fcb *fcbp, uint8_t entries, struct fcb_entry *last_n_entry);
298 * Clear fcb instance storage.
300 * @param[in] fcbp FCB instance structure.
304 int fcb_clear(struct fcb *fcbp);
312 * @defgroup fcb_internal fcb non-API prototypes
313 * @ingroup fcb
318 * Read raw data from the fcb flash sector.
320 * @param[in] fcbp FCB instance structure.
321 * @param[in] sector FCB sector.
328 int fcb_flash_read(const struct fcb *fcbp, const struct flash_sector *sector, off_t off,
332 * Write raw data to the fcb flash sector.
334 * @param[in] fcbp FCB instance structure.
335 * @param[in] sector FCB sector.
342 int fcb_flash_write(const struct fcb *fcbp, const struct flash_sector *sector, off_t off,