feat(bt): Add API to get some information of Classic Bluetooth profile

This commit is contained in:
xiongweichao
2025-04-18 10:48:37 +08:00
parent b33394907b
commit f02e35363b
14 changed files with 102 additions and 14 deletions

View File

@@ -1,5 +1,5 @@
/*
* SPDX-FileCopyrightText: 2015-2024 Espressif Systems (Shanghai) CO LTD
* SPDX-FileCopyrightText: 2015-2025 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
@@ -642,4 +642,19 @@ esp_err_t esp_avrc_tg_send_rn_rsp(esp_avrc_rn_event_ids_t event_id, esp_avrc_rn_
}
esp_err_t esp_avrc_get_profile_status(esp_avrc_profile_status_t *profile_status)
{
if (esp_bluedroid_get_status() != ESP_BLUEDROID_STATUS_ENABLED) {
return ESP_ERR_INVALID_STATE;
}
if (profile_status == NULL) {
return ESP_ERR_INVALID_ARG;
}
memset(profile_status, 0, sizeof(esp_avrc_profile_status_t));
btc_avrc_get_profile_status(profile_status);
return ESP_OK;
}
#endif /* #if BTC_AV_INCLUDED */