diff --git a/subsys/disk/Kconfig b/subsys/disk/Kconfig index 2af051565ee..6865121c7ea 100644 --- a/subsys/disk/Kconfig +++ b/subsys/disk/Kconfig @@ -79,6 +79,12 @@ config DISK_ERASE_BLOCK_SIZE is erased at one time in flash storage. Typically it is equal to the flash memory page size. +config DISK_FLASH_SECTOR_SIZE + int "Flash device sector size" + default 512 + help + This is the file system sector size in bytes. + config DISK_VOLUME_SIZE hex "Flash device volume size in hex" help diff --git a/subsys/disk/disk_access_flash.c b/subsys/disk/disk_access_flash.c index fe993728105..44590b7ecec 100644 --- a/subsys/disk/disk_access_flash.c +++ b/subsys/disk/disk_access_flash.c @@ -14,7 +14,7 @@ #include #include -#define SECTOR_SIZE 512 +#define SECTOR_SIZE CONFIG_DISK_FLASH_SECTOR_SIZE static const struct device *flash_dev; diff --git a/subsys/fs/Kconfig.fatfs b/subsys/fs/Kconfig.fatfs index cbc4f30d71e..4e0b3ef5041 100644 --- a/subsys/fs/Kconfig.fatfs +++ b/subsys/fs/Kconfig.fatfs @@ -126,6 +126,11 @@ config FS_FATFS_CODEPAGE 949 - Korean (DBCS) 950 - Traditional Chinese (DBCS) +config FS_FATFS_MAX_SS + int "Maximum supported sector size" + range 512 4096 + default 512 + endmenu endif # FAT_FILESYSTEM_ELM