Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
feat(sdmmc): Check if power channel is specified
  • Loading branch information
P-R-O-C-H-Y committed Oct 21, 2024
commit 773e0a8a7a8482f898ffab31e0cf64d1892f624f
4 changes: 4 additions & 0 deletions libraries/SD_MMC/src/SD_MMC.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,9 @@ bool SDMMCFS::begin(const char *mountpoint, bool mode1bit, bool format_if_mount_
_mode1bit = mode1bit;

#ifdef SOC_SDMMC_IO_POWER_EXTERNAL
if(_power_channel == -1) {
log_i("On-chip power channel specified, use external power for SDMMC");
} else {
sd_pwr_ctrl_ldo_config_t ldo_config = {
.ldo_chan_id = _power_channel,
};
Expand All @@ -257,6 +260,7 @@ bool SDMMCFS::begin(const char *mountpoint, bool mode1bit, bool format_if_mount_
return false;
}
host.pwr_ctrl_handle = pwr_ctrl_handle;
}
#endif

#if defined(BOARD_SDMMC_POWER_PIN)
Expand Down
Loading