Skip to content

Commit

Permalink
added macro for maximum open SPIFFS files, settings it to 1 saves abo…
Browse files Browse the repository at this point in the history
…ut 1k heap. (esp8266#2167)
  • Loading branch information
tijnkooijmans authored and igrr committed Jun 20, 2016
1 parent 3bfd5d5 commit 3b81557
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion cores/esp8266/spiffs_api.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 3b81557

Please sign in to comment.