Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 43e5e02

Browse filesBrowse files
authored
Added maxOpenFiles to SDMMC (#6912)
1 parent 097ff8b commit 43e5e02
Copy full SHA for 43e5e02

File tree

Expand file treeCollapse file tree

2 files changed

+3
-3
lines changed
Filter options
Expand file treeCollapse file tree

2 files changed

+3
-3
lines changed

‎libraries/SD_MMC/src/SD_MMC.cpp

Copy file name to clipboardExpand all lines: libraries/SD_MMC/src/SD_MMC.cpp
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ bool SDMMCFS::setPins(int clk, int cmd, int d0, int d1, int d2, int d3)
8484
#endif
8585
}
8686

87-
bool SDMMCFS::begin(const char * mountpoint, bool mode1bit, bool format_if_mount_failed, int sdmmc_frequency)
87+
bool SDMMCFS::begin(const char * mountpoint, bool mode1bit, bool format_if_mount_failed, int sdmmc_frequency, uint8_t maxOpenFiles)
8888
{
8989
if(_card) {
9090
return true;
@@ -122,7 +122,7 @@ bool SDMMCFS::begin(const char * mountpoint, bool mode1bit, bool format_if_mount
122122

123123
esp_vfs_fat_sdmmc_mount_config_t mount_config = {
124124
.format_if_mount_failed = format_if_mount_failed,
125-
.max_files = 5,
125+
.max_files = maxOpenFiles,
126126
.allocation_unit_size = 0
127127
};
128128

‎libraries/SD_MMC/src/SD_MMC.h

Copy file name to clipboardExpand all lines: libraries/SD_MMC/src/SD_MMC.h
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ class SDMMCFS : public FS
5050
SDMMCFS(FSImplPtr impl);
5151
bool setPins(int clk, int cmd, int d0);
5252
bool setPins(int clk, int cmd, int d0, int d1, int d2, int d3);
53-
bool begin(const char * mountpoint="/sdcard", bool mode1bit=false, bool format_if_mount_failed=false, int sdmmc_frequency=BOARD_MAX_SDMMC_FREQ);
53+
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);
5454
void end();
5555
sdcard_type_t cardType();
5656
uint64_t cardSize();

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.