From b482439adf319341b78277bd6a81dbbf29f33c24 Mon Sep 17 00:00:00 2001 From: James Smith Date: Tue, 22 Sep 2026 16:06:54 -0700 Subject: [PATCH] esp32: disconnect pad from RMT during disable call --- src/backend/esp32/joybus.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/backend/esp32/joybus.c b/src/backend/esp32/joybus.c index 48e6c91..2b4edd9 100644 --- a/src/backend/esp32/joybus.c +++ b/src/backend/esp32/joybus.c @@ -19,6 +19,7 @@ #include #include #include +#include #include #if !SOC_RMT_SUPPORT_RX_PINGPONG @@ -660,7 +661,8 @@ static int joybus_esp32_disable(struct joybus *bus) rmt_ll_rx_enable(&RMT, data->rmt_rx_ch, false); rmt_ll_tx_stop(&RMT, data->rmt_tx_ch); - // Stop driving the line + // Hand the pad back to GPIO, since a pad routed to a peripheral takes its output enable from it + esp_rom_gpio_connect_out_signal(data->gpio, SIG_GPIO_OUT_IDX, false, false); gpio_ll_output_disable(&GPIO, data->gpio); // Disable interrupts for this bus's channels