Add check on EEPROM size
This commit is contained in:
parent
976a9a8053
commit
0e3afa391b
@ -4,6 +4,7 @@ int BME680BSECGetMeasure(float &t, float &p, float &h, float &iaq, float &iaqAcc
|
||||
int BME680BSECSetup();
|
||||
bool BME680BSECIsConnected();
|
||||
#else // CONFIG_ENABLE_BME680_BSEC
|
||||
#define BSEC_MAX_STATE_BLOB_SIZE 0
|
||||
int BME680BSECGetMeasure(float &, float &, float &, float &, float &) {
|
||||
return -1;
|
||||
};
|
||||
|
@ -8,6 +8,10 @@
|
||||
|
||||
#define BME680_BSEC_EEPROM_ORIG (CONFIG_EEPROM_SIZE)
|
||||
|
||||
#if (CONFIG_EEPROM_SIZE + BSEC_MAX_STATE_BLOB_SIZE) >= SPI_FLASH_SEC_SIZE
|
||||
#error "CONFIG_EEPROM_SIZE too big"
|
||||
#endif
|
||||
|
||||
char eeprom[CONFIG_EEPROM_SIZE];
|
||||
|
||||
int EepromSaveConfig(productConfig &config) {
|
||||
|
Loading…
Reference in New Issue
Block a user