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
path: root/emubd
diff options
context:
space:
mode:
authorChristopher Haster <chaster@utexas.edu>2017-04-24 07:49:21 +0300
committerChristopher Haster <chaster@utexas.edu>2017-04-24 07:58:43 +0300
commitb55719bab156e66908ce86e8525b5eea15bec7da (patch)
tree0ccedb1a977e09f40d9dacd97af92a7576553bf6 /emubd
parent0406442253dcb6b813e6ff9a1659bd418fd0fe96 (diff)
Adopted more conventional buffer parameter ordering
Adopted buffer followed by size. The other order was original chosen due to some other functions with a more complicated parameter list. This convention is important, as the bd api is one of the main apis facing porting efforts.
Diffstat (limited to 'emubd')
-rw-r--r--emubd/lfs_emubd.c4
-rw-r--r--emubd/lfs_emubd.h4
2 files changed, 4 insertions, 4 deletions
diff --git a/emubd/lfs_emubd.c b/emubd/lfs_emubd.c
index f1381cf..6423cb4 100644
--- a/emubd/lfs_emubd.c
+++ b/emubd/lfs_emubd.c
@@ -72,7 +72,7 @@ void lfs_emubd_destroy(const struct lfs_config *cfg) {
}
int lfs_emubd_read(const struct lfs_config *cfg, lfs_block_t block,
- lfs_off_t off, lfs_size_t size, void *buffer) {
+ lfs_off_t off, void *buffer, lfs_size_t size) {
lfs_emubd_t *emu = cfg->context;
uint8_t *data = buffer;
@@ -114,7 +114,7 @@ int lfs_emubd_read(const struct lfs_config *cfg, lfs_block_t block,
}
int lfs_emubd_prog(const struct lfs_config *cfg, lfs_block_t block,
- lfs_off_t off, lfs_size_t size, const void *buffer) {
+ lfs_off_t off, const void *buffer, lfs_size_t size) {
lfs_emubd_t *emu = cfg->context;
const uint8_t *data = buffer;
diff --git a/emubd/lfs_emubd.h b/emubd/lfs_emubd.h
index 838dbd2..ddbf893 100644
--- a/emubd/lfs_emubd.h
+++ b/emubd/lfs_emubd.h
@@ -57,13 +57,13 @@ void lfs_emubd_destroy(const struct lfs_config *cfg);
// Read a block
int lfs_emubd_read(const struct lfs_config *cfg, lfs_block_t block,
- lfs_off_t off, lfs_size_t size, void *buffer);
+ lfs_off_t off, void *buffer, lfs_size_t size);
// Program a block
//
// The block must have previously been erased.
int lfs_emubd_prog(const struct lfs_config *cfg, lfs_block_t block,
- lfs_off_t off, lfs_size_t size, const void *buffer);
+ lfs_off_t off, const void *buffer, lfs_size_t size);
// Erase a block
//