mirror of
https://github.com/esp8266/Arduino.git
synced 2025-07-24 19:42:27 +03:00
Update to the latest SPIFFS git and cleanup
Almost unmodified spiffs from github lots of NodeMCU leftovers are removed More proper names given to platform related files Adjusting the FS class for the changes
This commit is contained in:
44
cores/esp8266/spiffs/spiffs_config.h
Executable file → Normal file
44
cores/esp8266/spiffs/spiffs_config.h
Executable file → Normal file
@ -8,24 +8,11 @@
|
||||
#ifndef SPIFFS_CONFIG_H_
|
||||
#define SPIFFS_CONFIG_H_
|
||||
|
||||
// ----------- 8< ------------
|
||||
// Following includes are for the linux test build of spiffs
|
||||
// These may/should/must be removed/altered/replaced in your target
|
||||
// #include "params_test.h"
|
||||
//#include "c_stdio.h"
|
||||
//#include "c_stdlib.h"
|
||||
//#include "c_string.h"
|
||||
#include "mem.h"
|
||||
#include "c_types.h"
|
||||
#include "stddef.h"
|
||||
#include "osapi.h"
|
||||
#include "ets_sys.h"
|
||||
// ----------- >8 ------------
|
||||
#define IRAM_ATTR __attribute__((section(".iram.text")))
|
||||
#define STORE_TYPEDEF_ATTR __attribute__((aligned(4),packed))
|
||||
#define STORE_ATTR __attribute__((aligned(4)))
|
||||
|
||||
#define SPIFFS_CHACHE 0
|
||||
|
||||
#define c_memcpy os_memcpy
|
||||
#define c_printf os_printf
|
||||
@ -56,24 +43,22 @@ typedef uint8_t u8_t;
|
||||
#endif
|
||||
|
||||
// compile time switches
|
||||
#define debugf(fmt, ...) //os_printf(fmt"\r\n", ##__VA_ARGS__)
|
||||
#define SYSTEM_ERROR(fmt, ...) //os_printf("ERROR: " fmt "\r\n", ##__VA_ARGS__)
|
||||
|
||||
// Set generic spiffs debug output call.
|
||||
#ifndef SPIFFS_DGB
|
||||
#define SPIFFS_DBG(...) //os_printf(__VA_ARGS__)
|
||||
#define SPIFFS_DBG(...) //c_printf(__VA_ARGS__)
|
||||
#endif
|
||||
// Set spiffs debug output call for garbage collecting.
|
||||
#ifndef SPIFFS_GC_DGB
|
||||
#define SPIFFS_GC_DBG(...) //os_printf(__VA_ARGS__)
|
||||
#define SPIFFS_GC_DBG(...) //c_printf(__VA_ARGS__)
|
||||
#endif
|
||||
// Set spiffs debug output call for caching.
|
||||
#ifndef SPIFFS_CACHE_DGB
|
||||
#define SPIFFS_CACHE_DBG(...) //os_printf(__VA_ARGS__)
|
||||
#define SPIFFS_CACHE_DBG(...) //c_printf(__VA_ARGS__)
|
||||
#endif
|
||||
// Set spiffs debug output call for system consistency checks.
|
||||
#ifndef SPIFFS_CHECK_DGB
|
||||
#define SPIFFS_CHECK_DBG(...) //os_printf(__VA_ARGS__)
|
||||
#define SPIFFS_CHECK_DBG(...) //c_printf(__VA_ARGS__)
|
||||
#endif
|
||||
|
||||
// Enable/disable API functions to determine exact number of bytes
|
||||
@ -108,7 +93,7 @@ typedef uint8_t u8_t;
|
||||
|
||||
// Define maximum number of gc runs to perform to reach desired free pages.
|
||||
#ifndef SPIFFS_GC_MAX_RUNS
|
||||
#define SPIFFS_GC_MAX_RUNS 3
|
||||
#define SPIFFS_GC_MAX_RUNS 5
|
||||
#endif
|
||||
|
||||
// Enable/disable statistics on gc. Debug/test purpose only.
|
||||
@ -150,14 +135,22 @@ typedef uint8_t u8_t;
|
||||
#define SPIFFS_COPY_BUFFER_STACK (64)
|
||||
#endif
|
||||
|
||||
// Enable this to have an identifiable spiffs filesystem. This will look for
|
||||
// a magic in all sectors to determine if this is a valid spiffs system or
|
||||
// not on mount point. If not, SPIFFS_format must be called prior to mounting
|
||||
// again.
|
||||
#ifndef SPIFFS_USE_MAGIC
|
||||
#define SPIFFS_USE_MAGIC (0)
|
||||
#endif
|
||||
|
||||
// SPIFFS_LOCK and SPIFFS_UNLOCK protects spiffs from reentrancy on api level
|
||||
// These should be defined on a multithreaded system
|
||||
|
||||
// define this to entering a mutex if you're running on a multithreaded system
|
||||
// define this to enter a mutex if you're running on a multithreaded system
|
||||
#ifndef SPIFFS_LOCK
|
||||
#define SPIFFS_LOCK(fs)
|
||||
#endif
|
||||
// define this to exiting a mutex if you're running on a multithreaded system
|
||||
// define this to exit a mutex if you're running on a multithreaded system
|
||||
#ifndef SPIFFS_UNLOCK
|
||||
#define SPIFFS_UNLOCK(fs)
|
||||
#endif
|
||||
@ -190,7 +183,12 @@ typedef uint8_t u8_t;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// Set SPFIFS_TEST_VISUALISATION to non-zero to enable SPIFFS_vis function
|
||||
// Enable this if your target needs aligned data for index tables
|
||||
#ifndef SPIFFS_ALIGNED_OBJECT_INDEX_TABLES
|
||||
#define SPIFFS_ALIGNED_OBJECT_INDEX_TABLES 1
|
||||
#endif
|
||||
|
||||
// Set SPIFFS_TEST_VISUALISATION to non-zero to enable SPIFFS_vis function
|
||||
// in the api. This function will visualize all filesystem using given printf
|
||||
// function.
|
||||
#ifndef SPIFFS_TEST_VISUALISATION
|
||||
|
Reference in New Issue
Block a user