diff --git a/cores/esp8266/flash_utils.h b/cores/esp8266/flash_utils.h index 67dc6ebadd..66730b4b5b 100644 --- a/cores/esp8266/flash_utils.h +++ b/cores/esp8266/flash_utils.h @@ -21,6 +21,9 @@ #ifndef FLASH_UTILS_H #define FLASH_UTILS_H +#include "c_types.h" +#include "spi_flash.h" + #ifdef __cplusplus extern "C" { #endif @@ -31,7 +34,7 @@ int SPIRead(uint32_t addr, void *dest, size_t size); int SPIWrite(uint32_t addr, void *src, size_t size); int SPIEraseAreaEx(const uint32_t start, const uint32_t size); -#define FLASH_SECTOR_SIZE 0x1000 +#define FLASH_SECTOR_SIZE SPI_FLASH_SEC_SIZE #define FLASH_BLOCK_SIZE 0x10000 #define APP_START_OFFSET 0x1000