mirror of
https://github.com/espressif/esp-idf.git
synced 2026-10-01 18:50:34 +03:00
fix(uart): lp uart rx iomux pin was not working as expected
Introduced in 8818157e42
The workaround in the commit routes the signal to LP GPIO matrix first.
When uses LP IOMUX pin as UART RX, the signal did not bypass the matrix,
which caused the issue.
This commit adds rtc_gpio_iomux_input and rtc_gpio_iomux_output APIs
to align with existing GPIO driver APIs.
This commit is contained in:
@@ -729,13 +729,12 @@ static bool uart_try_set_iomux_pin(uart_port_t uart_num, int io_num, uint32_t id
|
||||
}
|
||||
#if (SOC_UART_LP_NUM >= 1) && (SOC_RTCIO_PIN_COUNT >= 1)
|
||||
else {
|
||||
if (upin->input) {
|
||||
rtc_gpio_set_direction(io_num, RTC_GPIO_MODE_INPUT_ONLY);
|
||||
} else {
|
||||
rtc_gpio_set_direction(io_num, RTC_GPIO_MODE_OUTPUT_ONLY);
|
||||
}
|
||||
rtc_gpio_init(io_num);
|
||||
rtc_gpio_iomux_func_sel(io_num, upin->iomux_func);
|
||||
if (upin->input) {
|
||||
rtc_gpio_iomux_input(io_num, upin->iomux_func, upin->signal);
|
||||
} else {
|
||||
rtc_gpio_iomux_output(io_num, upin->iomux_func);
|
||||
}
|
||||
// undo the workaround done in uart_module_enable for RX pin
|
||||
#if !SOC_LP_GPIO_MATRIX_SUPPORTED
|
||||
if (upin->input) {
|
||||
|
||||
Reference in New Issue
Block a user