Skip to content

Commit c0689ae

Browse files
esp32: Fix.
1 parent 120ce0f commit c0689ae

1 file changed

Lines changed: 0 additions & 20 deletions

File tree

ports/esp32/machine_sdcard.c

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -410,18 +410,6 @@ static mp_obj_t machine_sdcard_make_new(const mp_obj_type_t *type, size_t n_args
410410
}
411411
}
412412
#endif
413-
#if MP_SD_LDO
414-
415-
sd_pwr_ctrl_ldo_config_t ldo_config = {
416-
.ldo_chan_id = 4,
417-
};
418-
esp_err_t ret = sd_pwr_ctrl_new_on_chip_ldo(&ldo_config, &pwr_ctrl_handle);
419-
if (ret != ESP_OK) {
420-
mp_raise_ValueError(MP_ERROR_TEXT("Failed to create a new on-chip LDO power control driver"));
421-
//return ret;
422-
}
423-
self->host.pwr_ctrl_handle = pwr_ctrl_handle;
424-
#endif
425413
DEBUG_printf(" Calling init_slot()");
426414
check_esp_err(sdmmc_host_init_slot(self->host.slot, &slot_config));
427415
}
@@ -435,14 +423,6 @@ static mp_obj_t sd_deinit(mp_obj_t self_in) {
435423
sdcard_card_obj_t *self = self_in;
436424

437425
DEBUG_printf("De-init host\n");
438-
#if MP_SD_LDO
439-
esp_err_t ret = ESP_OK;
440-
441-
if (pwr_ctrl_handle) {
442-
ret |= sd_pwr_ctrl_del_on_chip_ldo(pwr_ctrl_handle);
443-
pwr_ctrl_handle = NULL;
444-
}
445-
#endif
446426
if (self->flags & SDCARD_CARD_FLAGS_HOST_INIT_DONE) {
447427
if (self->host.flags & SDMMC_HOST_FLAG_DEINIT_ARG) {
448428
self->host.deinit_p(self->host.slot);

0 commit comments

Comments
 (0)