Skip to content

Commit 62e04f7

Browse files
author
Veijo Pesonen
committed
littlefsv2: solve astyle issues
Adds littlefs-directory under littlefsv2 to .astyleignore as it's an external component brought to Mbed OS. Issues with the adaption layer fixed.
1 parent 3dfbe13 commit 62e04f7

File tree

3 files changed

+15
-14
lines changed

3 files changed

+15
-14
lines changed

.astyleignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
^features/netsocket/ppp/source
2121
^features/storage/filesystem/fat/ChaN
2222
^features/storage/filesystem/littlefs/littlefs/
23+
^features/storage/filesystem/littlefsv2/littlefs/
2324
^features/unsupported/
2425
^hal/storage_abstraction
2526
^platform/cxxsupport

features/storage/filesystem/littlefsv2/LittleFileSystem2.cpp

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -114,14 +114,14 @@ static int lfs2_totype(int type)
114114

115115
////// Block device operations //////
116116
static int lfs2_bd_read(const struct lfs2_config *c, lfs2_block_t block,
117-
lfs2_off_t off, void *buffer, lfs2_size_t size)
117+
lfs2_off_t off, void *buffer, lfs2_size_t size)
118118
{
119119
BlockDevice *bd = (BlockDevice *)c->context;
120120
return bd->read(buffer, (bd_addr_t)block * c->block_size + off, size);
121121
}
122122

123123
static int lfs2_bd_prog(const struct lfs2_config *c, lfs2_block_t block,
124-
lfs2_off_t off, const void *buffer, lfs2_size_t size)
124+
lfs2_off_t off, const void *buffer, lfs2_size_t size)
125125
{
126126
BlockDevice *bd = (BlockDevice *)c->context;
127127
return bd->program(buffer, (bd_addr_t)block * c->block_size + off, size);
@@ -144,8 +144,8 @@ static int lfs2_bd_sync(const struct lfs2_config *c)
144144

145145
// Filesystem implementation (See LittleFileSystem2.h)
146146
LittleFileSystem2::LittleFileSystem2(const char *name, BlockDevice *bd,
147-
lfs2_size_t block_size, uint32_t block_cycles,
148-
lfs2_size_t cache_size, lfs2_size_t lookahead_size)
147+
lfs2_size_t block_size, uint32_t block_cycles,
148+
lfs2_size_t cache_size, lfs2_size_t lookahead_size)
149149
: FileSystem(name)
150150
{
151151
memset(&_config, 0, sizeof(_config));
@@ -222,8 +222,8 @@ int LittleFileSystem2::unmount()
222222
}
223223

224224
int LittleFileSystem2::format(BlockDevice *bd,
225-
lfs2_size_t block_size, uint32_t block_cycles,
226-
lfs2_size_t cache_size, lfs2_size_t lookahead_size)
225+
lfs2_size_t block_size, uint32_t block_cycles,
226+
lfs2_size_t cache_size, lfs2_size_t lookahead_size)
227227
{
228228
int err = bd->init();
229229
if (err) {
@@ -281,10 +281,10 @@ int LittleFileSystem2::reformat(BlockDevice *bd)
281281
}
282282

283283
int err = LittleFileSystem2::format(bd,
284-
_config.block_size,
285-
_config.block_cycles,
286-
_config.cache_size,
287-
_config.lookahead_size);
284+
_config.block_size,
285+
_config.block_cycles,
286+
_config.cache_size,
287+
_config.lookahead_size);
288288
if (err) {
289289
_mutex.unlock();
290290
return err;

features/storage/filesystem/littlefsv2/LittleFileSystem2.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -58,10 +58,10 @@ class LittleFileSystem2 : public mbed::FileSystem {
5858
* more RAM.
5959
*/
6060
LittleFileSystem2(const char *name = NULL, mbed::BlockDevice *bd = NULL,
61-
lfs2_size_t block_size = MBED_LFS2_BLOCK_SIZE,
62-
uint32_t block_cycles = MBED_LFS2_BLOCK_CYCLES,
63-
lfs2_size_t cache_size = MBED_LFS2_CACHE_SIZE,
64-
lfs2_size_t lookahead = MBED_LFS2_LOOKAHEAD_SIZE);
61+
lfs2_size_t block_size = MBED_LFS2_BLOCK_SIZE,
62+
uint32_t block_cycles = MBED_LFS2_BLOCK_CYCLES,
63+
lfs2_size_t cache_size = MBED_LFS2_CACHE_SIZE,
64+
lfs2_size_t lookahead = MBED_LFS2_LOOKAHEAD_SIZE);
6565

6666
virtual ~LittleFileSystem2();
6767

0 commit comments

Comments
 (0)