Skip to content

Commit 18d8661

Browse files
authored
Merge branch 'espressif:release/v5.4' into release/v5.4
2 parents 35df29f + ef1a507 commit 18d8661

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

67 files changed

+688
-113
lines changed

components/bt/common/btc/core/btc_task.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -530,6 +530,9 @@ bt_status_t btc_init(void)
530530
return BT_STATUS_NOMEM;
531531
}
532532
#endif
533+
#if BTC_GAP_BT_INCLUDED
534+
btc_gap_bt_init();
535+
#endif
533536

534537
#if (BLE_INCLUDED == TRUE)
535538
btc_gap_callback_init();
@@ -548,6 +551,9 @@ bt_status_t btc_init(void)
548551

549552
void btc_deinit(void)
550553
{
554+
#if BTC_GAP_BT_INCLUDED
555+
btc_gap_bt_deinit();
556+
#endif
551557
#if BTC_DYNAMIC_MEMORY
552558
btc_deinit_mem();
553559
#endif

components/bt/controller/esp32c3/Kconfig.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -548,7 +548,7 @@ config BT_CTRL_BLE_SCAN
548548
default y
549549

550550
config BT_CTRL_BLE_SECURITY_ENABLE
551-
depends on BT_CTRL_RUN_IN_FLASH_ONLY && BT_CONTROLLER_ONLY
551+
depends on BT_CTRL_RUN_IN_FLASH_ONLY
552552
bool "Enable BLE security feature"
553553
default y
554554

components/bt/host/bluedroid/api/esp_a2dp_api.c

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* SPDX-FileCopyrightText: 2015-2021 Espressif Systems (Shanghai) CO LTD
2+
* SPDX-FileCopyrightText: 2015-2025 Espressif Systems (Shanghai) CO LTD
33
*
44
* SPDX-License-Identifier: Apache-2.0
55
*/
@@ -229,6 +229,21 @@ esp_err_t esp_a2d_media_ctrl(esp_a2d_media_ctrl_t ctrl)
229229
return (stat == BT_STATUS_SUCCESS) ? ESP_OK : ESP_FAIL;
230230
}
231231

232+
esp_err_t esp_a2d_get_profile_status(esp_a2d_profile_status_t *profile_status)
233+
{
234+
if (esp_bluedroid_get_status() != ESP_BLUEDROID_STATUS_ENABLED) {
235+
return ESP_ERR_INVALID_STATE;
236+
}
237+
if (profile_status == NULL) {
238+
return ESP_ERR_INVALID_ARG;
239+
}
240+
241+
memset(profile_status, 0, sizeof(esp_a2d_profile_status_t));
242+
btc_a2dp_get_profile_status(profile_status);
243+
244+
return ESP_OK;
245+
}
246+
232247
#if BTC_AV_SRC_INCLUDED
233248
esp_err_t esp_a2d_source_init(void)
234249
{

components/bt/host/bluedroid/api/esp_gap_bt_api.c

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* SPDX-FileCopyrightText: 2015-2024 Espressif Systems (Shanghai) CO LTD
2+
* SPDX-FileCopyrightText: 2015-2025 Espressif Systems (Shanghai) CO LTD
33
*
44
* SPDX-License-Identifier: Apache-2.0
55
*/
@@ -554,4 +554,20 @@ esp_err_t esp_bt_gap_get_device_name(void)
554554
return (btc_transfer_context(&msg, NULL, 0, NULL, NULL) == BT_STATUS_SUCCESS ? ESP_OK : ESP_FAIL);
555555
}
556556

557+
esp_err_t esp_bt_gap_get_profile_status(esp_bt_gap_profile_status_t *profile_status)
558+
{
559+
if (profile_status == NULL) {
560+
return ESP_ERR_INVALID_ARG;
561+
}
562+
563+
if (esp_bluedroid_get_status() != ESP_BLUEDROID_STATUS_ENABLED) {
564+
return ESP_ERR_INVALID_STATE;
565+
}
566+
567+
memset(profile_status, 0, sizeof(esp_bt_gap_profile_status_t));
568+
btc_gap_bt_status_get(profile_status);
569+
570+
return ESP_OK;
571+
}
572+
557573
#endif /* #if BTC_GAP_BT_INCLUDED == TRUE */

