mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-20 14:55:21 +03:00
Declare eepromData for all builds that require it, rather than having
the target.c define it.
This commit is contained in:
parent
9c274240d8
commit
58f43634bd
2 changed files with 9 additions and 1 deletions
|
@ -27,6 +27,15 @@
|
||||||
|
|
||||||
#include "config/config_streamer.h"
|
#include "config/config_streamer.h"
|
||||||
|
|
||||||
|
#if !defined(EEPROM_IN_FLASH)
|
||||||
|
#if defined(EEPROM_IN_RAM) && defined(PERSISTENT)
|
||||||
|
PERSISTENT uint8_t eepromData[EEPROM_SIZE];
|
||||||
|
#else
|
||||||
|
uint8_t eepromData[EEPROM_SIZE];
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
#if defined(STM32H750xx) && !(defined(EEPROM_IN_EXTERNAL_FLASH) || defined(EEPROM_IN_RAM) || defined(EEPROM_IN_SDCARD))
|
#if defined(STM32H750xx) && !(defined(EEPROM_IN_EXTERNAL_FLASH) || defined(EEPROM_IN_RAM) || defined(EEPROM_IN_SDCARD))
|
||||||
#error "STM32750xx only has one flash page which contains the bootloader, no spare flash pages available, use external storage for persistent config or ram for target testing"
|
#error "STM32750xx only has one flash page which contains the bootloader, no spare flash pages available, use external storage for persistent config or ram for target testing"
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -468,7 +468,6 @@ char _Min_Stack_Size;
|
||||||
|
|
||||||
// fake EEPROM
|
// fake EEPROM
|
||||||
static FILE *eepromFd = NULL;
|
static FILE *eepromFd = NULL;
|
||||||
uint8_t eepromData[EEPROM_SIZE];
|
|
||||||
|
|
||||||
void FLASH_Unlock(void) {
|
void FLASH_Unlock(void) {
|
||||||
if (eepromFd != NULL) {
|
if (eepromFd != NULL) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue