mirror of
https://github.com/esp8266/Arduino.git
synced 2025-04-24 08:45:10 +03:00
* 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
34 lines
681 B
C++
34 lines
681 B
C++
/*
|
|
* no-op implementations
|
|
* used/linked when no strong implementation already exists elsewhere
|
|
*/
|
|
|
|
#include <FS.h>
|
|
|
|
extern "C"
|
|
{
|
|
|
|
void close_all_fs(void)
|
|
{
|
|
littlefs_request_end();
|
|
spiffs_request_end();
|
|
}
|
|
|
|
// default weak definitions
|
|
// they are overriden in their respective real implementation
|
|
// hint: https://github.com/esp8266/Arduino/pull/6699#issuecomment-549085382
|
|
|
|
void littlefs_request_end(void) __attribute__((weak));
|
|
void littlefs_request_end(void)
|
|
{
|
|
//ets_printf("debug: noop: littlefs_request_end\n");
|
|
}
|
|
|
|
void spiffs_request_end(void) __attribute__((weak));
|
|
void spiffs_request_end(void)
|
|
{
|
|
//ets_printf("debug: noop: spiffs_request_end\n");
|
|
}
|
|
|
|
}
|