rusEFI
The most advanced open source ECU
|
Higher-level logic of saving data into internal flash memory.
Definition in file flash_main.cpp.
Functions | |
void | writeToFlashNow () |
void | setNeedToWriteConfiguration () |
bool | settingsLtftRequestWriteToFlash () |
bool | writeToFlashNowImpl () |
static StorageStatus | validatePersistentState () |
static StorageStatus | readConfiguration () |
void | readFromFlash () |
static void | doWriteConfigurationToFlash () |
static void | doResetConfiguration () |
static void | doRewriteConfig () |
static void | doWriteLTFT () |
void | initFlash () |
|
static |
Definition at line 149 of file flash_main.cpp.
Referenced by doRewriteConfig(), and initFlash().
|
static |
Definition at line 153 of file flash_main.cpp.
Referenced by initFlash().
|
static |
Definition at line 144 of file flash_main.cpp.
Referenced by initFlash().
|
static |
Definition at line 159 of file flash_main.cpp.
Referenced by initFlash().
void initFlash | ( | ) |
This would write NOW (you should not be doing this while connected to real engine)
This would schedule write to flash once the engine is stopped
Definition at line 163 of file flash_main.cpp.
Referenced by initHardwareNoConfig().
|
static |
this method could and should be executed before we have any connectivity so no console output here
in this method we read first copy of configuration in flash. if that first copy has CRC or other issues we read second copy.
Definition at line 94 of file flash_main.cpp.
Referenced by readFromFlash().
void readFromFlash | ( | ) |
Definition at line 114 of file flash_main.cpp.
Referenced by initFlash(), and loadConfiguration().
void setNeedToWriteConfiguration | ( | ) |
Definition at line 43 of file flash_main.cpp.
Referenced by LongTermIdleTrim::checkIfShouldSave(), and requestBurn().
bool settingsLtftRequestWriteToFlash | ( | ) |
Definition at line 49 of file flash_main.cpp.
Referenced by doWriteLTFT(), and LtftState::load().
|
static |
Definition at line 71 of file flash_main.cpp.
Referenced by readConfiguration().
void writeToFlashNow | ( | ) |
Because of hardware-related issues, some stm32f4/7 chips are totally frozen while we are writing to internal flash. Writing the configuration takes about 1-2 seconds, we cannot afford to do that while the engine is running so we postpone the write until the engine is stopped.
Definition at line 37 of file flash_main.cpp.
Referenced by doRewriteConfig(), doWriteConfigurationToFlash(), handleCommandX14(), loadConfiguration(), and setEngineType().
bool writeToFlashNowImpl | ( | ) |
Definition at line 54 of file flash_main.cpp.
Referenced by storageWriteID().