mirror of
				https://github.com/eledio-devices/thirdparty-littlefs.git
				synced 2025-10-31 08:42:40 +01:00 
			
		
		
		
	A number of small lfs_util.h QOL changes
- Changed the name of the LFS_CONFIG macro to LFS_UTIL to avoid confusion with the lfs_config struct. This also hints that LFS_UTIL is related to lfs_util.h. LFS_UTIL allows the user to override lfs_util.h so they can provide their own system-level dependencies such as malloc, tracing, builtins, stdint definitions, string.h, and others. - Removed stdlib includes from lfs.h, these should all go through lfs_util.h to let users override these definitions if stdlib is unavailable on their system. - Moved error code definitions to lfs_util.h. This lets users override the error codes to replace them with their own error codes and avoid a translation layer in some situations. Note the error codes must still be in the range of a negative int. - Used proper stdint definitions in lfs_scmp.
This commit is contained in:
		| @@ -8,7 +8,6 @@ | ||||
| #define LFS_FILEBD_H | ||||
|  | ||||
| #include "lfs.h" | ||||
| #include "lfs_util.h" | ||||
|  | ||||
| #ifdef __cplusplus | ||||
| extern "C" | ||||
|   | ||||
| @@ -8,7 +8,6 @@ | ||||
| #define LFS_RAMBD_H | ||||
|  | ||||
| #include "lfs.h" | ||||
| #include "lfs_util.h" | ||||
|  | ||||
| #ifdef __cplusplus | ||||
| extern "C" | ||||
|   | ||||
| @@ -9,7 +9,6 @@ | ||||
| #define LFS_TESTBD_H | ||||
|  | ||||
| #include "lfs.h" | ||||
| #include "lfs_util.h" | ||||
| #include "bd/lfs_rambd.h" | ||||
| #include "bd/lfs_filebd.h" | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user