rusEFI
The most advanced open source ECU
Loading...
Searching...
No Matches
Functions | Variables
storage_mfs.cpp File Reference

Detailed Description

Storage interface to ChibiOS MFS driver.

Date
Jan 4, 2025
Author
Andrey Gusakov

Definition in file storage_mfs.cpp.

Functions

bool boardInitMfs (void)
 
const MFSConfig * boardGetMfsConfig (void)
 
bool initStorageMfs ()
 

Variables

static MFSDriver mfsd
 
static NO_CACHE mfs_nocache_buffer_t mfsbuf
 

Function Documentation

◆ boardGetMfsConfig()

const MFSConfig * boardGetMfsConfig ( void  )
extern

Definition at line 36 of file board_storage.cpp.

37{
38 return &mfscfg1;
39}
const MFSConfig mfscfg1

Referenced by initStorageMfs().

Here is the caller graph for this function:

◆ boardInitMfs()

bool boardInitMfs ( void  )
extern

Definition at line 28 of file board_storage.cpp.

29{
30 /* Starting EFL driver.*/
31 eflStart(&EFLD2, NULL);
32
33 return true;
34}

Referenced by initStorageMfs().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ initStorageMfs()

bool initStorageMfs ( )

Definition at line 125 of file storage_mfs.cpp.

125 {
126 if (boardInitMfs() == false) {
127 return false;
128 }
129
130 const MFSConfig *mfsConfig = boardGetMfsConfig();
131
132 /* MFS */
133 mfsObjectInit(&mfsd, &mfsbuf);
134 mfs_error_t err = mfsStart(&mfsd, mfsConfig);
135 if (err < MFS_NO_ERROR) {
136 efiPrintf("MFS: storage failed to start: %d", err);
137 return false;
138 }
139
140 //addConsoleAction("erasestorage", eraseStorage);
141
142 storageMFS.m_ready = true;
143
145}
bool storageRegisterStorage(StorageType type, SettingStorageBase *storage)
Definition storage.cpp:194
@ STORAGE_MFS_EXT_FLASH
Definition storage.h:40
static NO_CACHE mfs_nocache_buffer_t mfsbuf
bool boardInitMfs(void)
const MFSConfig * boardGetMfsConfig(void)
static MFSDriver mfsd

Referenced by initStorage(), and storageManagerThread().

Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ mfsbuf

NO_CACHE mfs_nocache_buffer_t mfsbuf
static

Definition at line 118 of file storage_mfs.cpp.

Referenced by initStorageMfs().

◆ mfsd

static SettingStorageMFS storageMFS & mfsd
static

Definition at line 117 of file storage_mfs.cpp.

Referenced by initStorageMfs().

Go to the source code of this file.