mirror of
				https://github.com/eledio-devices/thirdparty-littlefs.git
				synced 2025-10-31 08:42:40 +01:00 
			
		
		
		
	Generated v2 prefixes
This commit is contained in:
		
							
								
								
									
										36
									
								
								lfs2.h
									
									
									
									
									
								
							
							
						
						
									
										36
									
								
								lfs2.h
									
									
									
									
									
								
							| @@ -159,49 +159,49 @@ struct lfs2_config { | ||||
|     // information to the block device operations | ||||
|     void *context; | ||||
|  | ||||
|     // Read a region in a block. Negative error codes are propogated | ||||
|     // Read a region in a block. Negative error codes are propagated | ||||
|     // to the user. | ||||
|     int (*read)(const struct lfs2_config *c, lfs2_block_t block, | ||||
|             lfs2_off_t off, void *buffer, lfs2_size_t size); | ||||
|  | ||||
|     // Program a region in a block. The block must have previously | ||||
|     // been erased. Negative error codes are propogated to the user. | ||||
|     // been erased. Negative error codes are propagated to the user. | ||||
|     // May return LFS2_ERR_CORRUPT if the block should be considered bad. | ||||
|     int (*prog)(const struct lfs2_config *c, lfs2_block_t block, | ||||
|             lfs2_off_t off, const void *buffer, lfs2_size_t size); | ||||
|  | ||||
|     // Erase a block. A block must be erased before being programmed. | ||||
|     // The state of an erased block is undefined. Negative error codes | ||||
|     // are propogated to the user. | ||||
|     // are propagated to the user. | ||||
|     // May return LFS2_ERR_CORRUPT if the block should be considered bad. | ||||
|     int (*erase)(const struct lfs2_config *c, lfs2_block_t block); | ||||
|  | ||||
|     // Sync the state of the underlying block device. Negative error codes | ||||
|     // are propogated to the user. | ||||
|     // are propagated to the user. | ||||
|     int (*sync)(const struct lfs2_config *c); | ||||
|  | ||||
| #ifdef LFS2_THREADSAFE | ||||
|     // Lock the underlying block device. Negative error codes | ||||
|     // are propogated to the user. | ||||
|     // are propagated to the user. | ||||
|     int (*lock)(const struct lfs2_config *c); | ||||
|  | ||||
|     // Unlock the underlying block device. Negative error codes | ||||
|     // are propogated to the user. | ||||
|     // are propagated to the user. | ||||
|     int (*unlock)(const struct lfs2_config *c); | ||||
| #endif | ||||
|  | ||||
|     // Minimum size of a block read. All read operations will be a | ||||
|     // Minimum size of a block read in bytes. All read operations will be a | ||||
|     // multiple of this value. | ||||
|     lfs2_size_t read_size; | ||||
|  | ||||
|     // Minimum size of a block program. All program operations will be a | ||||
|     // multiple of this value. | ||||
|     // Minimum size of a block program in bytes. All program operations will be | ||||
|     // a multiple of this value. | ||||
|     lfs2_size_t prog_size; | ||||
|  | ||||
|     // Size of an erasable block. This does not impact ram consumption and | ||||
|     // may be larger than the physical erase size. However, non-inlined files | ||||
|     // take up at minimum one block. Must be a multiple of the read | ||||
|     // and program sizes. | ||||
|     // Size of an erasable block in bytes. This does not impact ram consumption | ||||
|     // and may be larger than the physical erase size. However, non-inlined | ||||
|     // files take up at minimum one block. Must be a multiple of the read and | ||||
|     // program sizes. | ||||
|     lfs2_size_t block_size; | ||||
|  | ||||
|     // Number of erasable blocks on the device. | ||||
| @@ -215,11 +215,11 @@ struct lfs2_config { | ||||
|     // Set to -1 to disable block-level wear-leveling. | ||||
|     int32_t block_cycles; | ||||
|  | ||||
|     // Size of block caches. Each cache buffers a portion of a block in RAM. | ||||
|     // The littlefs needs a read cache, a program cache, and one additional | ||||
|     // Size of block caches in bytes. Each cache buffers a portion of a block in | ||||
|     // RAM. The littlefs needs a read cache, a program cache, and one additional | ||||
|     // cache per file. Larger caches can improve performance by storing more | ||||
|     // data and reducing the number of disk accesses. Must be a multiple of | ||||
|     // the read and program sizes, and a factor of the block size. | ||||
|     // data and reducing the number of disk accesses. Must be a multiple of the | ||||
|     // read and program sizes, and a factor of the block size. | ||||
|     lfs2_size_t cache_size; | ||||
|  | ||||
|     // Size of the lookahead buffer in bytes. A larger lookahead buffer | ||||
| @@ -485,7 +485,7 @@ int lfs2_stat(lfs2_t *lfs2, const char *path, struct lfs2_info *info); | ||||
| // Returns the size of the attribute, or a negative error code on failure. | ||||
| // Note, the returned size is the size of the attribute on disk, irrespective | ||||
| // of the size of the buffer. This can be used to dynamically allocate a buffer | ||||
| // or check for existance. | ||||
| // or check for existence. | ||||
| lfs2_ssize_t lfs2_getattr(lfs2_t *lfs2, const char *path, | ||||
|         uint8_t type, void *buffer, lfs2_size_t size); | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user