Lines Matching refs:buffer
22 bdcfg->erase_count, bdcfg->buffer); in lfs_rambd_create()
27 if (bd->cfg->buffer) { in lfs_rambd_create()
28 bd->buffer = bd->cfg->buffer; in lfs_rambd_create()
30 bd->buffer = lfs_malloc(bd->cfg->erase_size * bd->cfg->erase_count); in lfs_rambd_create()
31 if (!bd->buffer) { in lfs_rambd_create()
38 memset(bd->buffer, 0, bd->cfg->erase_size * bd->cfg->erase_count); in lfs_rambd_create()
48 if (!bd->cfg->buffer) { in lfs_rambd_destroy()
49 lfs_free(bd->buffer); in lfs_rambd_destroy()
56 lfs_off_t off, void *buffer, lfs_size_t size) { in lfs_rambd_read() argument
59 (void*)cfg, block, off, buffer, size); in lfs_rambd_read()
69 memcpy(buffer, &bd->buffer[block*bd->cfg->erase_size + off], size); in lfs_rambd_read()
76 lfs_off_t off, const void *buffer, lfs_size_t size) { in lfs_rambd_prog() argument
79 (void*)cfg, block, off, buffer, size); in lfs_rambd_prog()
89 memcpy(&bd->buffer[block*bd->cfg->erase_size + off], buffer, size); in lfs_rambd_prog()