Skip to content
This repository was archived by the owner on Dec 29, 2023. It is now read-only.

Commit 474e005

Browse files
Leonid KabanovLeonid Kabanov
Leonid Kabanov
authored and
Leonid Kabanov
committed
FATFS_VFS::mount() fix
1 parent 7016951 commit 474e005

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

FATFS_VFS.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,11 @@ FATFS_VFS::~FATFS_VFS() {
4242
* The FAT file system found in the partition is mounted into the VFS.
4343
* @return N/A.
4444
*/
45-
void FATFS_VFS::mount() {
45+
void FATFS_VFS::mount(int allocation_unit_size) {
4646
esp_vfs_fat_mount_config_t mountConfig;
4747
mountConfig.max_files = m_maxFiles;
4848
mountConfig.format_if_mount_failed = true;
49+
mountConfig.allocation_unit_size = allocation_unit_size;
4950
ESP_ERROR_CHECK(esp_vfs_fat_spiflash_mount(m_mountPath.c_str(), m_partitionName.c_str(), &mountConfig, &m_wl_handle));
5051
} // mount
5152

FATFS_VFS.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ class FATFS_VFS {
4444
FATFS_VFS(std::string mountPath, std::string partitionName);
4545
virtual ~FATFS_VFS();
4646

47-
void mount();
47+
void mount(int allocation_unit_size);
4848
void setMaxFiles(int maxFiles);
4949
void unmount();
5050
private:

0 commit comments

Comments
 (0)