Added ESP:: functions for sketch size (#2028)

* Added ESP:: functions for sketch size

* Fixed free space name to match ESP8266
This commit is contained in:
lbernstone
2018-11-19 08:03:36 -08:00
committed by Me No Dev
parent 273196d7e6
commit af79e18ecb
2 changed files with 38 additions and 14 deletions

View File

@ -50,6 +50,11 @@ typedef enum {
FM_UNKNOWN = 0xff
} FlashMode_t;
typedef enum {
SKETCH_SIZE_TOTAL = 0,
SKETCH_SIZE_FREE = 1
} sketchSize_t;
class EspClass
{
public:
@ -84,6 +89,9 @@ public:
uint32_t magicFlashChipSpeed(uint8_t byte);
FlashMode_t magicFlashChipMode(uint8_t byte);
uint32_t getSketchSize();
uint32_t getFreeSketchSpace();
bool flashEraseSector(uint32_t sector);
bool flashWrite(uint32_t offset, uint32_t *data, size_t size);
bool flashRead(uint32_t offset, uint32_t *data, size_t size);