components/bt/host/bluedroid/api/esp_hf_ag_api.c

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* SPDX-FileCopyrightText: 2015-2023 Espressif Systems (Shanghai) CO LTD
2+
* SPDX-FileCopyrightText: 2015-2025 Espressif Systems (Shanghai) CO LTD
33
*
44
* SPDX-License-Identifier: Apache-2.0
55
*/
@@ -548,6 +548,21 @@ esp_err_t esp_hf_ag_register_data_callback(esp_hf_incoming_data_cb_t recv, esp_h
548548
return (status == BT_STATUS_SUCCESS) ? ESP_OK : ESP_FAIL;
549549
}
550550

551+
esp_err_t esp_hf_ag_get_profile_status(esp_hf_profile_status_t *profile_status)
552+
{
553+
if (esp_bluedroid_get_status() != ESP_BLUEDROID_STATUS_ENABLED) {
554+
return ESP_ERR_INVALID_STATE;
555+
}
556+
if (profile_status == NULL) {
557+
return ESP_ERR_INVALID_ARG;
558+
}
559+
560+
memset(profile_status, 0, sizeof(esp_hf_profile_status_t));
561+
btc_hf_get_profile_status(profile_status);
562+
563+
return ESP_OK;
564+
}
565+
551566
#if (BTM_SCO_HCI_INCLUDED == TRUE)
552567
esp_err_t esp_hf_ag_pkt_stat_nums_get(uint16_t sync_conn_handle)
553568
{

components/bt/host/bluedroid/api/esp_hf_client_api.c

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* SPDX-FileCopyrightText: 2015-2023 Espressif Systems (Shanghai) CO LTD
2+
* SPDX-FileCopyrightText: 2015-2025 Espressif Systems (Shanghai) CO LTD
33
*
44
* SPDX-License-Identifier: Apache-2.0
55
*/
@@ -515,6 +515,21 @@ esp_err_t esp_hf_client_register_data_callback(esp_hf_client_incoming_data_cb_t
515515
return (stat == BT_STATUS_SUCCESS) ? ESP_OK : ESP_FAIL;
516516
}
517517

518+
esp_err_t esp_hf_client_get_profile_status(esp_hf_client_profile_status_t *profile_status)
519+
{
520+
if (esp_bluedroid_get_status() != ESP_BLUEDROID_STATUS_ENABLED) {
521+
return ESP_ERR_INVALID_STATE;
522+
}
523+
if (profile_status == NULL) {
524+
return ESP_ERR_INVALID_ARG;
525+
}
526+
527+
memset(profile_status, 0, sizeof(esp_hf_client_profile_status_t));
528+
btc_hf_client_get_profile_status(profile_status);
529+
530+
return ESP_OK;
531+
}
532+
518533
#if (BTM_SCO_HCI_INCLUDED == TRUE)
519534
esp_err_t esp_hf_client_pkt_stat_nums_get(uint16_t sync_conn_handle)
520535
{

components/bt/host/bluedroid/api/esp_hidd_api.c

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* SPDX-FileCopyrightText: 2015-2021 Espressif Systems (Shanghai) CO LTD
2+
* SPDX-FileCopyrightText: 2015-2025 Espressif Systems (Shanghai) CO LTD
33
*
44
* SPDX-License-Identifier: Apache-2.0
55
*
@@ -167,4 +167,17 @@ esp_err_t esp_bt_hid_device_virtual_cable_unplug(void)
167167
return (stat == BT_STATUS_SUCCESS) ? ESP_OK : ESP_FAIL;
168168
}
169169

170+
esp_err_t esp_bt_hid_device_get_profile_status(esp_hidd_profile_status_t *profile_status)
171+
{
172+
ESP_BLUEDROID_STATUS_CHECK(ESP_BLUEDROID_STATUS_ENABLED);
173+
if (profile_status == NULL) {
174+
return ESP_ERR_INVALID_ARG;
175+
}
176+
177+
memset(profile_status, 0, sizeof(esp_hidd_profile_status_t));
178+
btc_hd_get_profile_status(profile_status);
179+
180+
return ESP_OK;
181+
}
182+
170183
#endif /* defined BTC_HD_INCLUDED && BTC_HD_INCLUDED == TRUE */

components/bt/host/bluedroid/api/esp_hidh_api.c

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* SPDX-FileCopyrightText: 2015-2021 Espressif Systems (Shanghai) CO LTD
2+
* SPDX-FileCopyrightText: 2015-2025 Espressif Systems (Shanghai) CO LTD
33
*
44
* SPDX-License-Identifier: Apache-2.0
55
*
@@ -247,4 +247,17 @@ esp_err_t esp_bt_hid_host_send_data(esp_bd_addr_t bd_addr, uint8_t *data, size_t
247247
return (stat == BT_STATUS_SUCCESS) ? ESP_OK : ESP_FAIL;
248248
}
249249

250+
esp_err_t esp_bt_hid_host_get_profile_status(esp_hidh_profile_status_t *profile_status)
251+
{
252+
ESP_BLUEDROID_STATUS_CHECK(ESP_BLUEDROID_STATUS_ENABLED);
253+
if (profile_status == NULL) {
254+
return ESP_ERR_INVALID_ARG;
255+
}
256+
257+
memset(profile_status, 0, sizeof(esp_hidh_profile_status_t));
258+
btc_hh_get_profile_status(profile_status);
259+
260+
return ESP_OK;
261+
}
262+
250263
#endif /* defined BTC_HH_INCLUDED && BTC_HH_INCLUDED == TRUE */

components/bt/host/bluedroid/api/esp_l2cap_bt_api.c

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* SPDX-FileCopyrightText: 2015-2022 Espressif Systems (Shanghai) CO LTD
2+
* SPDX-FileCopyrightText: 2015-2025 Espressif Systems (Shanghai) CO LTD
33
*
44
* SPDX-License-Identifier: Apache-2.0
55
*/
@@ -128,4 +128,17 @@ esp_err_t esp_bt_l2cap_vfs_unregister(void)
128128
return btc_l2cap_vfs_unregister();
129129
}
130130

