Skip to content

Commit 5484129

Browse files
authored
CTS / RTS pins were swapped in this API (#6816)
espressif/esp-idf / components/driver/include/driver/uart.h defines the API: esp_err_t uart_set_pin(uart_port_t uart_num, int tx_io_num, int rx_io_num, int **rts_io_num**, int **cts_io_num**); uartSetPins uses that api but alls it with swapped CTS/RTS pins as its API uses a different pin ordering: uart_set_pin(uart->num, txPin, rxPin, **ctsPin**, **rtsPin**); This fixes the wrong order in the function uartSetPins
1 parent 3e8f7fe commit 5484129

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: cores/esp32/esp32-hal-uart.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ void uartSetPins(uart_t* uart, int8_t rxPin, int8_t txPin, int8_t ctsPin, int8_t
115115
}
116116
UART_MUTEX_LOCK();
117117
// IDF uart_set_pin() will issue necessary Error Message and take care of all GPIO Number validation.
118-
uart_set_pin(uart->num, txPin, rxPin, ctsPin, rtsPin);
118+
uart_set_pin(uart->num, txPin, rxPin, rtsPin, ctsPin);
119119
UART_MUTEX_UNLOCK();
120120
}
121121

0 commit comments

Comments
 (0)