mirror of
				https://github.com/eledio-devices/thirdparty-littlefs.git
				synced 2025-10-31 08:42:40 +01:00 
			
		
		
		
	Removed scanning for stride - Adds complexity with questionable benefit - Can be added as an optimization later Fixed handling around device boundaries and where lookahead may not be a factor of the device size (consider small devices with only a few blocks) Added support for configuration with optional dynamic memory as found in the caching configuration
		
			
				
	
	
		
			34 lines
		
	
	
		
			708 B
		
	
	
	
		
			C
		
	
	
	
	
	
			
		
		
	
	
			34 lines
		
	
	
		
			708 B
		
	
	
	
		
			C
		
	
	
	
	
	
| /*
 | |
|  * Configuration and type definitions
 | |
|  *
 | |
|  * Copyright (c) 2017 Christopher Haster
 | |
|  * Distributed under the MIT license
 | |
|  */
 | |
| #ifndef LFS_CONFIG_H
 | |
| #define LFS_CONFIG_H
 | |
| 
 | |
| #include <stdint.h>
 | |
| 
 | |
| // Type definitions
 | |
| typedef uint32_t lfs_size_t;
 | |
| typedef uint32_t lfs_off_t;
 | |
| 
 | |
| typedef int32_t  lfs_ssize_t;
 | |
| typedef int32_t  lfs_soff_t;
 | |
| 
 | |
| typedef uint32_t lfs_block_t;
 | |
| 
 | |
| // Maximum length of file name
 | |
| #ifndef LFS_NAME_MAX
 | |
| #define LFS_NAME_MAX 255
 | |
| #endif
 | |
| 
 | |
| // Logging operations
 | |
| #include <stdio.h>
 | |
| #define LFS_ERROR(fmt, ...) printf("lfs error: " fmt "\n", __VA_ARGS__)
 | |
| #define LFS_WARN(fmt, ...)  printf("lfs warn: " fmt "\n", __VA_ARGS__)
 | |
| #define LFS_INFO(fmt, ...)  printf("lfs info: " fmt "\n", __VA_ARGS__)
 | |
| 
 | |
| 
 | |
| #endif
 |