Skip to content

Commit

Permalink
Removed getter implementation and commented usage in examples
Browse files Browse the repository at this point in the history
  • Loading branch information
PilnyTomas committed Jul 4, 2023
1 parent 0e5e823 commit 20d20a9
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 60 deletions.
3 changes: 3 additions & 0 deletions libraries/SD_MMC/examples/SDMMC_Test/SDMMC_Test.ino
Original file line number Diff line number Diff line change
Expand Up @@ -225,11 +225,14 @@ void setup(){
}
#endif

/*
// This is waiting for implementation in peripheral manager (periman)
if(use_1_bit_mode){
Serial.printf("Begin in 1-bit mode; pins: CLK=%d, CMD=%d, D0=%d\n", SD_MMC.getClkPin(), SD_MMC.getCmdPin(), SD_MMC.getD0Pin());
}else{
Serial.printf("Begin in 4-bit mode; pins: CLK=%d, CMD=%d, D0=%d, D1=%d, D2=%d, D3=%d\n", SD_MMC.getClkPin(), SD_MMC.getCmdPin(), SD_MMC.getD0Pin(), SD_MMC.getD1Pin(), SD_MMC.getD2Pin(), SD_MMC.getD3Pin());
}
*/

if(!SD_MMC.begin("/sdcard", use_1_bit_mode)){
Serial.println("Card Mount Failed.");
Expand Down
3 changes: 3 additions & 0 deletions libraries/SD_MMC/examples/SDMMC_time/SDMMC_time.ino
Original file line number Diff line number Diff line change
Expand Up @@ -228,11 +228,14 @@ void setup(){
}
#endif

/*
// This is waiting for implementation in peripheral manager (periman)
if(use_1_bit_mode){
Serial.printf("Begin in 1-bit mode; pins: CLK=%d, CMD=%d, D0=%d\n", SD_MMC.getClkPin(), SD_MMC.getCmdPin(), SD_MMC.getD0Pin());
}else{
Serial.printf("Begin in 4-bit mode; pins: CLK=%d, CMD=%d, D0=%d, D1=%d, D2=%d, D3=%d\n", SD_MMC.getClkPin(), SD_MMC.getCmdPin(), SD_MMC.getD0Pin(), SD_MMC.getD1Pin(), SD_MMC.getD2Pin(), SD_MMC.getD3Pin());
}
*/

if(!SD_MMC.begin("/sdcard", use_1_bit_mode)){
Serial.println("Card Mount Failed.");
Expand Down
54 changes: 0 additions & 54 deletions libraries/SD_MMC/src/SD_MMC.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -102,60 +102,6 @@ bool SDMMCFS::setPins(int clk, int cmd, int d0, int d1, int d2, int d3)
#endif
}

int SDMMCFS::getClkPin()
{
#ifdef SOC_SDMMC_USE_GPIO_MATRIX
return _pin_clk;
#elif CONFIG_IDF_TARGET_ESP32
return SDMMC_SLOT1_IOMUX_PIN_NUM_CLK;
#endif
}

int SDMMCFS::getCmdPin()
{
#ifdef SOC_SDMMC_USE_GPIO_MATRIX
return _pin_cmd;
#elif CONFIG_IDF_TARGET_ESP32
return SDMMC_SLOT1_IOMUX_PIN_NUM_CMD;
#endif
}

int SDMMCFS::getD0Pin()
{
#ifdef SOC_SDMMC_USE_GPIO_MATRIX
return _pin_d0;
#elif CONFIG_IDF_TARGET_ESP32
return SDMMC_SLOT1_IOMUX_PIN_NUM_D0;
#endif
}

int SDMMCFS::getD1Pin()
{
#ifdef SOC_SDMMC_USE_GPIO_MATRIX
return _pin_d1;
#elif CONFIG_IDF_TARGET_ESP32
return SDMMC_SLOT1_IOMUX_PIN_NUM_D1;
#endif
}

int SDMMCFS::getD2Pin()
{
#ifdef SOC_SDMMC_USE_GPIO_MATRIX
return _pin_d2;
#elif CONFIG_IDF_TARGET_ESP32
return SDMMC_SLOT1_IOMUX_PIN_NUM_D2;
#endif
}

int SDMMCFS::getD3Pin()
{
#ifdef SOC_SDMMC_USE_GPIO_MATRIX
return _pin_d3;
#elif CONFIG_IDF_TARGET_ESP32
return SDMMC_SLOT1_IOMUX_PIN_NUM_D3;
#endif
}

bool SDMMCFS::begin(const char * mountpoint, bool mode1bit, bool format_if_mount_failed, int sdmmc_frequency, uint8_t maxOpenFiles)
{
if(_card) {
Expand Down
6 changes: 0 additions & 6 deletions libraries/SD_MMC/src/SD_MMC.h
Original file line number Diff line number Diff line change
Expand Up @@ -48,12 +48,6 @@ class SDMMCFS : public FS
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);
int getClkPin();
int getCmdPin();
int getD0Pin();
int getD1Pin();
int getD2Pin();
int getD3Pin();
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();
Expand Down

0 comments on commit 20d20a9

Please sign in to comment.