fix sd card on for dev + mux pin

This commit is contained in:
jacqueline
2023-03-30 10:15:09 +11:00
parent a0ae39befe
commit 9799ab458d
2 changed files with 5 additions and 5 deletions
+4 -4
View File
@@ -42,9 +42,9 @@ class GpioExpander {
// 4 - key lock // 4 - key lock
// 5 - display reset // 5 - display reset
// 6 - NC // 6 - NC
// 7 - sd card power // 7 - sd card power (active low)
// Default to SD card off, inputs high. // Default to SD card off, inputs high.
static const uint8_t kPortADefault = 0b00011110; static const uint8_t kPortADefault = 0b10011110;
// Port B: // Port B:
// 0 - trs output enable // 0 - trs output enable
@@ -121,8 +121,8 @@ class GpioExpander {
/* Nicer value names for use with the SD_MUX_SWITCH pin. */ /* Nicer value names for use with the SD_MUX_SWITCH pin. */
enum SdController { enum SdController {
SD_MUX_ESP = 1, SD_MUX_ESP = 0,
SD_MUX_SAMD = 0, SD_MUX_SAMD = 1,
}; };
/** /**
+1 -1
View File
@@ -105,7 +105,7 @@ extern "C" void app_main(void) {
gpio.set_pin(drivers::GpioExpander::SD_MUX_EN_ACTIVE_LOW, 0); gpio.set_pin(drivers::GpioExpander::SD_MUX_EN_ACTIVE_LOW, 0);
gpio.set_pin(drivers::GpioExpander::SD_MUX_SWITCH, gpio.set_pin(drivers::GpioExpander::SD_MUX_SWITCH,
drivers::GpioExpander::SD_MUX_ESP); drivers::GpioExpander::SD_MUX_ESP);
gpio.set_pin(drivers::GpioExpander::SD_CARD_POWER_ENABLE, 1); gpio.set_pin(drivers::GpioExpander::SD_CARD_POWER_ENABLE, 0);
}); });
ESP_LOGI(TAG, "Init battery measurement"); ESP_LOGI(TAG, "Init battery measurement");