1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-04-25 20:02:37 +03:00

added macro for maximum open SPIFFS files, settings it to 1 saves about 1k heap. (#2167)

This commit is contained in:
Tijn Kooijmans 2016-06-20 06:09:21 +02:00 committed by Ivan Grokhotkov
parent 3bfd5d51b4
commit 3b81557810

View File

@ -120,11 +120,15 @@ extern "C" uint32_t _SPIFFS_block;
#define SPIFFS_PHYS_PAGE ((uint32_t) &_SPIFFS_page)
#define SPIFFS_PHYS_BLOCK ((uint32_t) &_SPIFFS_block)
#ifndef SPIFFS_MAX_OPEN_FILES
#define SPIFFS_MAX_OPEN_FILES 5
#endif
FS SPIFFS = FS(FSImplPtr(new SPIFFSImpl(
SPIFFS_PHYS_ADDR,
SPIFFS_PHYS_SIZE,
SPIFFS_PHYS_PAGE,
SPIFFS_PHYS_BLOCK,
5)));
SPIFFS_MAX_OPEN_FILES)));
#endif