diff options
| author | jacqueline <me@jacqueline.id.au> | 2022-11-21 10:18:42 +1100 |
|---|---|---|
| committer | jacqueline <me@jacqueline.id.au> | 2022-11-21 10:18:42 +1100 |
| commit | d82a7e3d941b216c3fdaf0e5662fbd072f511ddb (patch) | |
| tree | 698c682c87edb8a9d9459031c614652d4b90a560 /src/main | |
| parent | 1d340db87193ca589c3bd5df241ae0ed51a3100d (diff) | |
| download | tangara-fw-d82a7e3d941b216c3fdaf0e5662fbd072f511ddb.tar.gz | |
first go at r2 bringup. waiting on mosfets.
Diffstat (limited to 'src/main')
| -rw-r--r-- | src/main/main.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/main/main.cpp b/src/main/main.cpp index a18e12d0..03dfcae9 100644 --- a/src/main/main.cpp +++ b/src/main/main.cpp @@ -101,6 +101,14 @@ extern "C" void app_main(void) { ESP_LOGI(TAG, "Init GPIOs"); drivers::GpioExpander* expander = new drivers::GpioExpander(); + ESP_LOGI(TAG, "Enable power rails for development"); + expander->with( + [&](auto& gpio) { + gpio.set_pin(drivers::GpioExpander::AUDIO_POWER_ENABLE, 1); + gpio.set_pin(drivers::GpioExpander::SD_CARD_POWER_ENABLE, 1); + gpio.set_pin(drivers::GpioExpander::SD_MUX_SWITCH, drivers::GpioExpander::SD_MUX_ESP); + }); + ESP_LOGI(TAG, "Init SD card"); auto storage_res = drivers::SdStorage::create(expander); if (storage_res.has_error()) { |
