diff --git a/cores/esp32/esp32-hal-uart.c b/cores/esp32/esp32-hal-uart.c index ad01710a..a99adf44 100644 --- a/cores/esp32/esp32-hal-uart.c +++ b/cores/esp32/esp32-hal-uart.c @@ -179,7 +179,7 @@ static void uartDetachRx(uart_t* uart, uint8_t rxPin) if(uart == NULL) { return; } - pinMatrixInDetach(rxPin, false, false); + pinMatrixInDetach(UART_RXD_IDX(uart->num), false, false); uartDisableInterrupt(uart); }