replaced '4096' with definition SPI_FLASH_SEC_SIZE from header file

This commit is contained in:
Alex Shepherd
2016-08-20 17:36:47 +12:00
parent d3059d2f4e
commit 3eee73f6cd
2 changed files with 47 additions and 47 deletions

View File

@@ -1011,7 +1011,7 @@ void NmraDcc::initAccessoryDecoder( uint8_t ManufacturerId, uint8_t VersionId, u
void NmraDcc::init( uint8_t ManufacturerId, uint8_t VersionId, uint8_t Flags, uint8_t OpsModeAddressBaseCV ) void NmraDcc::init( uint8_t ManufacturerId, uint8_t VersionId, uint8_t Flags, uint8_t OpsModeAddressBaseCV )
{ {
#if defined(ESP8266) #if defined(ESP8266)
EEPROM.begin(4096); EEPROM.begin(MAXCV);
#endif #endif
// Clear all the static member variables // Clear all the static member variables
memset( &DccRx, 0, sizeof( DccRx) ); memset( &DccRx, 0, sizeof( DccRx) );

View File

@@ -91,7 +91,7 @@ typedef struct
#define CV_29_CONFIG 29 #define CV_29_CONFIG 29
#if defined(ESP8266) #if defined(ESP8266)
#define MAXCV 4096 #define MAXCV SPI_FLASH_SEC_SIZE
#else #else
#define MAXCV E2END // the upper limit of the CV value currently defined to max memory. #define MAXCV E2END // the upper limit of the CV value currently defined to max memory.
#endif #endif