Working port of Little FS

This commit is contained in:
2025-08-16 20:35:00 +02:00
parent 2b0566c56f
commit 8da890e388
20 changed files with 332 additions and 19 deletions

View File

@ -1,6 +1,9 @@
#ifndef STOREDEV_RAMSD_H_
#define STOREDEV_RAMSD_H_
#include <stdint.h>
#include <stddef.h>
struct StoreDev;
typedef struct {
@ -10,11 +13,13 @@ typedef struct {
typedef struct {
size_t capacity;
uint8_t *preallocbuffer;
} RamSdInitExtra;
int32_t ramsd_init(struct StoreDev *sd, void *extra);
int32_t ramsd_read(struct StoreDev *sd, uint8_t *const buffer, size_t n, size_t off);
int32_t ramsd_write(struct StoreDev *sd, const uint8_t *const buffer, size_t n, size_t off);
int32_t ramsd_cleanup(struct StoreDev *sd);
size_t ramsd_capacity(struct StoreDev *sd);
#endif // STOREDEV_RAMSD_H_