Go to the documentation of this file.
44 #ifndef FS_SPIFFS_FS_H
45 #define FS_SPIFFS_FS_H
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)
uint8_t work[SPIFFS_FS_WORK_SIZE]
SPIFFS work buffer.
spiffs_config config
SPIFFS config, filled at mount time depending on the underlying mtdi_dev_t dev.
struct spiffs_desc spiffs_desc_t
This contains everything needed to run an instance of SPIFFS.
#define SPIFFS_FS_WORK_SIZE
The size of the work buffer.
This contains everything needed to run an instance of SPIFFS.
uint8_t fd_space[SPIFFS_FS_FD_SPACE_SIZE]
SPIFFS file descriptor cache.
spiffs fs
The SPIFFS struct.
uint32_t base_addr
Base address of partition.
mutex_t lock
A lock for SPIFFS internal use.
mtd_dev_t * dev
The underlying mtd device, must be set by user.
void spiffs_lock(struct spiffs_t *fs)
SPIFFS lock function.
Mutex for thread synchronization.
void spiffs_unlock(struct spiffs_t *fs)
SPIFFS unlock function.
#define SPIFFS_FS_CACHE_SIZE
the size of the cache buffer
uint8_t cache[SPIFFS_FS_CACHE_SIZE]
SPIFFS cache.
uint32_t block_count
Number of blocks in current partition, if 0, the mtd number of sector is used.
#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.
VFS layer API declarations.