52#include "spiffs_config.h"
58#define SPIFFS_DIR_SIZE (12)
60#if (VFS_DIR_BUFFER_SIZE < SPIFFS_DIR_SIZE)
61#error "VFS_DIR_BUFFER_SIZE too small"
68#ifndef SPIFFS_FS_CACHE_SIZE
69#if SPIFFS_CACHE || defined(DOXYGEN)
77#define SPIFFS_FS_CACHE_SIZE (512)
79#define SPIFFS_FS_CACHE_SIZE (0)
82#ifndef SPIFFS_FS_WORK_SIZE
90#define SPIFFS_FS_WORK_SIZE (512)
92#ifndef SPIFFS_FS_FD_SPACE_SIZE
99#define SPIFFS_FS_FD_SPACE_SIZE (4 * 32)
110#if (SPIFFS_CACHE == 1) || defined(DOXYGEN)
116#if (SPIFFS_HAL_CALLBACK_EXTRA == 1) || defined(DOXYGEN)
119#if (SPIFFS_SINGLETON == 0) || defined(DOXYGEN)
#define SPIFFS_FS_WORK_SIZE
The size of the work buffer.
void spiffs_lock(struct spiffs_t *fs)
SPIFFS lock function.
struct spiffs_desc spiffs_desc_t
This contains everything needed to run an instance of SPIFFS.
void spiffs_unlock(struct spiffs_t *fs)
SPIFFS unlock function.
#define SPIFFS_FS_FD_SPACE_SIZE
the size of the file descriptor buffer
const vfs_file_system_t spiffs_file_system
The SPIFFS vfs driver, a pointer to a spiffs_desc_t must be provided as vfs_mountp::private_data.
#define SPIFFS_FS_CACHE_SIZE
the size of the cache buffer
Mutex for thread synchronization.
This contains everything needed to run an instance of SPIFFS.
mutex_t lock
A lock for SPIFFS internal use.
spiffs_config config
SPIFFS config, filled at mount time depending on the underlying mtdi_dev_t dev.
uint8_t work[SPIFFS_FS_WORK_SIZE]
SPIFFS work buffer.
uint32_t block_count
Number of blocks in current partition, if 0, the mtd number of sector is used.
uint8_t cache[SPIFFS_FS_CACHE_SIZE]
SPIFFS cache.
mtd_dev_t * dev
The underlying mtd device, must be set by user.
spiffs fs
The SPIFFS struct.
uint32_t base_addr
Base address of partition.
uint8_t fd_space[SPIFFS_FS_FD_SPACE_SIZE]
SPIFFS file descriptor cache.