Added maxOpenFiles to SDMMC (#6912)
This commit is contained in:
parent
097ff8b1f5
commit
43e5e02224
2 changed files with 3 additions and 3 deletions
|
|
@ -84,7 +84,7 @@ bool SDMMCFS::setPins(int clk, int cmd, int d0, int d1, int d2, int d3)
|
||||||
#endif
|
#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) {
|
if(_card) {
|
||||||
return true;
|
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 = {
|
esp_vfs_fat_sdmmc_mount_config_t mount_config = {
|
||||||
.format_if_mount_failed = format_if_mount_failed,
|
.format_if_mount_failed = format_if_mount_failed,
|
||||||
.max_files = 5,
|
.max_files = maxOpenFiles,
|
||||||
.allocation_unit_size = 0
|
.allocation_unit_size = 0
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -50,7 +50,7 @@ public:
|
||||||
SDMMCFS(FSImplPtr impl);
|
SDMMCFS(FSImplPtr impl);
|
||||||
bool setPins(int clk, int cmd, int d0);
|
bool setPins(int clk, int cmd, int d0);
|
||||||
bool setPins(int clk, int cmd, int d0, int d1, int d2, int d3);
|
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();
|
void end();
|
||||||
sdcard_type_t cardType();
|
sdcard_type_t cardType();
|
||||||
uint64_t cardSize();
|
uint64_t cardSize();
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue