ChibiOS  21.6.0
MFSDriver Struct Reference

Type of an MFS instance. More...

#include <hal_mfs.h>

Collaboration diagram for MFSDriver:
Collaboration graph

Data Fields

mfs_state_t state
 Driver state. More...
 
const MFSConfigconfig
 Current configuration data. More...
 
mfs_bank_t current_bank
 Bank currently in use. More...
 
uint32_t current_counter
 Usage counter of the current bank. More...
 
flash_offset_t next_offset
 Pointer to the next free position in the current bank. More...
 
flash_offset_t used_space
 Used space in the current bank without considering erased records. More...
 
mfs_record_descriptor_t descriptors [MFS_CFG_MAX_RECORDS]
 Offsets of the most recent instance of the records. More...
 
flash_offset_t tr_next_offset
 Next write offset for current transaction. More...
 
flash_offset_t tr_limit_offet
 Maximum offset for the transaction. More...
 
uint32_t tr_nops
 Number of buffered operations in current transaction. More...
 
mfs_transaction_op_t tr_ops [MFS_CFG_TRANSACTION_MAX]
 Buffered operations in current transaction. More...
 
union {
buffer
 Transient buffer. More...
 

Detailed Description

Type of an MFS instance.

Definition at line 339 of file hal_mfs.h.

Field Documentation

◆ state

◆ config

const MFSConfig* MFSDriver::config

Current configuration data.

Definition at line 347 of file hal_mfs.h.

Referenced by mfs_bank_check_header(), mfs_flash_read(), and mfs_flash_write().

◆ current_bank

mfs_bank_t MFSDriver::current_bank

Bank currently in use.

Definition at line 351 of file hal_mfs.h.

Referenced by mfs_garbage_collect().

◆ current_counter

uint32_t MFSDriver::current_counter

Usage counter of the current bank.

Definition at line 355 of file hal_mfs.h.

◆ next_offset

flash_offset_t MFSDriver::next_offset

Pointer to the next free position in the current bank.

Definition at line 359 of file hal_mfs.h.

◆ used_space

flash_offset_t MFSDriver::used_space

Used space in the current bank without considering erased records.

Definition at line 363 of file hal_mfs.h.

◆ descriptors

mfs_record_descriptor_t MFSDriver::descriptors[MFS_CFG_MAX_RECORDS]

Offsets of the most recent instance of the records.

Note
Zero means that there is not a record with that id.

Definition at line 368 of file hal_mfs.h.

◆ tr_next_offset

flash_offset_t MFSDriver::tr_next_offset

Next write offset for current transaction.

Definition at line 373 of file hal_mfs.h.

◆ tr_limit_offet

flash_offset_t MFSDriver::tr_limit_offet

Maximum offset for the transaction.

Definition at line 377 of file hal_mfs.h.

◆ tr_nops

uint32_t MFSDriver::tr_nops

Number of buffered operations in current transaction.

Definition at line 381 of file hal_mfs.h.

◆ tr_ops

Buffered operations in current transaction.

Definition at line 385 of file hal_mfs.h.

◆ buffer

union { ... } MFSDriver::buffer

Transient buffer.

Referenced by mfs_bank_check_header(), and mfs_flash_copy().