Browse Source

Ignoring SINGLETON build in cache setup (thanks Luca)

pull/31/merge
Peter Andersson 9 years ago
parent
commit
b061a04ef0
  1. 3
      src/spiffs_hydrogen.c

3
src/spiffs_hydrogen.c

@ -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

Loading…
Cancel
Save