mirror of
				https://github.com/eledio-devices/thirdparty-littlefs.git
				synced 2025-10-31 00:32:38 +01:00 
			
		
		
		
	Added specification document
For covering all the technical bits
This commit is contained in:
		| @@ -12,7 +12,8 @@ | ||||
| #include <stdio.h> | ||||
|  | ||||
|  | ||||
| // Builtin functions | ||||
| // Builtin functions, these may be replaced by more | ||||
| // efficient implementations in the system | ||||
| static inline uint32_t lfs_max(uint32_t a, uint32_t b) { | ||||
|     return (a > b) ? a : b; | ||||
| } | ||||
| @@ -33,10 +34,12 @@ static inline int lfs_scmp(uint32_t a, uint32_t b) { | ||||
|     return (int)(unsigned)(a - b); | ||||
| } | ||||
|  | ||||
| // CRC-32 with polynomial = 0x04c11db7 | ||||
| void lfs_crc(uint32_t *crc, const void *buffer, size_t size); | ||||
|  | ||||
|  | ||||
| // Logging functions | ||||
| // Logging functions, these may be replaced by system-specific | ||||
| // logging functions | ||||
| #define LFS_DEBUG(fmt, ...) printf("lfs debug: " fmt "\n", __VA_ARGS__) | ||||
| #define LFS_WARN(fmt, ...)  printf("lfs warn: " fmt "\n", __VA_ARGS__) | ||||
| #define LFS_ERROR(fmt, ...) printf("lfs error: " fmt "\n", __VA_ARGS__) | ||||
|   | ||||
		Reference in New Issue
	
	Block a user