/littlefs-3.5.0-3.4.0/bd/ |
D | lfs_testbd.c | 14 int lfs_testbd_createcfg(const struct lfs_config *cfg, const char *path, in lfs_testbd_createcfg() argument 24 (void*)cfg, cfg->context, in lfs_testbd_createcfg() 25 (void*)(uintptr_t)cfg->read, (void*)(uintptr_t)cfg->prog, in lfs_testbd_createcfg() 26 (void*)(uintptr_t)cfg->erase, (void*)(uintptr_t)cfg->sync, in lfs_testbd_createcfg() 27 cfg->read_size, cfg->prog_size, cfg->block_size, cfg->block_count, in lfs_testbd_createcfg() 31 lfs_testbd_t *bd = cfg->context; in lfs_testbd_createcfg() 32 bd->cfg = bdcfg; in lfs_testbd_createcfg() 36 bd->power_cycles = bd->cfg->power_cycles; in lfs_testbd_createcfg() 38 if (bd->cfg->erase_cycles) { in lfs_testbd_createcfg() 39 if (bd->cfg->wear_buffer) { in lfs_testbd_createcfg() [all …]
|
D | lfs_rambd.c | 10 int lfs_rambd_createcfg(const struct lfs_config *cfg, in lfs_rambd_createcfg() argument 17 (void*)cfg, cfg->context, in lfs_rambd_createcfg() 18 (void*)(uintptr_t)cfg->read, (void*)(uintptr_t)cfg->prog, in lfs_rambd_createcfg() 19 (void*)(uintptr_t)cfg->erase, (void*)(uintptr_t)cfg->sync, in lfs_rambd_createcfg() 20 cfg->read_size, cfg->prog_size, cfg->block_size, cfg->block_count, in lfs_rambd_createcfg() 22 lfs_rambd_t *bd = cfg->context; in lfs_rambd_createcfg() 23 bd->cfg = bdcfg; in lfs_rambd_createcfg() 26 if (bd->cfg->buffer) { in lfs_rambd_createcfg() 27 bd->buffer = bd->cfg->buffer; in lfs_rambd_createcfg() 29 bd->buffer = lfs_malloc(cfg->block_size * cfg->block_count); in lfs_rambd_createcfg() [all …]
|
D | lfs_filebd.c | 18 int lfs_filebd_createcfg(const struct lfs_config *cfg, const char *path, in lfs_filebd_createcfg() argument 26 (void*)cfg, cfg->context, in lfs_filebd_createcfg() 27 (void*)(uintptr_t)cfg->read, (void*)(uintptr_t)cfg->prog, in lfs_filebd_createcfg() 28 (void*)(uintptr_t)cfg->erase, (void*)(uintptr_t)cfg->sync, in lfs_filebd_createcfg() 29 cfg->read_size, cfg->prog_size, cfg->block_size, cfg->block_count, in lfs_filebd_createcfg() 31 lfs_filebd_t *bd = cfg->context; in lfs_filebd_createcfg() 32 bd->cfg = bdcfg; in lfs_filebd_createcfg() 51 int lfs_filebd_create(const struct lfs_config *cfg, const char *path) { in lfs_filebd_create() argument 57 (void*)cfg, cfg->context, in lfs_filebd_create() 58 (void*)(uintptr_t)cfg->read, (void*)(uintptr_t)cfg->prog, in lfs_filebd_create() [all …]
|
D | lfs_testbd.h | 78 struct lfs_filebd_config cfg; member 82 struct lfs_rambd_config cfg; member 90 const struct lfs_testbd_config *cfg; member 100 int lfs_testbd_create(const struct lfs_config *cfg, const char *path); 101 int lfs_testbd_createcfg(const struct lfs_config *cfg, const char *path, 105 int lfs_testbd_destroy(const struct lfs_config *cfg); 108 int lfs_testbd_read(const struct lfs_config *cfg, lfs_block_t block, 114 int lfs_testbd_prog(const struct lfs_config *cfg, lfs_block_t block, 121 int lfs_testbd_erase(const struct lfs_config *cfg, lfs_block_t block); 124 int lfs_testbd_sync(const struct lfs_config *cfg); [all …]
|
D | lfs_filebd.h | 38 const struct lfs_filebd_config *cfg; member 43 int lfs_filebd_create(const struct lfs_config *cfg, const char *path); 44 int lfs_filebd_createcfg(const struct lfs_config *cfg, const char *path, 48 int lfs_filebd_destroy(const struct lfs_config *cfg); 51 int lfs_filebd_read(const struct lfs_config *cfg, lfs_block_t block, 57 int lfs_filebd_prog(const struct lfs_config *cfg, lfs_block_t block, 64 int lfs_filebd_erase(const struct lfs_config *cfg, lfs_block_t block); 67 int lfs_filebd_sync(const struct lfs_config *cfg);
|
D | lfs_rambd.h | 40 const struct lfs_rambd_config *cfg; member 45 int lfs_rambd_create(const struct lfs_config *cfg); 46 int lfs_rambd_createcfg(const struct lfs_config *cfg, 50 int lfs_rambd_destroy(const struct lfs_config *cfg); 53 int lfs_rambd_read(const struct lfs_config *cfg, lfs_block_t block, 59 int lfs_rambd_prog(const struct lfs_config *cfg, lfs_block_t block, 66 int lfs_rambd_erase(const struct lfs_config *cfg, lfs_block_t block); 69 int lfs_rambd_sync(const struct lfs_config *cfg);
|
/littlefs-3.5.0-3.4.0/ |
D | lfs.c | 44 memset(pcache->buffer, 0xff, lfs->cfg->cache_size); in lfs_cache_zero() 53 if (block >= lfs->cfg->block_count || in lfs_bd_read() 54 off+size > lfs->cfg->block_size) { in lfs_bd_read() 95 if (size >= hint && off % lfs->cfg->read_size == 0 && in lfs_bd_read() 96 size >= lfs->cfg->read_size) { in lfs_bd_read() 98 diff = lfs_aligndown(diff, lfs->cfg->read_size); in lfs_bd_read() 99 int err = lfs->cfg->read(lfs->cfg, block, off, data, diff); in lfs_bd_read() 111 LFS_ASSERT(block < lfs->cfg->block_count); in lfs_bd_read() 113 rcache->off = lfs_aligndown(off, lfs->cfg->read_size); in lfs_bd_read() 116 lfs_alignup(off+hint, lfs->cfg->read_size), in lfs_bd_read() [all …]
|
D | lfs.h | 369 const struct lfs_file_config *cfg; member 412 const struct lfs_config *cfg; member 692 int lfs_migrate(lfs_t *lfs, const struct lfs_config *cfg);
|
D | README.md | 42 const struct lfs_config cfg = { 62 int err = lfs_mount(&lfs, &cfg); 67 lfs_format(&lfs, &cfg); 68 lfs_mount(&lfs, &cfg);
|
/littlefs-3.5.0-3.4.0/tests/ |
D | test_alloc.toml | 12 lfs_format(&lfs, &cfg) => 0; 13 lfs_mount(&lfs, &cfg) => 0; 17 lfs_mount(&lfs, &cfg) => 0; 34 lfs_mount(&lfs, &cfg) => 0; 54 lfs_format(&lfs, &cfg) => 0; 55 lfs_mount(&lfs, &cfg) => 0; 60 lfs_mount(&lfs, &cfg) => 0; 73 lfs_mount(&lfs, &cfg) => 0; 95 lfs_format(&lfs, &cfg) => 0; 98 lfs_mount(&lfs, &cfg) => 0; [all …]
|
D | test_evil.toml | 12 lfs_format(&lfs, &cfg) => 0; 15 lfs_init(&lfs, &cfg) => 0; 26 lfs_mount(&lfs, &cfg) => LFS_ERR_CORRUPT; 34 lfs_format(&lfs, &cfg) => 0; 36 lfs_mount(&lfs, &cfg) => 0; 41 lfs_init(&lfs, &cfg) => 0; 60 lfs_mount(&lfs, &cfg) => 0; 80 lfs_format(&lfs, &cfg) => 0; 82 lfs_mount(&lfs, &cfg) => 0; 89 lfs_init(&lfs, &cfg) => 0; [all …]
|
D | test_move.toml | 3 lfs_format(&lfs, &cfg) => 0; 4 lfs_mount(&lfs, &cfg) => 0; 16 lfs_mount(&lfs, &cfg) => 0; 20 lfs_mount(&lfs, &cfg) => 0; 60 lfs_format(&lfs, &cfg) => 0; 61 lfs_mount(&lfs, &cfg) => 0; 77 lfs_format(&lfs, &cfg) => 0; 78 lfs_mount(&lfs, &cfg) => 0; 90 lfs_mount(&lfs, &cfg) => 0; 95 lfs_mount(&lfs, &cfg) => 0; [all …]
|
D | test_superblocks.toml | 3 lfs_format(&lfs, &cfg) => 0; 8 lfs_format(&lfs, &cfg) => 0; 9 lfs_mount(&lfs, &cfg) => 0; 16 err = lfs_mount(&lfs, &cfg); 18 lfs_format(&lfs, &cfg) => 0; 19 lfs_mount(&lfs, &cfg) => 0; 26 lfs_mount(&lfs, &cfg) => LFS_ERR_CORRUPT; 33 lfs_format(&lfs, &cfg) => 0; 34 lfs_mount(&lfs, &cfg) => 0; 47 lfs_mount(&lfs, &cfg) => 0; [all …]
|
D | test_dirs.toml | 3 lfs_format(&lfs, &cfg) => 0; 4 lfs_mount(&lfs, &cfg) => 0; 20 lfs_format(&lfs, &cfg) => 0; 22 lfs_mount(&lfs, &cfg) => 0; 29 lfs_mount(&lfs, &cfg) => 0; 51 lfs_format(&lfs, &cfg) => 0; 53 lfs_mount(&lfs, &cfg) => 0; 60 lfs_mount(&lfs, &cfg) => 0; 78 lfs_mount(&lfs, &cfg) => 0; 85 lfs_mount(&lfs, &cfg) => 0; [all …]
|
D | test_orphans.toml | 5 lfs_format(&lfs, &cfg) => 0; 6 lfs_mount(&lfs, &cfg) => 0; 16 lfs_mount(&lfs, &cfg) => 0; 22 cfg.read(&cfg, block, 0, bbuffer, LFS_BLOCK_SIZE) => 0; 28 cfg.erase(&cfg, block) => 0; 29 cfg.prog(&cfg, block, 0, bbuffer, LFS_BLOCK_SIZE) => 0; 30 cfg.sync(&cfg) => 0; 32 lfs_mount(&lfs, &cfg) => 0; 38 lfs_mount(&lfs, &cfg) => 0; 51 lfs_mount(&lfs, &cfg) => 0; [all …]
|
D | test_paths.toml | 4 lfs_format(&lfs, &cfg) => 0; 5 lfs_mount(&lfs, &cfg) => 0; 26 lfs_format(&lfs, &cfg) => 0; 27 lfs_mount(&lfs, &cfg) => 0; 50 lfs_format(&lfs, &cfg) => 0; 51 lfs_mount(&lfs, &cfg) => 0; 76 lfs_format(&lfs, &cfg) => 0; 77 lfs_mount(&lfs, &cfg) => 0; 106 lfs_format(&lfs, &cfg) => 0; 107 lfs_mount(&lfs, &cfg) => 0; [all …]
|
D | test_files.toml | 4 lfs_format(&lfs, &cfg) => 0; 5 lfs_mount(&lfs, &cfg) => 0; 14 lfs_mount(&lfs, &cfg) => 0; 26 lfs_format(&lfs, &cfg) => 0; 29 lfs_mount(&lfs, &cfg) => 0; 44 lfs_mount(&lfs, &cfg) => 0; 65 lfs_format(&lfs, &cfg) => 0; 68 lfs_mount(&lfs, &cfg) => 0; 83 lfs_mount(&lfs, &cfg) => 0; 99 lfs_mount(&lfs, &cfg) => 0; [all …]
|
D | test_badblocks.toml | 19 lfs_testbd_setwear(&cfg, badblock-1, 0) => 0; 20 lfs_testbd_setwear(&cfg, badblock, 0xffffffff) => 0; 22 lfs_format(&lfs, &cfg) => 0; 24 lfs_mount(&lfs, &cfg) => 0; 49 lfs_mount(&lfs, &cfg) => 0; 93 lfs_testbd_setwear(&cfg, i+2, 0xffffffff) => 0; 96 lfs_format(&lfs, &cfg) => 0; 98 lfs_mount(&lfs, &cfg) => 0; 123 lfs_mount(&lfs, &cfg) => 0; 166 lfs_testbd_setwear(&cfg, (2*i) + 2, 0xffffffff) => 0; [all …]
|
D | test_truncate.toml | 5 lfs_format(&lfs, &cfg) => 0; 6 lfs_mount(&lfs, &cfg) => 0; 20 lfs_mount(&lfs, &cfg) => 0; 30 lfs_mount(&lfs, &cfg) => 0; 49 lfs_format(&lfs, &cfg) => 0; 50 lfs_mount(&lfs, &cfg) => 0; 64 lfs_mount(&lfs, &cfg) => 0; 81 lfs_mount(&lfs, &cfg) => 0; 98 lfs_format(&lfs, &cfg) => 0; 99 lfs_mount(&lfs, &cfg) => 0; [all …]
|
D | test_exhaustion.toml | 14 lfs_format(&lfs, &cfg) => 0; 15 lfs_mount(&lfs, &cfg) => 0; 21 lfs_mount(&lfs, &cfg) => 0; 74 lfs_mount(&lfs, &cfg) => 0; 99 lfs_format(&lfs, &cfg) => 0; 103 lfs_mount(&lfs, &cfg) => 0; 156 lfs_mount(&lfs, &cfg) => 0; 183 lfs_testbd_setwear(&cfg, b, 187 lfs_format(&lfs, &cfg) => 0; 188 lfs_mount(&lfs, &cfg) => 0; [all …]
|
D | test_attrs.toml | 3 lfs_format(&lfs, &cfg) => 0; 4 lfs_mount(&lfs, &cfg) => 0; 11 lfs_mount(&lfs, &cfg) => 0; 63 lfs_mount(&lfs, &cfg) => 0; 81 lfs_format(&lfs, &cfg) => 0; 82 lfs_mount(&lfs, &cfg) => 0; 89 lfs_mount(&lfs, &cfg) => 0; 140 lfs_mount(&lfs, &cfg) => 0; 158 lfs_format(&lfs, &cfg) => 0; 159 lfs_mount(&lfs, &cfg) => 0; [all …]
|
D | test_seek.toml | 12 lfs_format(&lfs, &cfg) => 0; 13 lfs_mount(&lfs, &cfg) => 0; 24 lfs_mount(&lfs, &cfg) => 0; 81 lfs_format(&lfs, &cfg) => 0; 82 lfs_mount(&lfs, &cfg) => 0; 93 lfs_mount(&lfs, &cfg) => 0; 136 lfs_format(&lfs, &cfg) => 0; 137 lfs_mount(&lfs, &cfg) => 0; 148 lfs_mount(&lfs, &cfg) => 0; 196 lfs_format(&lfs, &cfg) => 0; [all …]
|
D | test_relocations.toml | 7 lfs_format(&lfs, &cfg) => 0; 9 lfs_mount(&lfs, &cfg) => 0; 20 lfs_mount(&lfs, &cfg) => 0; 50 lfs_mount(&lfs, &cfg) => 0; 73 lfs_format(&lfs, &cfg) => 0; 75 lfs_mount(&lfs, &cfg) => 0; 86 lfs_mount(&lfs, &cfg) => 0; 158 err = lfs_mount(&lfs, &cfg); 160 lfs_format(&lfs, &cfg) => 0; 161 lfs_mount(&lfs, &cfg) => 0; [all …]
|
D | test_interspersed.toml | 8 lfs_format(&lfs, &cfg) => 0; 9 lfs_mount(&lfs, &cfg) => 0; 67 lfs_format(&lfs, &cfg) => 0; 68 lfs_mount(&lfs, &cfg) => 0; 80 lfs_mount(&lfs, &cfg) => 0; 118 lfs_format(&lfs, &cfg) => 0; 119 lfs_mount(&lfs, &cfg) => 0; 183 err = lfs_mount(&lfs, &cfg); 185 lfs_format(&lfs, &cfg) => 0; 186 lfs_mount(&lfs, &cfg) => 0;
|
D | test_entries.toml | 13 lfs_format(&lfs, &cfg) => 0; 14 lfs_mount(&lfs, &cfg) => 0; 102 lfs_format(&lfs, &cfg) => 0; 103 lfs_mount(&lfs, &cfg) => 0; 191 lfs_format(&lfs, &cfg) => 0; 192 lfs_mount(&lfs, &cfg) => 0; 264 lfs_format(&lfs, &cfg) => 0; 265 lfs_mount(&lfs, &cfg) => 0; 353 lfs_format(&lfs, &cfg) => 0; 354 lfs_mount(&lfs, &cfg) => 0; [all …]
|