Skip to content

Commit

Permalink
Merge branch 'bugfix/fix_hci_uart_with_flow_ctrl_off' into 'master'
Browse files Browse the repository at this point in the history
fix(bt/example): Fixed UART HCI when flow control is off on ESP32C3

See merge request espressif/esp-idf!27712
  • Loading branch information
Isl2017 committed Feb 4, 2024
2 parents 24aba63 + 5c2c088 commit 4c190c5
Showing 1 changed file with 1 addition and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,6 @@ static const char *tag = "UHCI";
#define GPIO_OUTPUT_PIN_SEL ((1ULL<<GPIO_UART_TXD_OUT) | (1ULL<<GPIO_UART_RTS_OUT))
#define GPIO_INPUT_PIN_SEL ((1ULL<<GPIO_UART_RXD_IN) | (1ULL<<GPIO_UART_CTS_IN))

#ifdef CONFIG_EXAMPLE_HCI_UART_FLOW_CTRL_ENABLE
#define HCI_UART_FLOW_CTRL_ENABLE CONFIG_EXAMPLE_HCI_UART_FLOW_CTRL_ENABLE
#else
#define HCI_UART_FLOW_CTRL_ENABLE FALSE
#endif

// Operation functions for HCI UART Transport Layer
static bool hci_uart_tl_init(void);
static void hci_uart_tl_deinit(void);
Expand Down Expand Up @@ -209,7 +203,7 @@ void uhci_uart_install(void)
.data_bits = UART_DATA_8_BITS,
.parity = UART_PARITY_DISABLE,
.stop_bits = UART_STOP_BITS_1,
#if (HCI_UART_FLOW_CTRL_ENABLE == TRUE)
#ifdef CONFIG_EXAMPLE_HCI_UART_FLOW_CTRL_ENABLE
.flow_ctrl = UART_HW_FLOWCTRL_CTS_RTS,
#else
.flow_ctrl = UART_HW_FLOWCTRL_DISABLE,
Expand Down

0 comments on commit 4c190c5

Please sign in to comment.