55 #define SPIFFS_DBG(...)  
   59 #define SPIFFS_GC_DBG(...)  
   62 #ifndef SPIFFS_CACHE_DBG 
   63 #define SPIFFS_CACHE_DBG(...)  
   66 #ifndef SPIFFS_CHECK_DBG 
   67 #define SPIFFS_CHECK_DBG(...)  
   70 #ifndef SPIFFS_API_DBG 
   71 #define SPIFFS_API_DBG(...)  
   81 #define _SPIPRIad  "%08x" 
   85 #define _SPIPRIbl  "%04x" 
   89 #define _SPIPRIpg  "%04x" 
   93 #define _SPIPRIsp  "%04x" 
   97 #define _SPIPRIfd  "%d" 
  101 #define _SPIPRIid  "%04x" 
  105 #define _SPIPRIfl  "%02x" 
  111 #ifndef SPIFFS_BUFFER_HELP 
  112 #define SPIFFS_BUFFER_HELP              0 
  118 #define SPIFFS_CACHE                    1 
  122 #ifndef  SPIFFS_CACHE_WR 
  123 #define SPIFFS_CACHE_WR                 1 
  127 #ifndef  SPIFFS_CACHE_STATS 
  128 #define SPIFFS_CACHE_STATS              1 
  134 #ifndef SPIFFS_PAGE_CHECK 
  135 #define SPIFFS_PAGE_CHECK               1 
  139 #ifndef SPIFFS_GC_MAX_RUNS 
  140 #define SPIFFS_GC_MAX_RUNS              5 
  144 #ifndef SPIFFS_GC_STATS 
  145 #define SPIFFS_GC_STATS                 1 
  157 #ifndef SPIFFS_GC_HEUR_W_DELET 
  158 #define SPIFFS_GC_HEUR_W_DELET          (5) 
  161 #ifndef SPIFFS_GC_HEUR_W_USED 
  162 #define SPIFFS_GC_HEUR_W_USED           (-1) 
  166 #ifndef SPIFFS_GC_HEUR_W_ERASE_AGE 
  167 #define SPIFFS_GC_HEUR_W_ERASE_AGE      (50) 
  173 #ifndef SPIFFS_OBJ_NAME_LEN 
  174 #define SPIFFS_OBJ_NAME_LEN             (32) 
  187 #ifndef SPIFFS_OBJ_META_LEN 
  188 #define SPIFFS_OBJ_META_LEN             (0) 
  194 #ifndef SPIFFS_COPY_BUFFER_STACK 
  195 #define SPIFFS_COPY_BUFFER_STACK        (64) 
  202 #ifndef SPIFFS_USE_MAGIC 
  203 #define SPIFFS_USE_MAGIC                (1) 
  212 #ifndef SPIFFS_USE_MAGIC_LENGTH 
  213 #define SPIFFS_USE_MAGIC_LENGTH         (0) 
  226 #define SPIFFS_LOCK(fs) spiffs_lock(fs) 
  229 #ifndef SPIFFS_UNLOCK 
  230 #define SPIFFS_UNLOCK(fs) spiffs_unlock(fs) 
  236 #ifndef SPIFFS_SINGLETON 
  237 #define SPIFFS_SINGLETON 0 
  243 #ifndef SPIFFS_CFG_PHYS_SZ 
  244 #define SPIFFS_CFG_PHYS_SZ(ignore)        (1024*1024*2) 
  246 #ifndef SPIFFS_CFG_PHYS_ERASE_SZ 
  247 #define SPIFFS_CFG_PHYS_ERASE_SZ(ignore)  (65536) 
  249 #ifndef SPIFFS_CFG_PHYS_ADDR 
  250 #define SPIFFS_CFG_PHYS_ADDR(ignore)      (0) 
  252 #ifndef SPIFFS_CFG_LOG_PAGE_SZ 
  253 #define SPIFFS_CFG_LOG_PAGE_SZ(ignore)    (256) 
  255 #ifndef SPIFFS_CFG_LOG_BLOCK_SZ 
  256 #define SPIFFS_CFG_LOG_BLOCK_SZ(ignore)   (65536) 
  261 #ifndef SPIFFS_ALIGNED_OBJECT_INDEX_TABLES 
  262 #define SPIFFS_ALIGNED_OBJECT_INDEX_TABLES       1 
  266 #ifndef SPIFFS_HAL_CALLBACK_EXTRA 
  267 #define SPIFFS_HAL_CALLBACK_EXTRA         1 
  276 #ifndef SPIFFS_FILEHDL_OFFSET 
  277 #define SPIFFS_FILEHDL_OFFSET                 0 
  290 #ifndef SPIFFS_READ_ONLY 
  291 #define SPIFFS_READ_ONLY                      0 
  297 #ifndef SPIFFS_TEST_VISUALISATION 
  298 #define SPIFFS_TEST_VISUALISATION         0 
  300 #if SPIFFS_TEST_VISUALISATION 
  301 #ifndef spiffs_printf 
  302 #define spiffs_printf(...)                DEBUG(__VA_ARGS__) 
  305 #ifndef SPIFFS_TEST_VIS_FREE_STR 
  306 #define SPIFFS_TEST_VIS_FREE_STR          "_" 
  309 #ifndef SPIFFS_TEST_VIS_DELE_STR 
  310 #define SPIFFS_TEST_VIS_DELE_STR          "/" 
  313 #ifndef SPIFFS_TEST_VIS_INDX_STR 
  314 #define SPIFFS_TEST_VIS_INDX_STR(id)      "i" 
  317 #ifndef SPIFFS_TEST_VIS_DATA_STR 
  318 #define SPIFFS_TEST_VIS_DATA_STR(id)      "d" 
  329 typedef uint16_t spiffs_block_ix;
 
  332 typedef uint16_t spiffs_page_ix;
 
  336 typedef uint16_t spiffs_obj_id;
 
  340 typedef uint16_t spiffs_span_ix;
 
  342 typedef uint8_t u8_t;
 
  343 typedef uint32_t u32_t;
 
  344 typedef int32_t s32_t;
 
  345 typedef uint16_t u16_t;
 
  346 typedef int16_t s16_t;
 
void spiffs_lock(struct spiffs_t *fs)
SPIFFS lock function.
 
void spiffs_unlock(struct spiffs_t *fs)
SPIFFS unlock function.