Skip to content

Commit fd7c5d5

Browse files
author
ficeto
committed
amost broke it
1 parent 028e3d8 commit fd7c5d5

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

hardware/esp8266com/esp8266/cores/esp8266/FileSystem.cpp

+4-4
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,8 @@ int FSClass::_mountInternal(){
5151
SPIFFS_API_DBG_E("Can't start file system, wrong address\r\n");
5252
return SPIFFS_ERR_NOT_CONFIGURED;
5353
}
54-
if(_SPIFFS_page == 0) _SPIFFS_page = 256;
55-
if(_SPIFFS_block == 0) _SPIFFS_block = 4096;
54+
if(_pageSize == 0) _pageSize = 256;
55+
if(_blockSize == 0) _blockSize = 4096;
5656

5757
spiffs_config cfg = {0};
5858
cfg.phys_addr = _beginAddress;
@@ -66,10 +66,10 @@ int FSClass::_mountInternal(){
6666

6767
SPIFFS_API_DBG_V("FSClass::_mountInternal: start:%x, size:%d Kb\n", cfg.phys_addr, cfg.phys_size / 1024);
6868

69-
_work.reset(new uint8_t[2*_SPIFFS_page]);
69+
_work.reset(new uint8_t[2*_pageSize]);
7070
_fdsSize = 32 * _maxOpenFiles;
7171
_fds.reset(new uint8_t[_fdsSize]);
72-
_cacheSize = (32 + _SPIFFS_page) * _maxOpenFiles;
72+
_cacheSize = (32 + _pageSize) * _maxOpenFiles;
7373
_cache.reset(new uint8_t[_cacheSize]);
7474

7575
s32_t res = SPIFFS_mount(&_fs,

0 commit comments

Comments
 (0)