Merge branch 'bugfix/custom_log_uart_rx_pin_v3.2' into 'release/v3.2'

bootloader_support: Fix UART RXD pin for console output (CUSTOM option) (v3.2)

See merge request idf/esp-idf!5032
This commit is contained in:
Angus Gratton 2019-06-03 14:23:55 +08:00
commit 8e51f7e236
2 changed files with 9 additions and 3 deletions

View file

@ -33,12 +33,10 @@
#include "soc/cpu.h" #include "soc/cpu.h"
#include "soc/rtc.h" #include "soc/rtc.h"
#include "soc/dport_reg.h" #include "soc/dport_reg.h"
#include "soc/io_mux_reg.h"
#include "soc/efuse_reg.h" #include "soc/efuse_reg.h"
#include "soc/rtc_cntl_reg.h" #include "soc/rtc_cntl_reg.h"
#include "soc/timer_group_reg.h" #include "soc/timer_group_reg.h"
#include "soc/gpio_reg.h" #include "soc/gpio_periph.h"
#include "soc/gpio_sig_map.h"
#include "soc/rtc_wdt.h" #include "soc/rtc_wdt.h"
#include "sdkconfig.h" #include "sdkconfig.h"
@ -444,6 +442,10 @@ static void uart_console_configure(void)
const uint32_t rx_idx_list[3] = { U0RXD_IN_IDX, U1RXD_IN_IDX, U2RXD_IN_IDX }; const uint32_t rx_idx_list[3] = { U0RXD_IN_IDX, U1RXD_IN_IDX, U2RXD_IN_IDX };
const uint32_t tx_idx = tx_idx_list[uart_num]; const uint32_t tx_idx = tx_idx_list[uart_num];
const uint32_t rx_idx = rx_idx_list[uart_num]; const uint32_t rx_idx = rx_idx_list[uart_num];
PIN_INPUT_ENABLE(GPIO_PIN_MUX_REG[uart_rx_gpio]);
gpio_pad_pullup(uart_rx_gpio);
gpio_matrix_out(uart_tx_gpio, tx_idx, 0, 0); gpio_matrix_out(uart_tx_gpio, tx_idx, 0, 0);
gpio_matrix_in(uart_rx_gpio, rx_idx, 0); gpio_matrix_in(uart_rx_gpio, rx_idx, 0);
} }

View file

@ -17,6 +17,10 @@
#include "stdint.h" #include "stdint.h"
#include "soc/gpio_pins.h" #include "soc/gpio_pins.h"
#include "soc/io_mux_reg.h" #include "soc/io_mux_reg.h"
#include "soc/gpio_struct.h"
#include "soc/gpio_reg.h"
#include "soc/gpio_sig_map.h"
#ifdef __cplusplus #ifdef __cplusplus
extern "C" extern "C"
{ {