Skip to content

Commit c35b76e

Browse files
authored
fix(uart): fixes pins detaching - shall revert loopback
1 parent ef50176 commit c35b76e

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

cores/esp32/esp32-hal-uart.c

+2
Original file line numberDiff line numberDiff line change
@@ -166,13 +166,15 @@ static bool _uartDetachBus_RX(void *busptr) {
166166
// sanity check - it should never happen
167167
assert(busptr && "_uartDetachBus_RX bus NULL pointer.");
168168
uart_t *bus = (uart_t *)busptr;
169+
uart_set_loop_back(bus->num, false); // disable loopback
169170
return _uartDetachPins(bus->num, bus->_rxPin, UART_PIN_NO_CHANGE, UART_PIN_NO_CHANGE, UART_PIN_NO_CHANGE);
170171
}
171172

172173
static bool _uartDetachBus_TX(void *busptr) {
173174
// sanity check - it should never happen
174175
assert(busptr && "_uartDetachBus_TX bus NULL pointer.");
175176
uart_t *bus = (uart_t *)busptr;
177+
uart_set_loop_back(bus->num, false); // disable loopback
176178
return _uartDetachPins(bus->num, UART_PIN_NO_CHANGE, bus->_txPin, UART_PIN_NO_CHANGE, UART_PIN_NO_CHANGE);
177179
}
178180

0 commit comments

Comments
 (0)