|
@ -91,9 +91,10 @@ s32_t SPIFFS_mount(spiffs *fs, spiffs_config *config, u8_t *work, |
|
|
if (cache_size & (ptr_size-1)) { |
|
|
if (cache_size & (ptr_size-1)) { |
|
|
cache_size -= (cache_size & (ptr_size-1)); |
|
|
cache_size -= (cache_size & (ptr_size-1)); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
#if SPIFFS_CACHE |
|
|
#if SPIFFS_CACHE |
|
|
fs->cache = cache; |
|
|
fs->cache = cache; |
|
|
fs->cache_size = (cache_size > (config->log_page_size*32)) ? config->log_page_size*32 : cache_size; |
|
|
fs->cache_size = (cache_size > (SPIFFS_CFG_LOG_PAGE_SZ(fs)*32)) ? SPIFFS_CFG_LOG_PAGE_SZ(fs)*32 : cache_size; |
|
|
spiffs_cache_init(fs); |
|
|
spiffs_cache_init(fs); |
|
|
#endif |
|
|
#endif |
|
|
|
|
|
|
|
|