131+
esp_err_t esp_bt_l2cap_get_protocol_status(esp_bt_l2cap_protocol_status_t *status)
132+
{
133+
ESP_BLUEDROID_STATUS_CHECK(ESP_BLUEDROID_STATUS_ENABLED);
134+
if (status == NULL) {
135+
return ESP_ERR_INVALID_ARG;
136+
}
137+
138+
memset(status, 0, sizeof(esp_bt_l2cap_protocol_status_t));
139+
btc_l2cap_get_protocol_status(status);
140+
141+
return ESP_OK;
142+
}
143+
131144
#endif ///defined BTC_L2CAP_INCLUDED && BTC_L2CAP_INCLUDED == TRUE

components/bt/host/bluedroid/api/esp_sdp_api.c

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -174,4 +174,17 @@ esp_err_t esp_sdp_remove_record(int record_handle)
174174
return (stat == BT_STATUS_SUCCESS) ? ESP_OK : ESP_FAIL;
175175
}
176176

177+
esp_err_t esp_sdp_get_protocol_status(esp_sdp_protocol_status_t *status)
178+
{
179+
ESP_BLUEDROID_STATUS_CHECK(ESP_BLUEDROID_STATUS_ENABLED);
180+
if (status == NULL) {
181+
return ESP_ERR_INVALID_ARG;
182+
}
183+
184+
memset(status, 0, sizeof(esp_sdp_protocol_status_t));
185+
btc_sdp_get_protocol_status(status);
186+
187+
return ESP_OK;
188+
}
189+
177190
#endif ///defined BTC_SDP_COMMON_INCLUDED && BTC_SDP_COMMON_INCLUDED == TRUE

0 commit comments

Comments
 (0)