8 #ifndef SPIFFS_CONFIG_H_
9 #define SPIFFS_CONFIG_H_
18 #define c_memcpy memcpy
19 #define c_printf ets_printf
20 #define c_memset memset
22 typedef int16_t file_t;
23 typedef int32_t s32_t;
24 typedef uint32_t u32_t;
25 typedef int16_t s16_t;
26 typedef uint16_t u16_t;
50 #define SPIFFS_DBG(...) //printf(__VA_ARGS__)
54 #define SPIFFS_GC_DBG(...) //printf(__VA_ARGS__)
57 #ifndef SPIFFS_CACHE_DBG
58 #define SPIFFS_CACHE_DBG(...) //printf(__VA_ARGS__)
61 #ifndef SPIFFS_CHECK_DBG
62 #define SPIFFS_CHECK_DBG(...) //printf(__VA_ARGS__)
68 #ifndef SPIFFS_BUFFER_HELP
69 #define SPIFFS_BUFFER_HELP 1
75 #define SPIFFS_CACHE 1
79 #ifndef SPIFFS_CACHE_WR
80 #define SPIFFS_CACHE_WR 1
84 #ifndef SPIFFS_CACHE_STATS
85 #define SPIFFS_CACHE_STATS 0
91 #ifndef SPIFFS_PAGE_CHECK
92 #define SPIFFS_PAGE_CHECK 1
96 #ifndef SPIFFS_GC_MAX_RUNS
97 #define SPIFFS_GC_MAX_RUNS 5
101 #ifndef SPIFFS_GC_STATS
102 #define SPIFFS_GC_STATS 0
114 #ifndef SPIFFS_GC_HEUR_W_DELET
115 #define SPIFFS_GC_HEUR_W_DELET (5)
118 #ifndef SPIFFS_GC_HEUR_W_USED
119 #define SPIFFS_GC_HEUR_W_USED (-1)
123 #ifndef SPIFFS_GC_HEUR_W_ERASE_AGE
124 #define SPIFFS_GC_HEUR_W_ERASE_AGE (50)
128 #ifndef SPIFFS_OBJ_NAME_LEN
129 #define SPIFFS_OBJ_NAME_LEN (32)
135 #ifndef SPIFFS_COPY_BUFFER_STACK
136 #define SPIFFS_COPY_BUFFER_STACK (64)
143 #ifndef SPIFFS_USE_MAGIC
144 #define SPIFFS_USE_MAGIC (1)
152 #define SPIFFS_LOCK(fs)
155 #ifndef SPIFFS_UNLOCK
156 #define SPIFFS_UNLOCK(fs)
163 #ifndef SPIFFS_SINGLETON
164 #define SPIFFS_SINGLETON 0
170 #ifndef SPIFFS_CFG_PHYS_SZ
171 #define SPIFFS_CFG_PHYS_SZ(ignore) (1024*1024*2)
173 #ifndef SPIFFS_CFG_PHYS_ERASE_SZ
174 #define SPIFFS_CFG_PHYS_ERASE_SZ(ignore) (65536)
176 #ifndef SPIFFS_CFG_PHYS_ADDR
177 #define SPIFFS_CFG_PHYS_ADDR(ignore) (0)
179 #ifndef SPIFFS_CFG_LOG_PAGE_SZ
180 #define SPIFFS_CFG_LOG_PAGE_SZ(ignore) (256)
182 #ifndef SPIFFS_CFG_LOG_BLOCK_SZ
183 #define SPIFFS_CFG_LOG_BLOCK_SZ(ignore) (65536)
188 #ifndef SPIFFS_ALIGNED_OBJECT_INDEX_TABLES
189 #define SPIFFS_ALIGNED_OBJECT_INDEX_TABLES 1
193 #ifndef SPIFFS_HAL_CALLBACK_EXTRA
194 #define SPIFFS_HAL_CALLBACK_EXTRA 0
203 #ifndef SPIFFS_FILEHDL_OFFSET
204 #define SPIFFS_FILEHDL_OFFSET 0
210 #ifndef SPIFFS_TEST_VISUALISATION
211 #define SPIFFS_TEST_VISUALISATION 1
213 #if SPIFFS_TEST_VISUALISATION
214 #ifndef spiffs_printf
215 #define spiffs_printf(...) c_printf(__VA_ARGS__)
218 #ifndef SPIFFS_TEST_VIS_FREE_STR
219 #define SPIFFS_TEST_VIS_FREE_STR "_"
222 #ifndef SPIFFS_TEST_VIS_DELE_STR
223 #define SPIFFS_TEST_VIS_DELE_STR "/"
226 #ifndef SPIFFS_TEST_VIS_INDX_STR
227 #define SPIFFS_TEST_VIS_INDX_STR(id) "i"
230 #ifndef SPIFFS_TEST_VIS_DATA_STR
231 #define SPIFFS_TEST_VIS_DATA_STR(id) "d"
242 typedef u16_t spiffs_block_ix;
245 typedef u16_t spiffs_page_ix;
249 typedef u16_t spiffs_obj_id;
253 typedef u16_t spiffs_span_ix;