7#ifndef ZEPHYR_INCLUDE_FS_LITTLEFS_H_
8#define ZEPHYR_INCLUDE_FS_LITTLEFS_H_
26#define FS_LITTLEFS_DISK_VERSION_MAJOR_GET(disk_version) FIELD_GET(GENMASK(31, 16), disk_version)
34#define FS_LITTLEFS_DISK_VERSION_MINOR_GET(disk_version) FIELD_GET(GENMASK(15, 0), disk_version)
39 struct lfs_config
cfg;
86#define FS_LITTLEFS_DECLARE_CUSTOM_CONFIG(name, alignment, read_sz, prog_sz, cache_sz, \
88 static uint8_t __aligned(alignment) name ## _read_buffer[cache_sz]; \
89 static uint8_t __aligned(alignment) name ## _prog_buffer[cache_sz]; \
90 static uint32_t name ## _lookahead_buffer[(lookahead_sz) / sizeof(uint32_t)]; \
91 static struct fs_littlefs name = { \
93 .read_size = (read_sz), \
94 .prog_size = (prog_sz), \
95 .cache_size = (cache_sz), \
96 .lookahead_size = (lookahead_sz), \
97 .read_buffer = name ## _read_buffer, \
98 .prog_buffer = name ## _prog_buffer, \
99 .lookahead_buffer = name ## _lookahead_buffer, \
112#define FS_LITTLEFS_DECLARE_DEFAULT_CONFIG(name) \
113 FS_LITTLEFS_DECLARE_CUSTOM_CONFIG(name, \
115 CONFIG_FS_LITTLEFS_READ_SIZE, \
116 CONFIG_FS_LITTLEFS_PROG_SIZE, \
117 CONFIG_FS_LITTLEFS_CACHE_SIZE, \
118 CONFIG_FS_LITTLEFS_LOOKAHEAD_SIZE)
Public API for flash map.
__UINT32_TYPE__ uint32_t
Definition stdint.h:90
__UINT8_TYPE__ uint8_t
Definition stdint.h:88
Filesystem info structure for LittleFS mount.
Definition littlefs.h:37
void * backend
Definition littlefs.h:54
uint8_t * prog_buffer
Definition littlefs.h:45
struct k_mutex mutex
Definition littlefs.h:55
struct lfs lfs
Definition littlefs.h:53
uint32_t * lookahead_buffer[CONFIG_FS_LITTLEFS_LOOKAHEAD_SIZE/sizeof(uint32_t)]
Definition littlefs.h:50
struct lfs_config cfg
Definition littlefs.h:39
uint8_t * read_buffer
Definition littlefs.h:42
Mutex Structure.
Definition kernel.h:3025