Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/littlefs-project/littlefs.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'bd/lfs_rambd.h')
-rw-r--r--bd/lfs_rambd.h19
1 files changed, 15 insertions, 4 deletions
diff --git a/bd/lfs_rambd.h b/bd/lfs_rambd.h
index 3424680..8663702 100644
--- a/bd/lfs_rambd.h
+++ b/bd/lfs_rambd.h
@@ -26,8 +26,20 @@ extern "C"
#endif
#endif
-// rambd config (optional)
+// rambd config
struct lfs_rambd_config {
+ // Minimum size of a read operation in bytes.
+ lfs_size_t read_size;
+
+ // Minimum size of a program operation in bytes.
+ lfs_size_t prog_size;
+
+ // Size of an erase operation in bytes.
+ lfs_size_t erase_size;
+
+ // Number of erase blocks on the device.
+ lfs_size_t erase_count;
+
// Optional statically allocated buffer for the block device.
void *buffer;
};
@@ -39,9 +51,8 @@ typedef struct lfs_rambd {
} lfs_rambd_t;
-// Create a RAM block device using the geometry in lfs_config
-int lfs_rambd_create(const struct lfs_config *cfg);
-int lfs_rambd_createcfg(const struct lfs_config *cfg,
+// Create a RAM block device
+int lfs_rambd_create(const struct lfs_config *cfg,
const struct lfs_rambd_config *bdcfg);
// Clean up memory associated with block device