# Copyright (c) 2019 Bolt Innovation Management, LLC
# Copyright (c) 2019 Peter Bigot Consulting, LLC
# Copyright (c) 2020 Nordic Semiconductor ASA
# SPDX-License-Identifier: Apache-2.0

config FILE_SYSTEM_LITTLEFS
	bool "LittleFS support"
	depends on FILE_SYSTEM
	depends on ZEPHYR_LITTLEFS_MODULE
	help
	  Enables LittleFS file system support.

if FILE_SYSTEM_LITTLEFS

menu "LittleFS Settings"
	visible if FILE_SYSTEM_LITTLEFS

config FS_LITTLEFS_NUM_FILES
	int "Maximum number of opened files"
	default 4
	help
	  This is a global maximum across all mounted littlefs filesystems.

config FS_LITTLEFS_NUM_DIRS
	int "Maximum number of opened directories"
	default 4
	help
	  This is a global maximum across all mounted littlefs filesystems.

config FS_LITTLEFS_READ_SIZE
	int "Minimum size of a block read"
	default 16
	help
	  All read operations will be a multiple of this value.

config FS_LITTLEFS_PROG_SIZE
	int "Minimum size of a block program"
	default 16
	help
	  All program operations will be a multiple of this value.

config FS_LITTLEFS_CACHE_SIZE
	int "Size of block caches in bytes"
	default 64
	help
	  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 of the underlying flash
	  device, and a factor of the block size.

config FS_LITTLEFS_LOOKAHEAD_SIZE
	int "Size of lookahead buffer in bytes"
	default 32
	help
	  A larger lookahead buffer increases the number of blocks found
	  during an allocation pass. The lookahead buffer is stored as a
	  compact bitmap, so each byte of RAM can track 8 blocks. Must
	  be a multiple of 8.

config FS_LITTLEFS_BLOCK_CYCLES
	int "Number of erase cycles before moving data to another block"
	default 512
	help
	  For dynamic wear leveling, the number of erase cycles before data
	  is moved to another block.  Set to a non-positive value to
	  disable leveling.

endmenu

config FS_LITTLEFS_FC_HEAP_SIZE
	int "Enable flexible file cache sizes for littlefs"
	default 0
	help
	  littlefs requires a per-file buffer to cache data.

	  When applications customize littlefs configurations and support
	  different cache sizes for different partitions this preallocation is
	  inadequate as an application might require a small number of files
	  using a large cache size and a larger number of files using a
	  smaller cache size.  In that case application should provide a
	  positive value for the heap size.  Be aware that there is a
	  per-allocation overhead that affects how much usable space is
	  present in the heap.

	  If this option is set to a non-positive value the heap is sized to
	  support up to FS_LITTLE_FS_NUM_FILES blocks of
	  FS_LITTLEFS_CACHE_SIZE bytes.

if FS_LITTLEFS_FC_HEAP_SIZE <= 0

config FS_LITTLEFS_HEAP_PER_ALLOC_OVERHEAD_SIZE
	int "Size of per-allocation overhead for littleFS heap in bytes"
	default 32
	help
	  In case when total size of littleFS heap is automatically calculated
	  we need to take into account overhead caused per block allocation.
	  For the purpose of heap size calculation the size of each cache block
	  will be increased by this value.
	  NOTE: when your app fails to open pre-defined number of files, as set
	  by FS_LITTLEFS_NUM_FILES, try to increase the value.

endif # FS_LITTLEFS_FC_HEAP_SIZE <= 0

config FS_LITTLEFS_FMP_DEV
	bool "Support for littlefs on flash devices"
	depends on FLASH_MAP
	depends on FLASH_PAGE_LAYOUT || !FLASH_HAS_EXPLICIT_ERASE
	default y
	help
	  Enable this option to provide support for littlefs on flash devices
	  (using the flash_map API).

config FS_LITTLEFS_BLK_DEV
	bool "Support for littlefs on block devices"
	help
	  Enable this option to provide support for littlefs on the block
	  devices (like for example SD card).

endif # FILE_SYSTEM_LITTLEFS
