Unverified Commit 43e5e022 authored by lbernstone's avatar lbernstone Committed by GitHub

Added maxOpenFiles to SDMMC (#6912)

parent 097ff8b1
......@@ -84,7 +84,7 @@ bool SDMMCFS::setPins(int clk, int cmd, int d0, int d1, int d2, int d3)
#endif
}
bool SDMMCFS::begin(const char * mountpoint, bool mode1bit, bool format_if_mount_failed, int sdmmc_frequency)
bool SDMMCFS::begin(const char * mountpoint, bool mode1bit, bool format_if_mount_failed, int sdmmc_frequency, uint8_t maxOpenFiles)
{
if(_card) {
return true;
......@@ -122,7 +122,7 @@ bool SDMMCFS::begin(const char * mountpoint, bool mode1bit, bool format_if_mount
esp_vfs_fat_sdmmc_mount_config_t mount_config = {
.format_if_mount_failed = format_if_mount_failed,
.max_files = 5,
.max_files = maxOpenFiles,
.allocation_unit_size = 0
};
......
......@@ -50,7 +50,7 @@ public:
SDMMCFS(FSImplPtr impl);
bool setPins(int clk, int cmd, int d0);
bool setPins(int clk, int cmd, int d0, int d1, int d2, int d3);
bool begin(const char * mountpoint="/sdcard", bool mode1bit=false, bool format_if_mount_failed=false, int sdmmc_frequency=BOARD_MAX_SDMMC_FREQ);
bool begin(const char * mountpoint="/sdcard", bool mode1bit=false, bool format_if_mount_failed=false, int sdmmc_frequency=BOARD_MAX_SDMMC_FREQ, uint8_t maxOpenFiles = 5);
void end();
sdcard_type_t cardType();
uint64_t cardSize();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment