1 #ifndef _LFS_CONF_H_ 2 #define _LFS_CONF_H_ 3 4 #ifndef CONFIG_LITTLEFS_CNT 5 #define CONFIG_LITTLEFS_CNT 1 6 #endif 7 8 #ifndef CONFIG_LFS_PROG_SIZE 9 #define CONFIG_LFS_PROG_SIZE 256 10 #endif 11 12 #ifndef CONFIG_LFS_PAGE_NUM_PER_BLOCK 13 #define CONFIG_LFS_PAGE_NUM_PER_BLOCK 16 14 #endif 15 16 #ifndef CONFIG_LFS_BLOCK_NUMS 17 #define CONFIG_LFS_BLOCK_NUMS 32 18 #endif 19 20 #if (CONFIG_LITTLEFS_CNT > 1) 21 #ifndef CONFIG_LFS2_BLOCK_NUMS 22 #define CONFIG_LFS2_BLOCK_NUMS 32 23 #endif 24 #endif /* CONFIG_LITTLEFS_CNT > 1 */ 25 26 #if !defined(CONFIG_LITTLEFS_CNT) || \ 27 !defined(CONFIG_LFS_PROG_SIZE) || \ 28 !defined(CONFIG_LFS_PAGE_NUM_PER_BLOCK) || \ 29 !defined(CONFIG_LFS_BLOCK_NUMS) 30 #pragma message("Attention: you are going to use the default configurations for littlefs. Please double check that these config are suitable for you; otherwise please define your customized 'CONFIG_LITTLEFS_CNT', 'CONFIG_LFS_PROG_SIZE', 'CONFIG_LFS_PAGE_NUM_PER_BLOCK', 'CONFIG_LFS_BLOCK_NUMS' in your board or solution yaml!") 31 #endif 32 33 #if defined(CONFIG_LITTLEFS_CNT) && (CONFIG_LITTLEFS_CNT > 1) 34 #if !defined(CONFIG_LFS2_BLOCK_NUMS) 35 #pragma message ("Attention: you have chosen to use more than one littlefs partition. Please double check the default config are suitbale for you; otherwise please define 'CONFIG_LFS2_BLOCK_NUMS' in your board or solution yaml!") 36 #endif 37 #endif 38 39 #endif /* _LFS_CONF_H_ */ 40