diff options
| author | jacqueline <me@jacqueline.id.au> | 2023-01-17 13:47:30 +1100 |
|---|---|---|
| committer | jacqueline <me@jacqueline.id.au> | 2023-01-17 13:47:30 +1100 |
| commit | 41993ea509ac06658e2e51a542112c78da8f0453 (patch) | |
| tree | eb1bca91b1c4cc86e8435815e158cb6c36d60716 /src/main/main.cpp | |
| parent | 066455669cedd8df5383912082e89818bf778038 (diff) | |
| parent | d82a7e3d941b216c3fdaf0e5662fbd072f511ddb (diff) | |
| download | tangara-fw-41993ea509ac06658e2e51a542112c78da8f0453.tar.gz | |
Merge branch 'r2-bringup'
Diffstat (limited to 'src/main/main.cpp')
| -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()) { |
