diff --git a/components/bt/common/btc/profile/esp/blufi/nimble_host/esp_blufi.c b/components/bt/common/btc/profile/esp/blufi/nimble_host/esp_blufi.c index c8410ea37e..7e4ea095ff 100644 --- a/components/bt/common/btc/profile/esp/blufi/nimble_host/esp_blufi.c +++ b/components/bt/common/btc/profile/esp/blufi/nimble_host/esp_blufi.c @@ -20,7 +20,6 @@ #include "console/console.h" /*nimBLE Host*/ -#include "esp_nimble_hci.h" #include "nimble/nimble_port.h" #include "nimble/nimble_port_freertos.h" #include "host/ble_hs.h" diff --git a/components/protocomm/src/transports/protocomm_nimble.c b/components/protocomm/src/transports/protocomm_nimble.c index f0367c4ba5..92c9d9b87a 100644 --- a/components/protocomm/src/transports/protocomm_nimble.c +++ b/components/protocomm/src/transports/protocomm_nimble.c @@ -14,7 +14,6 @@ #include "protocomm_priv.h" /* NimBLE */ -#include "esp_nimble_hci.h" #include "nimble/nimble_port.h" #include "nimble/nimble_port_freertos.h" #include "host/ble_hs.h" @@ -481,7 +480,6 @@ static int simple_ble_start(const simple_ble_cfg_t *cfg) int rc; ESP_LOGD(TAG, "Free memory at start of simple_ble_init %d", esp_get_free_heap_size()); - ESP_ERROR_CHECK(esp_nimble_hci_and_controller_init()); nimble_port_init(); /* Initialize the NimBLE host configuration. */ @@ -954,10 +952,6 @@ esp_err_t protocomm_ble_stop(protocomm_t *pc) ret = nimble_port_stop(); if (ret == 0) { nimble_port_deinit(); - ret = esp_nimble_hci_and_controller_deinit(); - if (ret != ESP_OK) { - ESP_LOGE(TAG, "esp_nimble_hci_and_controller_deinit() failed with error: %d", ret); - } } free_gatt_ble_misc_memory(ble_cfg_p); diff --git a/examples/bluetooth/blufi/main/blufi_init.c b/examples/bluetooth/blufi/main/blufi_init.c index b236d8bbf2..f942dc1aaf 100644 --- a/examples/bluetooth/blufi/main/blufi_init.c +++ b/examples/bluetooth/blufi/main/blufi_init.c @@ -1,5 +1,5 @@ /* - * SPDX-FileCopyrightText: 2021 Espressif Systems (Shanghai) CO LTD + * SPDX-FileCopyrightText: 2021-2022 Espressif Systems (Shanghai) CO LTD * * SPDX-License-Identifier: Unlicense OR CC0-1.0 */ @@ -17,7 +17,6 @@ #endif #ifdef CONFIG_BT_NIMBLE_ENABLED -#include "esp_nimble_hci.h" #include "nimble/nimble_port.h" #include "nimble/nimble_port_freertos.h" #include "host/ble_hs.h" @@ -110,7 +109,6 @@ void bleprph_host_task(void *param) esp_err_t esp_blufi_host_init(void) { - ESP_ERROR_CHECK(esp_nimble_hci_init()); nimble_port_init(); /* Initialize the NimBLE host configuration. */ ble_hs_cfg.reset_cb = blufi_on_reset; diff --git a/examples/bluetooth/esp_ble_mesh/common_components/example_init/ble_mesh_example_init.c b/examples/bluetooth/esp_ble_mesh/common_components/example_init/ble_mesh_example_init.c index bd659cf1ea..4d402d10a4 100644 --- a/examples/bluetooth/esp_ble_mesh/common_components/example_init/ble_mesh_example_init.c +++ b/examples/bluetooth/esp_ble_mesh/common_components/example_init/ble_mesh_example_init.c @@ -1,6 +1,6 @@ /* * SPDX-FileCopyrightText: 2017 Intel Corporation - * SPDX-FileCopyrightText: 2021 Espressif Systems (Shanghai) CO LTD + * SPDX-FileCopyrightText: 2021-2022 Espressif Systems (Shanghai) CO LTD * * SPDX-License-Identifier: Apache-2.0 */ @@ -16,7 +16,6 @@ #endif #ifdef CONFIG_BT_NIMBLE_ENABLED -#include "esp_nimble_hci.h" #include "nimble/nimble_port.h" #include "nimble/nimble_port_freertos.h" #include "host/ble_hs.h" @@ -139,8 +138,6 @@ esp_err_t bluetooth_init(void) return ESP_FAIL; } - ESP_ERROR_CHECK(esp_nimble_hci_and_controller_init()); - nimble_port_init(); /* Initialize the NimBLE host configuration. */ ble_hs_cfg.reset_cb = mesh_on_reset; diff --git a/examples/bluetooth/nimble/ble_spp/spp_client/main/main.c b/examples/bluetooth/nimble/ble_spp/spp_client/main/main.c index b659e559aa..01d955a849 100644 --- a/examples/bluetooth/nimble/ble_spp/spp_client/main/main.c +++ b/examples/bluetooth/nimble/ble_spp/spp_client/main/main.c @@ -7,7 +7,6 @@ #include "esp_log.h" #include "nvs_flash.h" /* BLE */ -#include "esp_nimble_hci.h" #include "nimble/nimble_port.h" #include "nimble/nimble_port_freertos.h" #include "host/ble_hs.h" @@ -423,8 +422,6 @@ app_main(void) } ESP_ERROR_CHECK(ret); - ESP_ERROR_CHECK(esp_nimble_hci_and_controller_init()); - nimble_port_init(); /* Initialize UART driver and start uart task */ diff --git a/examples/bluetooth/nimble/ble_spp/spp_server/main/main.c b/examples/bluetooth/nimble/ble_spp/spp_server/main/main.c index 89421a9504..0c040761c0 100644 --- a/examples/bluetooth/nimble/ble_spp/spp_server/main/main.c +++ b/examples/bluetooth/nimble/ble_spp/spp_server/main/main.c @@ -7,7 +7,6 @@ #include "esp_log.h" #include "nvs_flash.h" /* BLE */ -#include "esp_nimble_hci.h" #include "nimble/nimble_port.h" #include "nimble/nimble_port_freertos.h" #include "host/ble_hs.h" @@ -398,8 +397,6 @@ app_main(void) } ESP_ERROR_CHECK(ret); - ESP_ERROR_CHECK(esp_nimble_hci_and_controller_init()); - nimble_port_init(); /* Initialize uart driver and start uart task */ diff --git a/examples/bluetooth/nimble/blecent/main/main.c b/examples/bluetooth/nimble/blecent/main/main.c index d46ba3b12f..c1afc07bea 100644 --- a/examples/bluetooth/nimble/blecent/main/main.c +++ b/examples/bluetooth/nimble/blecent/main/main.c @@ -20,7 +20,6 @@ #include "esp_log.h" #include "nvs_flash.h" /* BLE */ -#include "esp_nimble_hci.h" #include "nimble/nimble_port.h" #include "nimble/nimble_port_freertos.h" #include "host/ble_hs.h" @@ -603,8 +602,6 @@ app_main(void) } ESP_ERROR_CHECK(ret); - ESP_ERROR_CHECK(esp_nimble_hci_and_controller_init()); - nimble_port_init(); /* Configure the host. */ ble_hs_cfg.reset_cb = blecent_on_reset; diff --git a/examples/bluetooth/nimble/blehr/main/main.c b/examples/bluetooth/nimble/blehr/main/main.c index d48d5e856b..deea67fc7e 100644 --- a/examples/bluetooth/nimble/blehr/main/main.c +++ b/examples/bluetooth/nimble/blehr/main/main.c @@ -21,7 +21,6 @@ #include "nvs_flash.h" #include "freertos/FreeRTOSConfig.h" /* BLE */ -#include "esp_nimble_hci.h" #include "nimble/nimble_port.h" #include "nimble/nimble_port_freertos.h" #include "host/ble_hs.h" @@ -281,8 +280,6 @@ void app_main(void) } ESP_ERROR_CHECK(ret); - ESP_ERROR_CHECK(esp_nimble_hci_and_controller_init()); - nimble_port_init(); /* Initialize the NimBLE host configuration */ ble_hs_cfg.sync_cb = blehr_on_sync; diff --git a/examples/bluetooth/nimble/blemesh/main/app_mesh.c b/examples/bluetooth/nimble/blemesh/main/app_mesh.c index 41f9cd2fc2..9c3e5af0ee 100644 --- a/examples/bluetooth/nimble/blemesh/main/app_mesh.c +++ b/examples/bluetooth/nimble/blemesh/main/app_mesh.c @@ -21,7 +21,6 @@ #include "nvs_flash.h" #include "freertos/FreeRTOSConfig.h" /* BLE */ -#include "esp_nimble_hci.h" #include "nimble/nimble_port.h" #include "nimble/nimble_port_freertos.h" #include "host/ble_hs.h" @@ -444,7 +443,6 @@ void app_main(void) } ESP_ERROR_CHECK(ret); - ESP_ERROR_CHECK(esp_nimble_hci_and_controller_init()); nimble_port_init(); ble_svc_gap_init(); diff --git a/examples/bluetooth/nimble/bleprph/main/main.c b/examples/bluetooth/nimble/bleprph/main/main.c index 61b011dc47..783d77d79c 100644 --- a/examples/bluetooth/nimble/bleprph/main/main.c +++ b/examples/bluetooth/nimble/bleprph/main/main.c @@ -20,7 +20,6 @@ #include "esp_log.h" #include "nvs_flash.h" /* BLE */ -#include "esp_nimble_hci.h" #include "nimble/nimble_port.h" #include "nimble/nimble_port_freertos.h" #include "host/ble_hs.h" @@ -422,8 +421,6 @@ app_main(void) } ESP_ERROR_CHECK(ret); - ESP_ERROR_CHECK(esp_nimble_hci_and_controller_init()); - nimble_port_init(); /* Initialize the NimBLE host configuration. */ ble_hs_cfg.reset_cb = bleprph_on_reset; diff --git a/examples/bluetooth/nimble/bleprph_wifi_coex/main/main.c b/examples/bluetooth/nimble/bleprph_wifi_coex/main/main.c index 5a4e3b4811..9580f65397 100644 --- a/examples/bluetooth/nimble/bleprph_wifi_coex/main/main.c +++ b/examples/bluetooth/nimble/bleprph_wifi_coex/main/main.c @@ -18,7 +18,6 @@ #include "esp_log.h" #include "nvs_flash.h" /* BLE */ -#include "esp_nimble_hci.h" #include "nimble/nimble_port.h" #include "nimble/nimble_port_freertos.h" #include "host/ble_hs.h" @@ -539,7 +538,6 @@ app_main(void) ESP_LOGI(TAG, "ESP_WIFI_MODE_STA"); wifi_init_sta(); do_ping_cmd(); - ESP_ERROR_CHECK(esp_nimble_hci_and_controller_init()); nimble_port_init(); /* Initialize the NimBLE host configuration. */ diff --git a/examples/bluetooth/nimble/throughput_app/blecent_throughput/main/main.c b/examples/bluetooth/nimble/throughput_app/blecent_throughput/main/main.c index 85cdd8ca7e..c656678843 100644 --- a/examples/bluetooth/nimble/throughput_app/blecent_throughput/main/main.c +++ b/examples/bluetooth/nimble/throughput_app/blecent_throughput/main/main.c @@ -7,7 +7,6 @@ #include "esp_log.h" #include "nvs_flash.h" /* BLE */ -#include "esp_nimble_hci.h" #include "nimble/nimble_port.h" #include "nimble/nimble_port_freertos.h" #include "host/ble_hs.h" @@ -723,7 +722,6 @@ app_main(void) ret = nvs_flash_init(); } ESP_ERROR_CHECK(ret); - ESP_ERROR_CHECK(esp_nimble_hci_and_controller_init()); nimble_port_init(); diff --git a/examples/bluetooth/nimble/throughput_app/bleprph_throughput/main/main.c b/examples/bluetooth/nimble/throughput_app/bleprph_throughput/main/main.c index 94a79c8526..3631ae1df8 100644 --- a/examples/bluetooth/nimble/throughput_app/bleprph_throughput/main/main.c +++ b/examples/bluetooth/nimble/throughput_app/bleprph_throughput/main/main.c @@ -8,7 +8,6 @@ #include "nvs_flash.h" #include "freertos/FreeRTOSConfig.h" /* BLE */ -#include "esp_nimble_hci.h" #include "nimble/nimble_port.h" #include "nimble/nimble_port_freertos.h" #include "host/ble_hs.h" @@ -371,7 +370,6 @@ void app_main(void) ret = nvs_flash_init(); } ESP_ERROR_CHECK(ret); - ESP_ERROR_CHECK(esp_nimble_hci_and_controller_init()); nimble_port_init(); /* Initialize the NimBLE host configuration */ diff --git a/examples/system/ota/advanced_https_ota/main/ble_helper/ble_api.c b/examples/system/ota/advanced_https_ota/main/ble_helper/ble_api.c index dc8c0a4b5b..d6b2cf9398 100644 --- a/examples/system/ota/advanced_https_ota/main/ble_helper/ble_api.c +++ b/examples/system/ota/advanced_https_ota/main/ble_helper/ble_api.c @@ -1,16 +1,8 @@ -// Copyright 2021 Espressif Systems (Shanghai) PTE LTD -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +/* + * SPDX-FileCopyrightText: 2021-2022 Espressif Systems (Shanghai) CO LTD + * + * SPDX-License-Identifier: Apache-2.0 + */ #include "sdkconfig.h" @@ -79,8 +71,6 @@ void esp_ble_helper_init(void) #elif CONFIG_BT_NIMBLE_ENABLED - ESP_ERROR_CHECK(esp_nimble_hci_and_controller_init()); - nimble_port_init(); /* Initialize the NimBLE host configuration. */ ble_hs_cfg.reset_cb = bleprph_on_reset; diff --git a/examples/system/ota/advanced_https_ota/main/ble_helper/include/nimble_gatts.h b/examples/system/ota/advanced_https_ota/main/ble_helper/include/nimble_gatts.h index 8c52e7e81a..4acb52cefb 100644 --- a/examples/system/ota/advanced_https_ota/main/ble_helper/include/nimble_gatts.h +++ b/examples/system/ota/advanced_https_ota/main/ble_helper/include/nimble_gatts.h @@ -17,7 +17,6 @@ extern "C" { #include #include "nimble/ble.h" #include "modlog/modlog.h" -#include "esp_nimble_hci.h" #include "nimble/nimble_port.h" #include "nimble/nimble_port_freertos.h" #include "host/ble_hs.h" diff --git a/tools/ci/check_copyright_ignore.txt b/tools/ci/check_copyright_ignore.txt index 6d4bdbc07d..a31cd1231d 100644 --- a/tools/ci/check_copyright_ignore.txt +++ b/tools/ci/check_copyright_ignore.txt @@ -2011,7 +2011,6 @@ examples/system/ipc/ipc_isr/main/main.c examples/system/light_sleep/example_test.py examples/system/ota/advanced_https_ota/example_test.py examples/system/ota/advanced_https_ota/main/advanced_https_ota_example.c -examples/system/ota/advanced_https_ota/main/ble_helper/ble_api.c examples/system/ota/advanced_https_ota/main/ble_helper/include/ble_api.h examples/system/ota/native_ota_example/example_test.py examples/system/ota/native_ota_example/main/native_ota_example.c