diff --git a/components/bt/host/bluedroid/api/include/api/esp_bt_main.h b/components/bt/host/bluedroid/api/include/api/esp_bt_main.h index db6826e3062..b13ae94d0ea 100644 --- a/components/bt/host/bluedroid/api/include/api/esp_bt_main.h +++ b/components/bt/host/bluedroid/api/include/api/esp_bt_main.h @@ -70,7 +70,7 @@ esp_err_t esp_bluedroid_disable(void); * - ESP_OK : Succeed * - Other : Failed */ -esp_err_t esp_bluedroid_init(void) __attribute__((deprecated("Please use esp_bluedroid_init_with_cfg"))); +esp_err_t esp_bluedroid_init(void); /** * @brief Init and alloc the resource for bluetooth, must be prior to every bluetooth stuff. diff --git a/components/protocomm/src/simple_ble/simple_ble.c b/components/protocomm/src/simple_ble/simple_ble.c index a4184b52624..8a4ae0f3d91 100644 --- a/components/protocomm/src/simple_ble/simple_ble.c +++ b/components/protocomm/src/simple_ble/simple_ble.c @@ -237,8 +237,7 @@ esp_err_t simple_ble_start(simple_ble_cfg_t *cfg) } #endif - esp_bluedroid_config_t bluedroid_cfg = BT_BLUEDROID_INIT_CONFIG_DEFAULT(); - ret = esp_bluedroid_init_with_cfg(&bluedroid_cfg); + ret = esp_bluedroid_init(); if (ret) { ESP_LOGE(TAG, "%s init bluetooth failed %d", __func__, ret); return ret; diff --git a/docs/en/migration-guides/release-5.x/5.2/bluetooth-classic.rst b/docs/en/migration-guides/release-5.x/5.2/bluetooth-classic.rst deleted file mode 100644 index a8c8290e8b5..00000000000 --- a/docs/en/migration-guides/release-5.x/5.2/bluetooth-classic.rst +++ /dev/null @@ -1,15 +0,0 @@ -Bluetooth Classic -================= - -:link_to_translation:`zh_CN:[中文]` - -Bluedroid ---------- - - The following Bluedroid API have been removed: - - - :component_file:`bt/host/bluedroid/api/include/api/esp_bt_main.h` - - - Remove ``esp_err_t esp_bluedroid_init(void)`` - - - Bluedroid stack initialization API has been replaced by ``esp_err_t esp_bluedroid_init_with_cfg(esp_bluedroid_config_t *cfg)``. Macro ``BT_BLUEDROID_INIT_CONFIG_DEFAULT()`` provides the default configuration for the initialization. The original function can be deleted directly. diff --git a/docs/en/migration-guides/release-5.x/5.2/index.rst b/docs/en/migration-guides/release-5.x/5.2/index.rst index b8d55b1acea..bdd92fb4299 100644 --- a/docs/en/migration-guides/release-5.x/5.2/index.rst +++ b/docs/en/migration-guides/release-5.x/5.2/index.rst @@ -6,7 +6,6 @@ Migration from 5.1 to 5.2 .. toctree:: :maxdepth: 1 - bluetooth-classic gcc :SOC_IEEE802154_SUPPORTED: ieee802154 peripherals diff --git a/docs/zh_CN/migration-guides/release-5.x/5.2/bluetooth-classic.rst b/docs/zh_CN/migration-guides/release-5.x/5.2/bluetooth-classic.rst deleted file mode 100644 index 9deff911b83..00000000000 --- a/docs/zh_CN/migration-guides/release-5.x/5.2/bluetooth-classic.rst +++ /dev/null @@ -1,15 +0,0 @@ -经典蓝牙 -================= - -:link_to_translation:`en:[English]` - -Bluedroid ---------- - - 以下 Bluedroid API 已被移除: - - - :component_file:`bt/host/bluedroid/api/include/api/esp_bt_main.h` - - - 移除 ``esp_err_t esp_bluedroid_init(void)`` - - - Bluedroid 协议栈初始化 API 已被替换为 ``esp_err_t esp_bluedroid_init_with_cfg(esp_bluedroid_config_t *cfg)``。宏 ``BT_BLUEDROID_INIT_CONFIG_DEFAULT()`` 用于提供默认的初始化参数。原来的初始化函数可以直接删除。 diff --git a/docs/zh_CN/migration-guides/release-5.x/5.2/index.rst b/docs/zh_CN/migration-guides/release-5.x/5.2/index.rst index acdbb5246e1..8584364e236 100644 --- a/docs/zh_CN/migration-guides/release-5.x/5.2/index.rst +++ b/docs/zh_CN/migration-guides/release-5.x/5.2/index.rst @@ -6,7 +6,6 @@ .. toctree:: :maxdepth: 1 - bluetooth-classic gcc :SOC_IEEE802154_SUPPORTED: ieee802154 peripherals diff --git a/examples/bluetooth/bluedroid/ble/ble_ancs/main/ble_ancs_demo.c b/examples/bluetooth/bluedroid/ble/ble_ancs/main/ble_ancs_demo.c index 0098cc99384..82d9a94a18c 100644 --- a/examples/bluetooth/bluedroid/ble/ble_ancs/main/ble_ancs_demo.c +++ b/examples/bluetooth/bluedroid/ble/ble_ancs/main/ble_ancs_demo.c @@ -638,8 +638,8 @@ void app_main(void) } ESP_LOGI(BLE_ANCS_TAG, "%s init bluetooth", __func__); - esp_bluedroid_config_t bluedroid_cfg = BT_BLUEDROID_INIT_CONFIG_DEFAULT(); - ret = esp_bluedroid_init_with_cfg(&bluedroid_cfg); + + ret = esp_bluedroid_init(); if (ret) { ESP_LOGE(BLE_ANCS_TAG, "%s init bluetooth failed: %s", __func__, esp_err_to_name(ret)); return; diff --git a/examples/bluetooth/bluedroid/ble/ble_compatibility_test/main/ble_compatibility_test.c b/examples/bluetooth/bluedroid/ble/ble_compatibility_test/main/ble_compatibility_test.c index 6cbe1649808..fd2d2fa1731 100644 --- a/examples/bluetooth/bluedroid/ble/ble_compatibility_test/main/ble_compatibility_test.c +++ b/examples/bluetooth/bluedroid/ble/ble_compatibility_test/main/ble_compatibility_test.c @@ -658,8 +658,7 @@ void app_main(void) return; } - esp_bluedroid_config_t bluedroid_cfg = BT_BLUEDROID_INIT_CONFIG_DEFAULT(); - ret = esp_bluedroid_init_with_cfg(&bluedroid_cfg); + ret = esp_bluedroid_init(); if (ret) { ESP_LOGE(EXAMPLE_TAG, "%s init bluetooth failed: %s", __func__, esp_err_to_name(ret)); return; diff --git a/examples/bluetooth/bluedroid/ble/ble_eddystone/main/esp_eddystone_demo.c b/examples/bluetooth/bluedroid/ble/ble_eddystone/main/esp_eddystone_demo.c index 7bda9f093d3..6934993a7ae 100644 --- a/examples/bluetooth/bluedroid/ble/ble_eddystone/main/esp_eddystone_demo.c +++ b/examples/bluetooth/bluedroid/ble/ble_eddystone/main/esp_eddystone_demo.c @@ -1,5 +1,5 @@ /* - * SPDX-FileCopyrightText: 2021-2022 Espressif Systems (Shanghai) CO LTD + * SPDX-FileCopyrightText: 2021-2024 Espressif Systems (Shanghai) CO LTD * * SPDX-License-Identifier: Unlicense OR CC0-1.0 */ @@ -111,7 +111,7 @@ static void esp_gap_cb(esp_gap_ble_cb_event_t event, esp_ble_gap_cb_param_t* par return; } else { // The received adv data is a correct eddystone frame packet. - // Here, we get the eddystone infomation in eddystone_res, we can use the data in res to do other things. + // Here, we get the eddystone information in eddystone_res, we can use the data in res to do other things. // For example, just print them: ESP_LOGI(DEMO_TAG, "--------Eddystone Found----------"); esp_log_buffer_hex("EDDYSTONE_DEMO: Device address:", scan_result->scan_rst.bda, ESP_BD_ADDR_LEN); @@ -154,8 +154,7 @@ void esp_eddystone_appRegister(void) void esp_eddystone_init(void) { - esp_bluedroid_config_t bluedroid_cfg = BT_BLUEDROID_INIT_CONFIG_DEFAULT(); - esp_bluedroid_init_with_cfg(&bluedroid_cfg); + esp_bluedroid_init(); esp_bluedroid_enable(); esp_eddystone_appRegister(); } diff --git a/examples/bluetooth/bluedroid/ble/ble_hid_device_demo/main/ble_hidd_demo_main.c b/examples/bluetooth/bluedroid/ble/ble_hid_device_demo/main/ble_hidd_demo_main.c index c0e77c08a05..9b0df3e094e 100644 --- a/examples/bluetooth/bluedroid/ble/ble_hid_device_demo/main/ble_hidd_demo_main.c +++ b/examples/bluetooth/bluedroid/ble/ble_hid_device_demo/main/ble_hidd_demo_main.c @@ -216,8 +216,7 @@ void app_main(void) return; } - esp_bluedroid_config_t bluedroid_cfg = BT_BLUEDROID_INIT_CONFIG_DEFAULT(); - ret = esp_bluedroid_init_with_cfg(&bluedroid_cfg); + ret = esp_bluedroid_init(); if (ret) { ESP_LOGE(HID_DEMO_TAG, "%s init bluedroid failed", __func__); return; diff --git a/examples/bluetooth/bluedroid/ble/ble_ibeacon/main/ibeacon_demo.c b/examples/bluetooth/bluedroid/ble/ble_ibeacon/main/ibeacon_demo.c index de1d1f36c9b..3c3fd4dd1c6 100644 --- a/examples/bluetooth/bluedroid/ble/ble_ibeacon/main/ibeacon_demo.c +++ b/examples/bluetooth/bluedroid/ble/ble_ibeacon/main/ibeacon_demo.c @@ -156,8 +156,7 @@ void ble_ibeacon_appRegister(void) void ble_ibeacon_init(void) { - esp_bluedroid_config_t bluedroid_cfg = BT_BLUEDROID_INIT_CONFIG_DEFAULT(); - esp_bluedroid_init_with_cfg(&bluedroid_cfg); + esp_bluedroid_init(); esp_bluedroid_enable(); ble_ibeacon_appRegister(); } diff --git a/examples/bluetooth/bluedroid/ble/ble_spp_client/main/spp_client_demo.c b/examples/bluetooth/bluedroid/ble/ble_spp_client/main/spp_client_demo.c index b7af64f05d0..08549979a7d 100644 --- a/examples/bluetooth/bluedroid/ble/ble_spp_client/main/spp_client_demo.c +++ b/examples/bluetooth/bluedroid/ble/ble_spp_client/main/spp_client_demo.c @@ -1,5 +1,5 @@ /* - * SPDX-FileCopyrightText: 2021-2022 Espressif Systems (Shanghai) CO LTD + * SPDX-FileCopyrightText: 2021-2024 Espressif Systems (Shanghai) CO LTD * * SPDX-License-Identifier: Unlicense OR CC0-1.0 */ @@ -228,14 +228,14 @@ static void esp_gap_cb(esp_gap_ble_cb_event_t event, esp_ble_gap_cb_param_t *par ESP_LOGE(GATTC_TAG, "Scan start failed: %s", esp_err_to_name(err)); break; } - ESP_LOGI(GATTC_TAG, "Scan start successed"); + ESP_LOGI(GATTC_TAG, "Scan start successfully"); break; case ESP_GAP_BLE_SCAN_STOP_COMPLETE_EVT: if ((err = param->scan_stop_cmpl.status) != ESP_BT_STATUS_SUCCESS) { ESP_LOGE(GATTC_TAG, "Scan stop failed: %s", esp_err_to_name(err)); break; } - ESP_LOGI(GATTC_TAG, "Scan stop successed"); + ESP_LOGI(GATTC_TAG, "Scan stop successfully"); if (is_connect == false) { ESP_LOGI(GATTC_TAG, "Connect to the remote device."); esp_ble_gattc_open(gl_profile_tab[PROFILE_APP_ID].gattc_if, scan_rst.scan_rst.bda, scan_rst.scan_rst.ble_addr_type, true); @@ -409,11 +409,11 @@ static void gattc_profile_event_handler(esp_gattc_cb_event_t event, esp_gatt_if_ db = (esp_gattc_db_elem_t *)malloc(count*sizeof(esp_gattc_db_elem_t)); if(db == NULL){ - ESP_LOGE(GATTC_TAG,"%s:malloc db falied",__func__); + ESP_LOGE(GATTC_TAG,"%s:malloc db failed",__func__); break; } if(esp_ble_gattc_get_db(spp_gattc_if, spp_conn_id, spp_srv_start_handle, spp_srv_end_handle, db, &count) != ESP_GATT_OK){ - ESP_LOGE(GATTC_TAG,"%s:get db falied",__func__); + ESP_LOGE(GATTC_TAG,"%s:get db failed",__func__); break; } if(count != SPP_IDX_NB){ @@ -553,7 +553,7 @@ void uart_task(void *pvParameters) //Waiting for UART event. if (xQueueReceive(spp_uart_queue, (void * )&event, (TickType_t)portMAX_DELAY)) { switch (event.type) { - //Event of UART receving data + //Event of UART receiving data case UART_DATA: if (event.size && (is_connect == true) && (db != NULL) && ((db+SPP_IDX_SPP_DATA_RECV_VAL)->properties & (ESP_GATT_CHAR_PROP_BIT_WRITE_NR | ESP_GATT_CHAR_PROP_BIT_WRITE))) { uint8_t * temp = NULL; @@ -625,8 +625,8 @@ void app_main(void) } ESP_LOGI(GATTC_TAG, "%s init bluetooth", __func__); - esp_bluedroid_config_t bluedroid_cfg = BT_BLUEDROID_INIT_CONFIG_DEFAULT(); - ret = esp_bluedroid_init_with_cfg(&bluedroid_cfg); + + ret = esp_bluedroid_init(); if (ret) { ESP_LOGE(GATTC_TAG, "%s init bluetooth failed: %s", __func__, esp_err_to_name(ret)); return; diff --git a/examples/bluetooth/bluedroid/ble/ble_spp_server/main/ble_spp_server_demo.c b/examples/bluetooth/bluedroid/ble/ble_spp_server/main/ble_spp_server_demo.c index ac90e4eb2f3..3e42d95f8f3 100644 --- a/examples/bluetooth/bluedroid/ble/ble_spp_server/main/ble_spp_server_demo.c +++ b/examples/bluetooth/bluedroid/ble/ble_spp_server/main/ble_spp_server_demo.c @@ -686,8 +686,8 @@ void app_main(void) } ESP_LOGI(GATTS_TABLE_TAG, "%s init bluetooth", __func__); - esp_bluedroid_config_t bluedroid_cfg = BT_BLUEDROID_INIT_CONFIG_DEFAULT(); - ret = esp_bluedroid_init_with_cfg(&bluedroid_cfg); + + ret = esp_bluedroid_init(); if (ret) { ESP_LOGE(GATTS_TABLE_TAG, "%s init bluetooth failed: %s", __func__, esp_err_to_name(ret)); return; diff --git a/examples/bluetooth/bluedroid/ble/ble_throughput/throughput_client/main/example_ble_client_throughput.c b/examples/bluetooth/bluedroid/ble/ble_throughput/throughput_client/main/example_ble_client_throughput.c index 226a82f744f..e64f4a6f407 100644 --- a/examples/bluetooth/bluedroid/ble/ble_throughput/throughput_client/main/example_ble_client_throughput.c +++ b/examples/bluetooth/bluedroid/ble/ble_throughput/throughput_client/main/example_ble_client_throughput.c @@ -568,8 +568,7 @@ void app_main(void) return; } - esp_bluedroid_config_t bluedroid_cfg = BT_BLUEDROID_INIT_CONFIG_DEFAULT(); - ret = esp_bluedroid_init_with_cfg(&bluedroid_cfg); + ret = esp_bluedroid_init(); if (ret) { ESP_LOGE(GATTC_TAG, "%s init bluetooth failed, error code = %x", __func__, ret); return; diff --git a/examples/bluetooth/bluedroid/ble/ble_throughput/throughput_server/main/example_ble_server_throughput.c b/examples/bluetooth/bluedroid/ble/ble_throughput/throughput_server/main/example_ble_server_throughput.c index ceebe06f3b7..a1cf6ad1ac5 100644 --- a/examples/bluetooth/bluedroid/ble/ble_throughput/throughput_server/main/example_ble_server_throughput.c +++ b/examples/bluetooth/bluedroid/ble/ble_throughput/throughput_server/main/example_ble_server_throughput.c @@ -671,8 +671,8 @@ void app_main(void) ESP_LOGE(GATTS_TAG, "%s enable controller failed", __func__); return; } - esp_bluedroid_config_t bluedroid_cfg = BT_BLUEDROID_INIT_CONFIG_DEFAULT(); - ret = esp_bluedroid_init_with_cfg(&bluedroid_cfg); + + ret = esp_bluedroid_init(); if (ret) { ESP_LOGE(GATTS_TAG, "%s init bluetooth failed", __func__); return; diff --git a/examples/bluetooth/bluedroid/ble/gatt_client/main/gattc_demo.c b/examples/bluetooth/bluedroid/ble/gatt_client/main/gattc_demo.c index 3da6d7fa7cf..a06f91479f0 100644 --- a/examples/bluetooth/bluedroid/ble/gatt_client/main/gattc_demo.c +++ b/examples/bluetooth/bluedroid/ble/gatt_client/main/gattc_demo.c @@ -469,8 +469,7 @@ void app_main(void) return; } - esp_bluedroid_config_t bluedroid_cfg = BT_BLUEDROID_INIT_CONFIG_DEFAULT(); - ret = esp_bluedroid_init_with_cfg(&bluedroid_cfg); + ret = esp_bluedroid_init(); if (ret) { ESP_LOGE(GATTC_TAG, "%s init bluetooth failed: %s", __func__, esp_err_to_name(ret)); return; diff --git a/examples/bluetooth/bluedroid/ble/gatt_client/tutorial/Gatt_Client_Example_Walkthrough.md b/examples/bluetooth/bluedroid/ble/gatt_client/tutorial/Gatt_Client_Example_Walkthrough.md index 6e5b8930b48..a503f4aee02 100644 --- a/examples/bluetooth/bluedroid/ble/gatt_client/tutorial/Gatt_Client_Example_Walkthrough.md +++ b/examples/bluetooth/bluedroid/ble/gatt_client/tutorial/Gatt_Client_Example_Walkthrough.md @@ -25,7 +25,7 @@ This example is located in the examples folder of the ESP-IDF under the [bluetoo #include "esp_gatt_common_api.h" ``` -These `includes` are required for the FreeRTOS and underlaying system components to run, including the logging functionality and a library to store data in non-volatile flash memory. We are interested in `“bt.h”`, `“esp_bt_main.h”`, `"esp_gap_ble_api.h"` and `“esp_gattc_api.h”`, which expose the BLE APIs required to implement this example. +These `includes` are required for the FreeRTOS and underlying system components to run, including the logging functionality and a library to store data in non-volatile flash memory. We are interested in `“bt.h”`, `“esp_bt_main.h”`, `"esp_gap_ble_api.h"` and `“esp_gattc_api.h”`, which expose the BLE APIs required to implement this example. * `bt.h`: configures the BT controller and VHCI from the host side. * `esp_bt_main.h`: initializes and enables the Bluedroid stack. @@ -60,8 +60,7 @@ void app_main() return; } - esp_bluedroid_config_t bluedroid_cfg = BT_BLUEDROID_INIT_CONFIG_DEFAULT(); - ret = esp_bluedroid_init_with_cfg(&bluedroid_cfg); + ret = esp_bluedroid_init(); if (ret) { ESP_LOGE(GATTC_TAG, "%s init bluetooth failed, error code = %x", __func__, ret); return; @@ -137,8 +136,7 @@ There are four Bluetooth modes supported: After the initialization of the BT controller, the Bluedroid stack, which includes the common definitions and APIs for both BT Classic and BLE, is initialized and enabled by using: ```c -esp_bluedroid_config_t bluedroid_cfg = BT_BLUEDROID_INIT_CONFIG_DEFAULT(); -ret = esp_bluedroid_init_with_cfg(&bluedroid_cfg); +ret = esp_bluedroid_init(); ret = esp_bluedroid_enable(); ``` The main function ends by registering the GAP and GATT event handlers, as well as the Application Profile and set the maximum supported MTU size. diff --git a/examples/bluetooth/bluedroid/ble/gatt_security_client/main/example_ble_sec_gattc_demo.c b/examples/bluetooth/bluedroid/ble/gatt_security_client/main/example_ble_sec_gattc_demo.c index 1dc0fe95bc6..f5e60c0939b 100644 --- a/examples/bluetooth/bluedroid/ble/gatt_security_client/main/example_ble_sec_gattc_demo.c +++ b/examples/bluetooth/bluedroid/ble/gatt_security_client/main/example_ble_sec_gattc_demo.c @@ -545,8 +545,7 @@ void app_main(void) return; } - esp_bluedroid_config_t bluedroid_cfg = BT_BLUEDROID_INIT_CONFIG_DEFAULT(); - ret = esp_bluedroid_init_with_cfg(&bluedroid_cfg); + ret = esp_bluedroid_init(); if (ret) { ESP_LOGE(GATTC_TAG, "%s init bluetooth failed: %s", __func__, esp_err_to_name(ret)); return; diff --git a/examples/bluetooth/bluedroid/ble/gatt_security_server/main/example_ble_sec_gatts_demo.c b/examples/bluetooth/bluedroid/ble/gatt_security_server/main/example_ble_sec_gatts_demo.c index eb10addf8a2..a7b8ae3fdef 100644 --- a/examples/bluetooth/bluedroid/ble/gatt_security_server/main/example_ble_sec_gatts_demo.c +++ b/examples/bluetooth/bluedroid/ble/gatt_security_server/main/example_ble_sec_gatts_demo.c @@ -539,8 +539,8 @@ void app_main(void) } ESP_LOGI(GATTS_TABLE_TAG, "%s init bluetooth", __func__); - esp_bluedroid_config_t bluedroid_cfg = BT_BLUEDROID_INIT_CONFIG_DEFAULT(); - ret = esp_bluedroid_init_with_cfg(&bluedroid_cfg); + + ret = esp_bluedroid_init(); if (ret) { ESP_LOGE(GATTS_TABLE_TAG, "%s init bluetooth failed: %s", __func__, esp_err_to_name(ret)); return; diff --git a/examples/bluetooth/bluedroid/ble/gatt_server/main/gatts_demo.c b/examples/bluetooth/bluedroid/ble/gatt_server/main/gatts_demo.c index 18d2cc7aced..cc7de8e9576 100644 --- a/examples/bluetooth/bluedroid/ble/gatt_server/main/gatts_demo.c +++ b/examples/bluetooth/bluedroid/ble/gatt_server/main/gatts_demo.c @@ -701,8 +701,8 @@ void app_main(void) ESP_LOGE(GATTS_TAG, "%s enable controller failed: %s", __func__, esp_err_to_name(ret)); return; } - esp_bluedroid_config_t bluedroid_cfg = BT_BLUEDROID_INIT_CONFIG_DEFAULT(); - ret = esp_bluedroid_init_with_cfg(&bluedroid_cfg); + + ret = esp_bluedroid_init(); if (ret) { ESP_LOGE(GATTS_TAG, "%s init bluetooth failed: %s", __func__, esp_err_to_name(ret)); return; diff --git a/examples/bluetooth/bluedroid/ble/gatt_server/tutorial/Gatt_Server_Example_Walkthrough.md b/examples/bluetooth/bluedroid/ble/gatt_server/tutorial/Gatt_Server_Example_Walkthrough.md index 2de00d434b6..1f69db0fbb1 100644 --- a/examples/bluetooth/bluedroid/ble/gatt_server/tutorial/Gatt_Server_Example_Walkthrough.md +++ b/examples/bluetooth/bluedroid/ble/gatt_server/tutorial/Gatt_Server_Example_Walkthrough.md @@ -62,8 +62,8 @@ The entry point to this example is the app_main() function: ESP_LOGE(GATTS_TAG, "%s enable controller failed", __func__); return; } - esp_bluedroid_config_t bluedroid_cfg = BT_BLUEDROID_INIT_CONFIG_DEFAULT(); - ret = esp_bluedroid_init_with_cfg(&bluedroid_cfg); + + ret = esp_bluedroid_init(); if (ret) { ESP_LOGE(GATTS_TAG, "%s init bluetooth failed", __func__); return; @@ -132,8 +132,7 @@ There are four Bluetooth modes supported: After the initialization of the BT controller, the Bluedroid stack, which includes the common definitions and APIs for both BT Classic and BLE, is initialized and enabled by using: ```c -esp_bluedroid_config_t bluedroid_cfg = BT_BLUEDROID_INIT_CONFIG_DEFAULT(); -ret = esp_bluedroid_init_with_cfg(&bluedroid_cfg); +ret = esp_bluedroid_init(); ret = esp_bluedroid_enable(); ``` The Bluetooth stack is up and running at this point in the program flow, however the functionality of the application has not been defined yet. The functionality is defined by reacting to events such as what happens when another device tries to read or write parameters and establish a connection. The two main managers of events are the GAP and GATT event handlers. The application needs to register a callback function for each event handler in order to let the application know which functions are going to handle the GAP and GATT events: diff --git a/examples/bluetooth/bluedroid/ble/gatt_server_service_table/main/gatts_table_creat_demo.c b/examples/bluetooth/bluedroid/ble/gatt_server_service_table/main/gatts_table_creat_demo.c index 4bd81ddef2e..13539e19681 100644 --- a/examples/bluetooth/bluedroid/ble/gatt_server_service_table/main/gatts_table_creat_demo.c +++ b/examples/bluetooth/bluedroid/ble/gatt_server_service_table/main/gatts_table_creat_demo.c @@ -543,8 +543,7 @@ void app_main(void) return; } - esp_bluedroid_config_t bluedroid_cfg = BT_BLUEDROID_INIT_CONFIG_DEFAULT(); - ret = esp_bluedroid_init_with_cfg(&bluedroid_cfg); + ret = esp_bluedroid_init(); if (ret) { ESP_LOGE(GATTS_TABLE_TAG, "%s init bluetooth failed: %s", __func__, esp_err_to_name(ret)); return; diff --git a/examples/bluetooth/bluedroid/ble/gatt_server_service_table/tutorial/Gatt_Server_Service_Table_Example_Walkthrough.md b/examples/bluetooth/bluedroid/ble/gatt_server_service_table/tutorial/Gatt_Server_Service_Table_Example_Walkthrough.md index 623043e7132..6d96bea2602 100644 --- a/examples/bluetooth/bluedroid/ble/gatt_server_service_table/tutorial/Gatt_Server_Service_Table_Example_Walkthrough.md +++ b/examples/bluetooth/bluedroid/ble/gatt_server_service_table/tutorial/Gatt_Server_Service_Table_Example_Walkthrough.md @@ -101,8 +101,8 @@ void app_main() } ESP_LOGI(GATTS_TABLE_TAG, "%s init bluetooth", __func__); - esp_bluedroid_config_t bluedroid_cfg = BT_BLUEDROID_INIT_CONFIG_DEFAULT(); - ret = esp_bluedroid_init_with_cfg(&bluedroid_cfg); + + ret = esp_bluedroid_init(); if (ret) { ESP_LOGE(GATTS_TABLE_TAG, "%s init bluetooth failed", __func__); return; diff --git a/examples/bluetooth/bluedroid/ble/gattc_multi_connect/main/gattc_multi_connect.c b/examples/bluetooth/bluedroid/ble/gattc_multi_connect/main/gattc_multi_connect.c index 86ce49477fe..e09ca88cbbf 100644 --- a/examples/bluetooth/bluedroid/ble/gattc_multi_connect/main/gattc_multi_connect.c +++ b/examples/bluetooth/bluedroid/ble/gattc_multi_connect/main/gattc_multi_connect.c @@ -930,8 +930,7 @@ void app_main(void) return; } - esp_bluedroid_config_t bluedroid_cfg = BT_BLUEDROID_INIT_CONFIG_DEFAULT(); - ret = esp_bluedroid_init_with_cfg(&bluedroid_cfg); + ret = esp_bluedroid_init(); if (ret) { ESP_LOGE(GATTC_TAG, "%s init bluetooth failed: %s", __func__, esp_err_to_name(ret)); return; diff --git a/examples/bluetooth/bluedroid/ble_50/ble50_security_client/main/ble50_sec_gattc_demo.c b/examples/bluetooth/bluedroid/ble_50/ble50_security_client/main/ble50_sec_gattc_demo.c index 8ef8dffc722..f4a66878a5a 100644 --- a/examples/bluetooth/bluedroid/ble_50/ble50_security_client/main/ble50_sec_gattc_demo.c +++ b/examples/bluetooth/bluedroid/ble_50/ble50_security_client/main/ble50_sec_gattc_demo.c @@ -582,8 +582,7 @@ void app_main(void) return; } - esp_bluedroid_config_t bluedroid_cfg = BT_BLUEDROID_INIT_CONFIG_DEFAULT(); - ret = esp_bluedroid_init_with_cfg(&bluedroid_cfg); + ret = esp_bluedroid_init(); if (ret) { ESP_LOGE(GATTC_TAG, "%s init bluetooth failed: %s", __func__, esp_err_to_name(ret)); return; diff --git a/examples/bluetooth/bluedroid/ble_50/ble50_security_server/main/ble50_sec_gatts_demo.c b/examples/bluetooth/bluedroid/ble_50/ble50_security_server/main/ble50_sec_gatts_demo.c index abd4071d126..96b72098ae5 100644 --- a/examples/bluetooth/bluedroid/ble_50/ble50_security_server/main/ble50_sec_gatts_demo.c +++ b/examples/bluetooth/bluedroid/ble_50/ble50_security_server/main/ble50_sec_gatts_demo.c @@ -494,8 +494,8 @@ void app_main(void) } ESP_LOGI(GATTS_TABLE_TAG, "%s init bluetooth", __func__); - esp_bluedroid_config_t bluedroid_cfg = BT_BLUEDROID_INIT_CONFIG_DEFAULT(); - ret = esp_bluedroid_init_with_cfg(&bluedroid_cfg); + + ret = esp_bluedroid_init(); if (ret) { ESP_LOGE(GATTS_TABLE_TAG, "%s init bluetooth failed: %s", __func__, esp_err_to_name(ret)); return; diff --git a/examples/bluetooth/bluedroid/ble_50/multi-adv/main/multi_adv_demo.c b/examples/bluetooth/bluedroid/ble_50/multi-adv/main/multi_adv_demo.c index 2b0cdb1e451..8300633564f 100644 --- a/examples/bluetooth/bluedroid/ble_50/multi-adv/main/multi_adv_demo.c +++ b/examples/bluetooth/bluedroid/ble_50/multi-adv/main/multi_adv_demo.c @@ -1,5 +1,5 @@ /* - * SPDX-FileCopyrightText: 2021-2022 Espressif Systems (Shanghai) CO LTD + * SPDX-FileCopyrightText: 2021-2024 Espressif Systems (Shanghai) CO LTD * * SPDX-License-Identifier: Unlicense OR CC0-1.0 */ @@ -148,7 +148,7 @@ static uint8_t raw_scan_rsp_data_coded[] = { }; static esp_ble_gap_ext_adv_t ext_adv[4] = { - // instance, duration, peroid + // instance, duration, period [0] = {0, 0, 0}, [1] = {1, 0, 0}, [2] = {2, 0, 0}, @@ -213,8 +213,8 @@ void app_main(void) ESP_LOGE(LOG_TAG, "%s enable controller failed: %s", __func__, esp_err_to_name(ret)); return; } - esp_bluedroid_config_t bluedroid_cfg = BT_BLUEDROID_INIT_CONFIG_DEFAULT(); - ret = esp_bluedroid_init_with_cfg(&bluedroid_cfg); + + ret = esp_bluedroid_init(); if (ret) { ESP_LOGE(LOG_TAG, "%s init bluetooth failed: %s", __func__, esp_err_to_name(ret)); return; diff --git a/examples/bluetooth/bluedroid/ble_50/multi-adv/tutorial/Mulit_Adv_Example_Walkthrough.md b/examples/bluetooth/bluedroid/ble_50/multi-adv/tutorial/Mulit_Adv_Example_Walkthrough.md index 39c778d989a..369ed3f8452 100644 --- a/examples/bluetooth/bluedroid/ble_50/multi-adv/tutorial/Mulit_Adv_Example_Walkthrough.md +++ b/examples/bluetooth/bluedroid/ble_50/multi-adv/tutorial/Mulit_Adv_Example_Walkthrough.md @@ -27,7 +27,7 @@ First, let’s take a look at the include #include "sdkconfig.h" ``` -These includes are required for the FreeRTOS and underlaying system components to run, including the logging functionality and a library to store data in non-volatile flash memory. We are interested in `"esp_bt.h"`, `"esp_bt_main.h"`, `"esp_gap_ble_api.h"` and `"esp_gatts_api.h"`, which expose the BLE APIs required to implement this example. +These includes are required for the FreeRTOS and underlying system components to run, including the logging functionality and a library to store data in non-volatile flash memory. We are interested in `"esp_bt.h"`, `"esp_bt_main.h"`, `"esp_gap_ble_api.h"` and `"esp_gatts_api.h"`, which expose the BLE APIs required to implement this example. * `esp_bt.h`: implements BT controller and VHCI configuration procedures from the host side. * `esp_bt_main.h`: implements initialization and enabling of the Bluedroid stack. @@ -65,8 +65,8 @@ void app_main(void) ESP_LOGE(LOG_TAG, "%s enable controller failed: %s", __func__, esp_err_to_name(ret)); return; } - esp_bluedroid_config_t bluedroid_cfg = BT_BLUEDROID_INIT_CONFIG_DEFAULT(); - ret = esp_bluedroid_init_with_cfg(&bluedroid_cfg); + + ret = esp_bluedroid_init(); if (ret) { ESP_LOGE(LOG_TAG, "%s init bluetooth failed: %s", __func__, esp_err_to_name(ret)); return; @@ -145,8 +145,7 @@ There are four Bluetooth modes supported: After the initialization of the BT controller, the Bluedroid stack, which includes the common definitions and APIs for both BT Classic and BLE, is initialized and enabled by using: ```c -esp_bluedroid_config_t bluedroid_cfg = BT_BLUEDROID_INIT_CONFIG_DEFAULT(); -ret = esp_bluedroid_init_with_cfg(&bluedroid_cfg); +ret = esp_bluedroid_init(); ret = esp_bluedroid_enable(); ``` The Bluetooth stack is up and running at this point in the program flow, however the functionality of the application has not been defined yet. The functionality is defined by reacting to events @@ -174,7 +173,7 @@ typedef struct { uint32_t interval_min; /*!< ext adv minimum interval */ uint32_t interval_max; /*!< ext adv maximum interval */ esp_ble_adv_channel_t channel_map; /*!< ext adv channel map */ - esp_ble_addr_type_t own_addr_type; /*!< ext adv own addresss type */ + esp_ble_addr_type_t own_addr_type; /*!< ext adv own address type */ esp_ble_addr_type_t peer_addr_type; /*!< ext adv peer address type */ esp_bd_addr_t peer_addr; /*!< ext adv peer address */ esp_ble_adv_filter_t filter_policy; /*!< ext adv filter policy */ diff --git a/examples/bluetooth/bluedroid/ble_50/peroidic_adv/main/periodic_adv_demo.c b/examples/bluetooth/bluedroid/ble_50/peroidic_adv/main/periodic_adv_demo.c index c62dce9500f..240c7c2fcf4 100644 --- a/examples/bluetooth/bluedroid/ble_50/peroidic_adv/main/periodic_adv_demo.c +++ b/examples/bluetooth/bluedroid/ble_50/peroidic_adv/main/periodic_adv_demo.c @@ -1,5 +1,5 @@ /* - * SPDX-FileCopyrightText: 2021-2023 Espressif Systems (Shanghai) CO LTD + * SPDX-FileCopyrightText: 2021-2024 Espressif Systems (Shanghai) CO LTD * * SPDX-License-Identifier: Unlicense OR CC0-1.0 */ @@ -90,7 +90,7 @@ static uint8_t raw_ext_adv_data_2m[] = { }; static esp_ble_gap_ext_adv_t ext_adv[1] = { - // instance, duration, peroid + // instance, duration, period [0] = {EXT_ADV_HANDLE, 0, 0}, }; @@ -164,8 +164,8 @@ void app_main(void) ESP_LOGE(LOG_TAG, "%s enable controller failed: %s", __func__, esp_err_to_name(ret)); return; } - esp_bluedroid_config_t bluedroid_cfg = BT_BLUEDROID_INIT_CONFIG_DEFAULT(); - ret = esp_bluedroid_init_with_cfg(&bluedroid_cfg); + + ret = esp_bluedroid_init(); if (ret) { ESP_LOGE(LOG_TAG, "%s init bluetooth failed: %s", __func__, esp_err_to_name(ret)); return; diff --git a/examples/bluetooth/bluedroid/ble_50/peroidic_adv/tutorial/Periodic_adv_Example_Walkthrough.md b/examples/bluetooth/bluedroid/ble_50/peroidic_adv/tutorial/Periodic_adv_Example_Walkthrough.md index 2d17243a815..6cba5344822 100644 --- a/examples/bluetooth/bluedroid/ble_50/peroidic_adv/tutorial/Periodic_adv_Example_Walkthrough.md +++ b/examples/bluetooth/bluedroid/ble_50/peroidic_adv/tutorial/Periodic_adv_Example_Walkthrough.md @@ -66,8 +66,8 @@ void app_main(void) ESP_LOGE(LOG_TAG, "%s enable controller failed: %s", __func__, esp_err_to_name(ret)); return; } - esp_bluedroid_config_t bluedroid_cfg = BT_BLUEDROID_INIT_CONFIG_DEFAULT(); - ret = esp_bluedroid_init_with_cfg(&bluedroid_cfg); + + ret = esp_bluedroid_init(); if (ret) { ESP_LOGE(LOG_TAG, "%s init bluetooth failed: %s", __func__, esp_err_to_name(ret)); return; @@ -152,8 +152,7 @@ There are four Bluetooth modes supported: After the initialization of the BT controller, the Bluedroid stack, which includes the common definitions and APIs for both BT Classic and BLE, is initialized and enabled by using: ```c -esp_bluedroid_config_t bluedroid_cfg = BT_BLUEDROID_INIT_CONFIG_DEFAULT(); -ret = esp_bluedroid_init_with_cfg(&bluedroid_cfg); +ret = esp_bluedroid_init(); ret = esp_bluedroid_enable(); ``` The Bluetooth stack is up and running at this point in the program flow, however the functionality of the application has not been defined yet. The functionality is defined by reacting to events such as what happens when another device tries to read or write parameters and establish a connection. The two main managers of events are the GAP and GATT event handlers. The application needs to register a callback function for each event handler in order to let the application know which functions are going to handle the GAP and GATT events: @@ -178,7 +177,7 @@ typedef struct { uint32_t interval_min; /*!< ext adv minimum interval */ uint32_t interval_max; /*!< ext adv maximum interval */ esp_ble_adv_channel_t channel_map; /*!< ext adv channel map */ - esp_ble_addr_type_t own_addr_type; /*!< ext adv own addresss type */ + esp_ble_addr_type_t own_addr_type; /*!< ext adv own address type */ esp_ble_addr_type_t peer_addr_type; /*!< ext adv peer address type */ esp_bd_addr_t peer_addr; /*!< ext adv peer address */ esp_ble_adv_filter_t filter_policy; /*!< ext adv filter policy */ @@ -247,7 +246,7 @@ static uint8_t periodic_adv_raw_data[] = { ```c static esp_ble_gap_ext_adv_t ext_adv[1] = { - // instance, duration, peroid + // instance, duration, period [0] = {EXT_ADV_HANDLE, 0, 0}, }; ``` diff --git a/examples/bluetooth/bluedroid/ble_50/peroidic_sync/main/periodic_sync_demo.c b/examples/bluetooth/bluedroid/ble_50/peroidic_sync/main/periodic_sync_demo.c index fb3650529c2..3a7e56f5a1c 100644 --- a/examples/bluetooth/bluedroid/ble_50/peroidic_sync/main/periodic_sync_demo.c +++ b/examples/bluetooth/bluedroid/ble_50/peroidic_sync/main/periodic_sync_demo.c @@ -159,8 +159,8 @@ void app_main(void) ESP_LOGE(LOG_TAG, "%s enable controller failed: %s", __func__, esp_err_to_name(ret)); return; } - esp_bluedroid_config_t bluedroid_cfg = BT_BLUEDROID_INIT_CONFIG_DEFAULT(); - ret = esp_bluedroid_init_with_cfg(&bluedroid_cfg); + + ret = esp_bluedroid_init(); if (ret) { ESP_LOGE(LOG_TAG, "%s init bluetooth failed: %s", __func__, esp_err_to_name(ret)); return; diff --git a/examples/bluetooth/bluedroid/ble_50/peroidic_sync/tutorial/Periodic_Sync_Example_Walkthrough.md b/examples/bluetooth/bluedroid/ble_50/peroidic_sync/tutorial/Periodic_Sync_Example_Walkthrough.md index ab9e3740788..5ef065d57ec 100644 --- a/examples/bluetooth/bluedroid/ble_50/peroidic_sync/tutorial/Periodic_Sync_Example_Walkthrough.md +++ b/examples/bluetooth/bluedroid/ble_50/peroidic_sync/tutorial/Periodic_Sync_Example_Walkthrough.md @@ -49,7 +49,7 @@ With this information, the scanner can synchronize with the advertiser and they #include "freertos/semphr.h" ``` -These `includes` are required for the FreeRTOS and underlaying system components to run, including the logging functionality and a library to store data in non-volatile flash memory. We are interested in `“bt.h”`, `“esp_bt_main.h”`, `"esp_gap_ble_api.h"` and `“esp_gattc_api.h”`, which expose the BLE APIs required to implement this example. +These `includes` are required for the FreeRTOS and underlying system components to run, including the logging functionality and a library to store data in non-volatile flash memory. We are interested in `“bt.h”`, `“esp_bt_main.h”`, `"esp_gap_ble_api.h"` and `“esp_gattc_api.h”`, which expose the BLE APIs required to implement this example. * `esp_bt.h`: configures the BT controller and VHCI from the host side. * `esp_bt_main.h`: initializes and enables the Bluedroid stack. @@ -86,8 +86,8 @@ void app_main(void) ESP_LOGE(LOG_TAG, "%s enable controller failed: %s", __func__, esp_err_to_name(ret)); return; } - esp_bluedroid_config_t bluedroid_cfg = BT_BLUEDROID_INIT_CONFIG_DEFAULT(); - ret = esp_bluedroid_init_with_cfg(&bluedroid_cfg); + + ret = esp_bluedroid_init(); if (ret) { ESP_LOGE(LOG_TAG, "%s init bluetooth failed: %s", __func__, esp_err_to_name(ret)); return; @@ -152,8 +152,7 @@ There are four Bluetooth modes supported: After the initialization of the BT controller, the Bluedroid stack, which includes the common definitions and APIs for both BT Classic and BLE, is initialized and enabled by using: ```c -esp_bluedroid_config_t bluedroid_cfg = BT_BLUEDROID_INIT_CONFIG_DEFAULT(); -ret = esp_bluedroid_init_with_cfg(&bluedroid_cfg); +ret = esp_bluedroid_init(); ret = esp_bluedroid_enable(); ``` The main function ends by registering the GAP and GATT event handlers, as well as the Application Profile and set the maximum supported MTU size. @@ -190,7 +189,7 @@ The func will be called in the context of bin semaphore esp_ble_gap_set_ext_scan * @brief ext scan parameters */ typedef struct { - esp_ble_addr_type_t own_addr_type; /*!< ext scan own addresss type */ + esp_ble_addr_type_t own_addr_type; /*!< ext scan own address type */ esp_ble_scan_filter_t filter_policy; /*!< ext scan filter policy */ esp_ble_scan_duplicate_t scan_duplicate; /*!< ext scan duplicate scan */ esp_ble_ext_scan_cfg_mask_t cfg_mask; /*!< ext scan config mask */ @@ -213,7 +212,7 @@ can.*/ uint16_t scan_window; /*!< ext scan window. The duration of the LE scan . LE_Scan_Window shall be less than or equal to LE_Scan_Interval*/ - //Range: 0x0004 to 0x4000 //Defaul + //Range: 0x0004 to 0x4000 //Default t: 0x0010 (10 ms) //Time = N * 0.625 msec //Time Range: 2.5 msec to 10240 msec diff --git a/examples/bluetooth/bluedroid/bluedroid_host_only/bluedroid_host_only_uart/main/main.c b/examples/bluetooth/bluedroid/bluedroid_host_only/bluedroid_host_only_uart/main/main.c index 7bab44ab66d..465e0f780a0 100644 --- a/examples/bluetooth/bluedroid/bluedroid_host_only/bluedroid_host_only_uart/main/main.c +++ b/examples/bluetooth/bluedroid/bluedroid_host_only/bluedroid_host_only_uart/main/main.c @@ -1,5 +1,5 @@ /* - * SPDX-FileCopyrightText: 2021-2023 Espressif Systems (Shanghai) CO LTD + * SPDX-FileCopyrightText: 2021-2024 Espressif Systems (Shanghai) CO LTD * * SPDX-License-Identifier: Unlicense OR CC0-1.0 */ @@ -262,7 +262,7 @@ static void bt_app_gap_start_up(void) /* set discoverable and connectable mode, wait to be connected */ esp_bt_gap_set_scan_mode(ESP_BT_CONNECTABLE, ESP_BT_GENERAL_DISCOVERABLE); - /* inititialize device information and status */ + /* initialize device information and status */ bt_app_gap_init(); /* start to discover nearby Bluetooth devices */ @@ -291,8 +291,7 @@ void app_main(void) }; esp_bluedroid_attach_hci_driver(&operations); - esp_bluedroid_config_t bluedroid_cfg = BT_BLUEDROID_INIT_CONFIG_DEFAULT(); - if ((ret = esp_bluedroid_init_with_cfg(&bluedroid_cfg)) != ESP_OK) { + if ((ret = esp_bluedroid_init()) != ESP_OK) { ESP_LOGE(GAP_TAG, "%s initialize bluedroid failed: %s", __func__, esp_err_to_name(ret)); return; } diff --git a/examples/bluetooth/bluedroid/coex/gattc_gatts_coex/main/gattc_gatts_coex.c b/examples/bluetooth/bluedroid/coex/gattc_gatts_coex/main/gattc_gatts_coex.c index ee693bea523..dc7686d999e 100644 --- a/examples/bluetooth/bluedroid/coex/gattc_gatts_coex/main/gattc_gatts_coex.c +++ b/examples/bluetooth/bluedroid/coex/gattc_gatts_coex/main/gattc_gatts_coex.c @@ -1014,8 +1014,7 @@ void app_main(void) return; } - esp_bluedroid_config_t bluedroid_cfg = BT_BLUEDROID_INIT_CONFIG_DEFAULT(); - ret = esp_bluedroid_init_with_cfg(&bluedroid_cfg); + ret = esp_bluedroid_init(); if (ret) { ESP_LOGE(COEX_TAG, "%s init bluetooth failed: %s", __func__, esp_err_to_name(ret)); return; diff --git a/examples/bluetooth/blufi/main/blufi_init.c b/examples/bluetooth/blufi/main/blufi_init.c index fbde8b35cfc..f8fa5b8a4cc 100644 --- a/examples/bluetooth/blufi/main/blufi_init.c +++ b/examples/bluetooth/blufi/main/blufi_init.c @@ -32,8 +32,7 @@ esp_err_t esp_blufi_host_init(void) { int ret; - esp_bluedroid_config_t bluedroid_cfg = BT_BLUEDROID_INIT_CONFIG_DEFAULT(); - ret = esp_bluedroid_init_with_cfg(&bluedroid_cfg); + ret = esp_bluedroid_init(); if (ret) { BLUFI_ERROR("%s init bluedroid failed: %s\n", __func__, esp_err_to_name(ret)); return ESP_FAIL; 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 bcb6e348f2c..81600912b47 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 @@ -61,8 +61,8 @@ esp_err_t bluetooth_init(void) ESP_LOGE(TAG, "%s enable controller failed", __func__); return ret; } - esp_bluedroid_config_t bluedroid_cfg = BT_BLUEDROID_INIT_CONFIG_DEFAULT(); - ret = esp_bluedroid_init_with_cfg(&bluedroid_cfg); + + ret = esp_bluedroid_init(); if (ret) { ESP_LOGE(TAG, "%s init bluetooth failed", __func__); return ret; diff --git a/examples/bluetooth/esp_ble_mesh/wifi_coexist/tutorial/BLE_Mesh_WiFi_Coexist_Example_Walkthrough.md b/examples/bluetooth/esp_ble_mesh/wifi_coexist/tutorial/BLE_Mesh_WiFi_Coexist_Example_Walkthrough.md index c005a59df32..63a647fffca 100644 --- a/examples/bluetooth/esp_ble_mesh/wifi_coexist/tutorial/BLE_Mesh_WiFi_Coexist_Example_Walkthrough.md +++ b/examples/bluetooth/esp_ble_mesh/wifi_coexist/tutorial/BLE_Mesh_WiFi_Coexist_Example_Walkthrough.md @@ -173,8 +173,7 @@ This demo calls the `bluetooth_init` function to: After the initialization of the BT controller, the Bluedroid stack, which includes the common definitions and APIs for both BT Classic and BLE, is initialized and enabled by using: ``` - esp_bluedroid_config_t bluedroid_cfg = BT_BLUEDROID_INIT_CONFIG_DEFAULT(); - ret = esp_bluedroid_init_with_cfg(&bluedroid_cfg); + ret = esp_bluedroid_init(); ret = esp_bluedroid_enable(); ``` 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 701a6c7768a..390d146f3bd 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 @@ -36,8 +36,8 @@ esp_err_t esp_ble_helper_init(void) ESP_LOGE(TAG, "%s enable controller failed: %s", __func__, esp_err_to_name(err)); return err; } - esp_bluedroid_config_t bluedroid_cfg = BT_BLUEDROID_INIT_CONFIG_DEFAULT(); - err = esp_bluedroid_init_with_cfg(&bluedroid_cfg); + + err = esp_bluedroid_init(); if (err) { ESP_LOGE(TAG, "%s init bluetooth failed: %s", __func__, esp_err_to_name(err)); return err;