File tree Expand file tree Collapse file tree 1 file changed +11
-2
lines changed
src/AudioTools/CoreAudio/AudioAnalog Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -626,6 +626,14 @@ class AnalogDriverESP32V1 : public AnalogDriverBase {
626
626
return ok;
627
627
}
628
628
629
+ #ifdef ARDUINO
630
+ // dummy detach: w/o this it's failing
631
+ static bool adcDetachBus (void *bus) {
632
+ LOGD (" ===> adcDetachBus: %d" , bus);
633
+ return true ;
634
+ }
635
+ #endif
636
+
629
637
// / Cleanup Analog to Digital Converter
630
638
bool cleanup_rx () {
631
639
if (adc_handle==nullptr ) return true ;
@@ -648,8 +656,9 @@ class AnalogDriverESP32V1 : public AnalogDriverBase {
648
656
fifo_buffers = nullptr ;
649
657
}
650
658
651
- #ifdef ARDUINO
659
+ #ifdef ARDUINO
652
660
// Set all used pins/channels to INIT state
661
+ perimanSetBusDeinit (ESP32_BUS_TYPE_ADC_CONT, adcDetachBus);
653
662
for (int i = 0 ; i < cfg.channels ; i++) {
654
663
adc_channel_t adc_channel = cfg.adc_channels [i];
655
664
int io_pin;
@@ -660,7 +669,7 @@ class AnalogDriverESP32V1 : public AnalogDriverBase {
660
669
}
661
670
}
662
671
}
663
- #endif
672
+ #endif
664
673
adc_handle = nullptr ;
665
674
return true ; // Return true to indicate successful cleanup
666
675
}
You can’t perform that action at this time.
0 commit comments