Home
last modified time | relevance | path

Searched refs:bd (Results 1 – 8 of 8) sorted by relevance

/littlefs-3.5.0-3.4.0/bd/
Dlfs_testbd.c31 lfs_testbd_t *bd = cfg->context; in lfs_testbd_createcfg() local
32 bd->cfg = bdcfg; in lfs_testbd_createcfg()
35 bd->persist = path; 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()
40 bd->wear = bd->cfg->wear_buffer; in lfs_testbd_createcfg()
42 bd->wear = lfs_malloc(sizeof(lfs_testbd_wear_t)*cfg->block_count); in lfs_testbd_createcfg()
43 if (!bd->wear) { in lfs_testbd_createcfg()
49 memset(bd->wear, 0, sizeof(lfs_testbd_wear_t) * cfg->block_count); in lfs_testbd_createcfg()
[all …]
Dlfs_rambd.c22 lfs_rambd_t *bd = cfg->context; in lfs_rambd_createcfg() local
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()
30 if (!bd->buffer) { in lfs_rambd_createcfg()
37 if (bd->cfg->erase_value != -1) { in lfs_rambd_createcfg()
38 memset(bd->buffer, bd->cfg->erase_value, in lfs_rambd_createcfg()
41 memset(bd->buffer, 0, cfg->block_size * cfg->block_count); in lfs_rambd_createcfg()
66 lfs_rambd_t *bd = cfg->context; in lfs_rambd_destroy() local
[all …]
Dlfs_filebd.c31 lfs_filebd_t *bd = cfg->context; in lfs_filebd_createcfg() local
32 bd->cfg = bdcfg; in lfs_filebd_createcfg()
36 bd->fd = open(path, O_RDWR | O_CREAT | O_BINARY, 0666); in lfs_filebd_createcfg()
38 bd->fd = open(path, O_RDWR | O_CREAT, 0666); in lfs_filebd_createcfg()
41 if (bd->fd < 0) { in lfs_filebd_createcfg()
70 lfs_filebd_t *bd = cfg->context; in lfs_filebd_destroy() local
71 int err = close(bd->fd); in lfs_filebd_destroy()
86 lfs_filebd_t *bd = cfg->context; in lfs_filebd_read() local
94 if (bd->cfg->erase_value != -1) { in lfs_filebd_read()
95 memset(buffer, bd->cfg->erase_value, size); in lfs_filebd_read()
[all …]
Dlfs_testbd.h77 lfs_filebd_t bd; member
81 lfs_rambd_t bd; member
/littlefs-3.5.0-3.4.0/tests/
Dtest_exhaustion.toml3 define.LFS_BLOCK_COUNT = 256 # small bd so test runs faster
88 define.LFS_BLOCK_COUNT = 256 # small bd so test runs faster
174 define.LFS_BLOCK_COUNT = 256 # small bd so test runs faster
266 define.LFS_BLOCK_COUNT = 256 # small bd so test runs faster
355 define.LFS_BLOCK_COUNT = 256 # small bd so test runs faster
Dtest_badblocks.toml5 define.LFS_BLOCK_COUNT = 256 # small bd so test runs faster
79 define.LFS_BLOCK_COUNT = 256 # small bd so test runs faster
152 define.LFS_BLOCK_COUNT = 256 # small bd so test runs faster
/littlefs-3.5.0-3.4.0/
DMakefile8 $(BUILDDIR)bd \
DREADME.md195 [emulated block device](bd/lfs_testbd.h) found in the `bd` directory.