mirror of
https://github.com/esp8266/Arduino.git
synced 2025-07-13 02:22:55 +03:00
Make SPIFFS and LittleFS stay out of link when not needed (#6699)
* define two weak functions defaulting to no-op redefine them to do something useful when either spiffs or littlefs are used * noop * single entry point for closing FSes * rename functions, override when instanciated, add link to explanation * spiffs: call end on destructor
This commit is contained in:
@ -190,6 +190,14 @@ int LittleFSImpl::lfs_flash_sync(const struct lfs_config *c) {
|
||||
|
||||
#if !defined(NO_GLOBAL_INSTANCES) && !defined(NO_GLOBAL_LITTLEFS)
|
||||
FS LittleFS = FS(FSImplPtr(new littlefs_impl::LittleFSImpl(FS_PHYS_ADDR, FS_PHYS_SIZE, FS_PHYS_PAGE, FS_PHYS_BLOCK, FS_MAX_OPEN_FILES)));
|
||||
|
||||
extern "C" void littlefs_request_end(void)
|
||||
{
|
||||
// override default weak function
|
||||
//ets_printf("debug: not weak littlefs end\n");
|
||||
LittleFS.end();
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
#endif // !CORE_MOCK
|
||||
|
Reference in New Issue
Block a user