From b5498f590e0746d8dc4e03d5e007f3d688e10e1f Mon Sep 17 00:00:00 2001 From: Rodrigo Garcia <65977697+SuGlider@users.noreply.github.com> Date: Wed, 14 Jul 2021 19:14:05 -0300 Subject: [PATCH 1/2] pinMatrixInDetach() has wrong parameter This solves issue #5112 Call to pinMatrixInDetach() was changed from version 1.0.6 in version 2.0.0 injecting a bug as seen in cores/esp32/esp32-hal-uart.c https://github.com/espressif/arduino-esp32/commit/80418fadcfb91c75d5100a8fddeb9318a8ef7d42 --- cores/esp32/esp32-hal-uart.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cores/esp32/esp32-hal-uart.c b/cores/esp32/esp32-hal-uart.c index ad01710ad81..11d442b9d68 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_RDX_IDX(uart->num), false, false); uartDisableInterrupt(uart); } From cede92ffbb79982d99c2fe1bd6f0ff718410848f Mon Sep 17 00:00:00 2001 From: Me No Dev Date: Thu, 15 Jul 2021 01:32:05 +0300 Subject: [PATCH 2/2] Fix typo --- cores/esp32/esp32-hal-uart.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cores/esp32/esp32-hal-uart.c b/cores/esp32/esp32-hal-uart.c index 11d442b9d68..a99adf44980 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(UART_RDX_IDX(uart->num), false, false); + pinMatrixInDetach(UART_RXD_IDX(uart->num), false, false); uartDisableInterrupt(uart); }