mirror of
https://github.com/esp8266/Arduino.git
synced 2025-06-12 01:53:07 +03:00
flash-size agnostic builds (#6690)
* flash: mapping definition by sketch at runtime depending on flash chip size and user configuration
This commit is contained in:
@ -31,7 +31,7 @@ extern "C" {
|
||||
#include "spi_flash.h"
|
||||
}
|
||||
|
||||
extern "C" uint32_t _EEPROM_start;
|
||||
#include <flash_hal.h>
|
||||
|
||||
EEPROMClass::EEPROMClass(uint32_t sector)
|
||||
: _sector(sector)
|
||||
@ -39,7 +39,7 @@ EEPROMClass::EEPROMClass(uint32_t sector)
|
||||
}
|
||||
|
||||
EEPROMClass::EEPROMClass(void)
|
||||
: _sector((((uint32_t)&_EEPROM_start - 0x40200000) / SPI_FLASH_SEC_SIZE))
|
||||
: _sector(((EEPROM_start - 0x40200000) / SPI_FLASH_SEC_SIZE))
|
||||
{
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user