1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-15 04:15:44 +03:00

Allow SDCARD to be used for config/eeprom storage.

* On boot SPI or SDIO is initialised.
* Filesystem is initialised (including creation of blackbox freespace
file)
* Empty config file is created if it doesn't exist, or read if it does.
* If config is invalid/empty then config file is written to, then read
back and verified.

Enable as follows.

target.h:

target.c:
uint8_t eepromData[EEPROM_SIZE];

Changes:
- Replace boolean init flags with single initFlags variables.
- Avoid unused variable warnings.
This commit is contained in:
Dominic Clifton 2019-06-12 15:19:14 +02:00 committed by mikeller
parent 576a1a2817
commit 9c274240d8
6 changed files with 259 additions and 35 deletions

View file

@ -3315,6 +3315,7 @@ static void cliRebootEx(bool bootLoader)
bufWriterFlush(cliWriter);
waitForSerialPortToFinishTransmitting(cliPort);
stopPwmAllMotors();
if (bootLoader) {
systemResetToBootloader();
return;