From 0d0c9e7172c792de1881f6c6dcd09592453d3216 Mon Sep 17 00:00:00 2001 From: Tian Hao Date: Wed, 20 Sep 2017 18:13:51 +0800 Subject: [PATCH] fix example of controller_hci_uart peripheral clk init --- .../controller_hci_uart/main/controller_hci_uart_demo.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/examples/bluetooth/controller_hci_uart/main/controller_hci_uart_demo.c b/examples/bluetooth/controller_hci_uart/main/controller_hci_uart_demo.c index 0cce686de2..333b94e4a7 100644 --- a/examples/bluetooth/controller_hci_uart/main/controller_hci_uart_demo.c +++ b/examples/bluetooth/controller_hci_uart/main/controller_hci_uart_demo.c @@ -23,7 +23,14 @@ static const char *tag = "CONTROLLER_UART_HCI"; static void uart_gpio_reset(void) { -#if CONFIG_BT_HCI_UART_NO +#if CONFIG_BT_HCI_UART_NO == 1 + periph_module_enable(PERIPH_UART1_MODULE); +#elif CONFIG_BT_HCI_UART_NO == 2 + periph_module_enable(PERIPH_UART2_MODULE); +#endif + periph_module_enable(PERIPH_UHCI0_MODULE); + +#ifdef CONFIG_BT_HCI_UART_NO ESP_LOGI(tag, "HCI UART%d Pin select: TX 5, RX, 18, CTS 23, RTS 19", CONFIG_BT_HCI_UART_NO); uart_set_pin(CONFIG_BT_HCI_UART_NO, 5, 18, 19, 23);