mirror of https://github.com/ARMmbed/mbed-os.git
				
				
				
			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.pull/12783/head
							parent
							
								
									3dfbe139f2
								
							
						
					
					
						commit
						62e04f71c3
					
				| 
						 | 
				
			
			@ -20,6 +20,7 @@
 | 
			
		|||
^features/netsocket/ppp/source
 | 
			
		||||
^features/storage/filesystem/fat/ChaN
 | 
			
		||||
^features/storage/filesystem/littlefs/littlefs/
 | 
			
		||||
^features/storage/filesystem/littlefsv2/littlefs/
 | 
			
		||||
^features/unsupported/
 | 
			
		||||
^hal/storage_abstraction
 | 
			
		||||
^platform/cxxsupport
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -114,14 +114,14 @@ static int lfs2_totype(int type)
 | 
			
		|||
 | 
			
		||||
////// Block device operations //////
 | 
			
		||||
static int lfs2_bd_read(const struct lfs2_config *c, lfs2_block_t block,
 | 
			
		||||
                       lfs2_off_t off, void *buffer, lfs2_size_t size)
 | 
			
		||||
                        lfs2_off_t off, void *buffer, lfs2_size_t size)
 | 
			
		||||
{
 | 
			
		||||
    BlockDevice *bd = (BlockDevice *)c->context;
 | 
			
		||||
    return bd->read(buffer, (bd_addr_t)block * c->block_size + off, size);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
static int lfs2_bd_prog(const struct lfs2_config *c, lfs2_block_t block,
 | 
			
		||||
                       lfs2_off_t off, const void *buffer, lfs2_size_t size)
 | 
			
		||||
                        lfs2_off_t off, const void *buffer, lfs2_size_t size)
 | 
			
		||||
{
 | 
			
		||||
    BlockDevice *bd = (BlockDevice *)c->context;
 | 
			
		||||
    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)
 | 
			
		|||
 | 
			
		||||
// Filesystem implementation (See LittleFileSystem2.h)
 | 
			
		||||
LittleFileSystem2::LittleFileSystem2(const char *name, BlockDevice *bd,
 | 
			
		||||
                                   lfs2_size_t block_size, uint32_t block_cycles,
 | 
			
		||||
                                   lfs2_size_t cache_size, lfs2_size_t lookahead_size)
 | 
			
		||||
                                     lfs2_size_t block_size, uint32_t block_cycles,
 | 
			
		||||
                                     lfs2_size_t cache_size, lfs2_size_t lookahead_size)
 | 
			
		||||
    : FileSystem(name)
 | 
			
		||||
{
 | 
			
		||||
    memset(&_config, 0, sizeof(_config));
 | 
			
		||||
| 
						 | 
				
			
			@ -222,8 +222,8 @@ int LittleFileSystem2::unmount()
 | 
			
		|||
}
 | 
			
		||||
 | 
			
		||||
int LittleFileSystem2::format(BlockDevice *bd,
 | 
			
		||||
                             lfs2_size_t block_size, uint32_t block_cycles,
 | 
			
		||||
                             lfs2_size_t cache_size, lfs2_size_t lookahead_size)
 | 
			
		||||
                              lfs2_size_t block_size, uint32_t block_cycles,
 | 
			
		||||
                              lfs2_size_t cache_size, lfs2_size_t lookahead_size)
 | 
			
		||||
{
 | 
			
		||||
    int err = bd->init();
 | 
			
		||||
    if (err) {
 | 
			
		||||
| 
						 | 
				
			
			@ -281,10 +281,10 @@ int LittleFileSystem2::reformat(BlockDevice *bd)
 | 
			
		|||
    }
 | 
			
		||||
 | 
			
		||||
    int err = LittleFileSystem2::format(bd,
 | 
			
		||||
            _config.block_size,
 | 
			
		||||
            _config.block_cycles,
 | 
			
		||||
            _config.cache_size,
 | 
			
		||||
            _config.lookahead_size);
 | 
			
		||||
                                        _config.block_size,
 | 
			
		||||
                                        _config.block_cycles,
 | 
			
		||||
                                        _config.cache_size,
 | 
			
		||||
                                        _config.lookahead_size);
 | 
			
		||||
    if (err) {
 | 
			
		||||
        _mutex.unlock();
 | 
			
		||||
        return err;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -58,10 +58,10 @@ public:
 | 
			
		|||
     *      more RAM.
 | 
			
		||||
     */
 | 
			
		||||
    LittleFileSystem2(const char *name = NULL, mbed::BlockDevice *bd = NULL,
 | 
			
		||||
                     lfs2_size_t block_size = MBED_LFS2_BLOCK_SIZE,
 | 
			
		||||
                     uint32_t   block_cycles = MBED_LFS2_BLOCK_CYCLES,
 | 
			
		||||
                     lfs2_size_t cache_size = MBED_LFS2_CACHE_SIZE,
 | 
			
		||||
                     lfs2_size_t lookahead = MBED_LFS2_LOOKAHEAD_SIZE);
 | 
			
		||||
                      lfs2_size_t block_size = MBED_LFS2_BLOCK_SIZE,
 | 
			
		||||
                      uint32_t   block_cycles = MBED_LFS2_BLOCK_CYCLES,
 | 
			
		||||
                      lfs2_size_t cache_size = MBED_LFS2_CACHE_SIZE,
 | 
			
		||||
                      lfs2_size_t lookahead = MBED_LFS2_LOOKAHEAD_SIZE);
 | 
			
		||||
 | 
			
		||||
    virtual ~LittleFileSystem2();
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue