Home
last modified time | relevance | path

Searched refs:cfg (Results 1 – 25 of 25) sorted by relevance

/littlefs-3.5.0-3.4.0/bd/
Dlfs_testbd.c14 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 …]
Dlfs_rambd.c10 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 …]
Dlfs_filebd.c18 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 …]
Dlfs_testbd.h78 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 …]
Dlfs_filebd.h38 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);
Dlfs_rambd.h40 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/
Dlfs.c44 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 …]
Dlfs.h369 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);
DREADME.md42 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/
Dtest_alloc.toml12 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 …]
Dtest_evil.toml12 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 …]
Dtest_move.toml3 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 …]
Dtest_superblocks.toml3 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 …]
Dtest_dirs.toml3 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 …]
Dtest_orphans.toml5 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 …]
Dtest_paths.toml4 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 …]
Dtest_files.toml4 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 …]
Dtest_badblocks.toml19 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 …]
Dtest_truncate.toml5 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 …]
Dtest_exhaustion.toml14 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 …]
Dtest_attrs.toml3 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 …]
Dtest_seek.toml12 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 …]
Dtest_relocations.toml7 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 …]
Dtest_interspersed.toml8 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;
Dtest_entries.toml13 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 …]