From 8d06c987d23dc4a8c1c2ece239dde23bbba89d8d Mon Sep 17 00:00:00 2001 From: wangmengyang Date: Mon, 16 Aug 2021 11:29:14 +0800 Subject: [PATCH 1/2] controller_hci_uart: fixed the deprecated Kconfig options in the example --- .../main/controller_hci_uart_demo.c | 10 +++++----- .../hci/controller_hci_uart/sdkconfig.defaults | 7 ++++--- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/examples/bluetooth/hci/controller_hci_uart/main/controller_hci_uart_demo.c b/examples/bluetooth/hci/controller_hci_uart/main/controller_hci_uart_demo.c index 9fa3b90fe7..6c554163cf 100644 --- a/examples/bluetooth/hci/controller_hci_uart/main/controller_hci_uart_demo.c +++ b/examples/bluetooth/hci/controller_hci_uart/main/controller_hci_uart_demo.c @@ -19,17 +19,17 @@ static const char *tag = "CONTROLLER_UART_HCI"; static void uart_gpio_reset(void) { -#if CONFIG_BT_HCI_UART_NO == 1 +#if CONFIG_BTDM_CTRL_HCI_UART_NO == 1 periph_module_enable(PERIPH_UART1_MODULE); -#elif CONFIG_BT_HCI_UART_NO == 2 +#elif CONFIG_BTDM_CTRL_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); +#ifdef CONFIG_BTDM_CTRL_HCI_UART_NO + ESP_LOGI(tag, "HCI UART%d Pin select: TX 5, RX, 18, CTS 23, RTS 19", CONFIG_BTDM_CTRL_HCI_UART_NO); - uart_set_pin(CONFIG_BT_HCI_UART_NO, 5, 18, 19, 23); + uart_set_pin(CONFIG_BTDM_CTRL_HCI_UART_NO, 5, 18, 19, 23); #endif } diff --git a/examples/bluetooth/hci/controller_hci_uart/sdkconfig.defaults b/examples/bluetooth/hci/controller_hci_uart/sdkconfig.defaults index 798c444b50..f1a0c525ab 100644 --- a/examples/bluetooth/hci/controller_hci_uart/sdkconfig.defaults +++ b/examples/bluetooth/hci/controller_hci_uart/sdkconfig.defaults @@ -13,6 +13,7 @@ CONFIG_BTDM_CTRL_BR_EDR_MAX_ACL_CONN=7 CONFIG_BTDM_CTRL_BR_EDR_MAX_SYNC_CONN=3 CONFIG_BT_BLUEDROID_ENABLED=n CONFIG_BT_CONTROLLER_ONLY=y -CONFIG_BT_HCI_UART=y -CONFIG_BT_HCI_UART_NO_DEFAULT=1 -CONFIG_BT_HCI_UART_BAUDRATE_DEFAULT=921600 +CONFIG_BTDM_CTRL_HCI_MODE_UART_H4=y +CONFIG_BTDM_CTRL_HCI_UART_NO=1 +CONFIG_BTDM_CTRL_HCI_UART_BAUDRATE=921600 +CONFIG_BTDM_CTRL_MODEM_SLEEP=n From 194b510125cceddb71760970318ddc69a5611454 Mon Sep 17 00:00:00 2001 From: wangmengyang Date: Mon, 16 Aug 2021 11:46:19 +0800 Subject: [PATCH 2/2] controller_hci_uart: rename the example with suffix "_esp32" --- .../CMakeLists.txt | 0 .../{controller_hci_uart => controller_hci_uart_esp32}/Makefile | 0 .../{controller_hci_uart => controller_hci_uart_esp32}/README.md | 0 .../main/CMakeLists.txt | 0 .../main/component.mk | 0 .../main/controller_hci_uart_demo.c | 0 .../sdkconfig.defaults | 0 7 files changed, 0 insertions(+), 0 deletions(-) rename examples/bluetooth/hci/{controller_hci_uart => controller_hci_uart_esp32}/CMakeLists.txt (100%) rename examples/bluetooth/hci/{controller_hci_uart => controller_hci_uart_esp32}/Makefile (100%) rename examples/bluetooth/hci/{controller_hci_uart => controller_hci_uart_esp32}/README.md (100%) rename examples/bluetooth/hci/{controller_hci_uart => controller_hci_uart_esp32}/main/CMakeLists.txt (100%) rename examples/bluetooth/hci/{controller_hci_uart => controller_hci_uart_esp32}/main/component.mk (100%) rename examples/bluetooth/hci/{controller_hci_uart => controller_hci_uart_esp32}/main/controller_hci_uart_demo.c (100%) rename examples/bluetooth/hci/{controller_hci_uart => controller_hci_uart_esp32}/sdkconfig.defaults (100%) diff --git a/examples/bluetooth/hci/controller_hci_uart/CMakeLists.txt b/examples/bluetooth/hci/controller_hci_uart_esp32/CMakeLists.txt similarity index 100% rename from examples/bluetooth/hci/controller_hci_uart/CMakeLists.txt rename to examples/bluetooth/hci/controller_hci_uart_esp32/CMakeLists.txt diff --git a/examples/bluetooth/hci/controller_hci_uart/Makefile b/examples/bluetooth/hci/controller_hci_uart_esp32/Makefile similarity index 100% rename from examples/bluetooth/hci/controller_hci_uart/Makefile rename to examples/bluetooth/hci/controller_hci_uart_esp32/Makefile diff --git a/examples/bluetooth/hci/controller_hci_uart/README.md b/examples/bluetooth/hci/controller_hci_uart_esp32/README.md similarity index 100% rename from examples/bluetooth/hci/controller_hci_uart/README.md rename to examples/bluetooth/hci/controller_hci_uart_esp32/README.md diff --git a/examples/bluetooth/hci/controller_hci_uart/main/CMakeLists.txt b/examples/bluetooth/hci/controller_hci_uart_esp32/main/CMakeLists.txt similarity index 100% rename from examples/bluetooth/hci/controller_hci_uart/main/CMakeLists.txt rename to examples/bluetooth/hci/controller_hci_uart_esp32/main/CMakeLists.txt diff --git a/examples/bluetooth/hci/controller_hci_uart/main/component.mk b/examples/bluetooth/hci/controller_hci_uart_esp32/main/component.mk similarity index 100% rename from examples/bluetooth/hci/controller_hci_uart/main/component.mk rename to examples/bluetooth/hci/controller_hci_uart_esp32/main/component.mk diff --git a/examples/bluetooth/hci/controller_hci_uart/main/controller_hci_uart_demo.c b/examples/bluetooth/hci/controller_hci_uart_esp32/main/controller_hci_uart_demo.c similarity index 100% rename from examples/bluetooth/hci/controller_hci_uart/main/controller_hci_uart_demo.c rename to examples/bluetooth/hci/controller_hci_uart_esp32/main/controller_hci_uart_demo.c diff --git a/examples/bluetooth/hci/controller_hci_uart/sdkconfig.defaults b/examples/bluetooth/hci/controller_hci_uart_esp32/sdkconfig.defaults similarity index 100% rename from examples/bluetooth/hci/controller_hci_uart/sdkconfig.defaults rename to examples/bluetooth/hci/controller_hci_uart_esp32/sdkconfig.defaults