docs(bt): update Classic Bluetooth api reference of HFP AG

This commit is contained in:
yangfeng
2025-12-10 15:03:47 +08:00
parent cfac6b313f
commit c4fa07d9a6
2 changed files with 33 additions and 28 deletions
@@ -17,29 +17,29 @@ extern "C" {
#endif
/* features masks of HF AG */
#define ESP_HF_PEER_FEAT_3WAY 0x01 /* Three-way calling */
#define ESP_HF_PEER_FEAT_ECNR 0x02 /* Echo cancellation and/or noise reduction */
#define ESP_HF_PEER_FEAT_VREC 0x04 /* Voice recognition */
#define ESP_HF_PEER_FEAT_INBAND 0x08 /* In-band ring tone */
#define ESP_HF_PEER_FEAT_VTAG 0x10 /* Attach a phone number to a voice tag */
#define ESP_HF_PEER_FEAT_REJECT 0x20 /* Ability to reject incoming call */
#define ESP_HF_PEER_FEAT_ECS 0x40 /* Enhanced Call Status */
#define ESP_HF_PEER_FEAT_ECC 0x80 /* Enhanced Call Control */
#define ESP_HF_PEER_FEAT_EXTERR 0x100 /* Extended error codes */
#define ESP_HF_PEER_FEAT_CODEC 0x200 /* Codec Negotiation */
#define ESP_HF_PEER_FEAT_3WAY 0x01 /*!< Three-way calling */
#define ESP_HF_PEER_FEAT_ECNR 0x02 /*!< Echo cancellation and/or noise reduction */
#define ESP_HF_PEER_FEAT_VREC 0x04 /*!< Voice recognition */
#define ESP_HF_PEER_FEAT_INBAND 0x08 /*!< In-band ring tone */
#define ESP_HF_PEER_FEAT_VTAG 0x10 /*!< Attach a phone number to a voice tag */
#define ESP_HF_PEER_FEAT_REJECT 0x20 /*!< Ability to reject incoming call */
#define ESP_HF_PEER_FEAT_ECS 0x40 /*!< Enhanced Call Status */
#define ESP_HF_PEER_FEAT_ECC 0x80 /*!< Enhanced Call Control */
#define ESP_HF_PEER_FEAT_EXTERR 0x100 /*!< Extended error codes */
#define ESP_HF_PEER_FEAT_CODEC 0x200 /*!< Codec Negotiation */
/* HFP 1.7+ */
#define ESP_HF_PEER_FEAT_HF_IND 0x400 /* HF Indicators */
#define ESP_HF_PEER_FEAT_ESCO_S4 0x800 /* eSCO S4 Setting Supported */
#define ESP_HF_PEER_FEAT_HF_IND 0x400 /*!< HF Indicators */
#define ESP_HF_PEER_FEAT_ESCO_S4 0x800 /*!< eSCO S4 Setting Supported */
/* CHLD feature masks of HF AG */
#define ESP_HF_CHLD_FEAT_REL 0x01 /* 0 Release waiting call or held calls */
#define ESP_HF_CHLD_FEAT_REL_ACC 0x02 /* 1 Release active calls and accept other waiting or held call */
#define ESP_HF_CHLD_FEAT_REL_X 0x04 /* 1x Release specified active call only */
#define ESP_HF_CHLD_FEAT_HOLD_ACC 0x08 /* 2 Active calls on hold and accept other waiting or held call */
#define ESP_HF_CHLD_FEAT_PRIV_X 0x10 /* 2x Request private mode with specified call(put the rest on hold) */
#define ESP_HF_CHLD_FEAT_MERGE 0x20 /* 3 Add held call to multiparty */
#define ESP_HF_CHLD_FEAT_MERGE_DETACH 0x40 /* 4 Connect two calls and leave(disconnect from multiparty) */
#define ESP_HF_CHLD_FEAT_REL 0x01 /*!< 0 Release waiting call or held calls */
#define ESP_HF_CHLD_FEAT_REL_ACC 0x02 /*!< 1 Release active calls and accept other waiting or held call */
#define ESP_HF_CHLD_FEAT_REL_X 0x04 /*!< 1x Release specified active call only */
#define ESP_HF_CHLD_FEAT_HOLD_ACC 0x08 /*!< 2 Active calls on hold and accept other waiting or held call */
#define ESP_HF_CHLD_FEAT_PRIV_X 0x10 /*!< 2x Request private mode with specified call(put the rest on hold) */
#define ESP_HF_CHLD_FEAT_MERGE 0x20 /*!< 3 Add held call to multiparty */
#define ESP_HF_CHLD_FEAT_MERGE_DETACH 0x40 /*!< 4 Connect two calls and leave(disconnect from multiparty) */
/// HF callback events
typedef enum
@@ -60,7 +60,7 @@ typedef enum
ESP_HF_ATA_RESPONSE_EVT, /*!< Answer an Incoming Call */
ESP_HF_CHUP_RESPONSE_EVT, /*!< Reject an Incoming Call */
ESP_HF_DIAL_EVT, /*!< Origin an outgoing call with specific number or the dial the last number */
ESP_HF_DIAL_EVT, /*!< Originate an outgoing call with specific number or dial the last number */
ESP_HF_WBS_RESPONSE_EVT, /*!< Codec Status */
ESP_HF_BCS_RESPONSE_EVT, /*!< Final Codec Choice */
ESP_HF_PKT_STAT_NUMS_GET_EVT, /*!< Request number of packet different status */
@@ -90,7 +90,7 @@ typedef union
* @brief ESP_HF_CONNECTION_STATE_EVT
*/
struct hf_conn_stat_param {
esp_bd_addr_t remote_bda; /*!< Remote bluetooth device address */
esp_bd_addr_t remote_bda; /*!< Remote Bluetooth device address */
esp_hf_connection_state_t state; /*!< Connection state */
uint32_t peer_feat; /*!< HF supported features */
uint32_t chld_feat; /*!< AG supported features on call hold and multiparty services */
@@ -228,10 +228,10 @@ typedef union
uint32_t rx_total; /*!< the total number of packets received */
uint32_t rx_correct; /*!< the total number of packets data correctly received */
uint32_t rx_err; /*!< the total number of packets data with possible invalid */
uint32_t rx_none; /*!< the total number of packets data no received */
uint32_t rx_none; /*!< the total number of packets data not received */
uint32_t rx_lost; /*!< the total number of packets data partially lost */
uint32_t tx_total; /*!< the total number of packets send */
uint32_t tx_discarded; /*!< the total number of packets send lost */
uint32_t tx_total; /*!< the total number of packets sent */
uint32_t tx_discarded; /*!< the total number of packets sent and lost */
} pkt_nums; /*!< AG callback param of ESP_HF_PKT_STAT_NUMS_GET_EVT */
/**
@@ -246,9 +246,9 @@ typedef union
/**
* @brief HF AG callback function type
*
* @param event : Event type
* @param[in] event : Event type
*
* @param param : Pointer to callback parameter
* @param[in] param : Pointer to callback parameter
*/
typedef void (* esp_hf_cb_t) (esp_hf_cb_event_t event, esp_hf_cb_param_t *param);
@@ -1,5 +1,10 @@
HFP AG API
==============
Bluetooth® HFP AG API
=====================
Overview
--------
HFP (Hands-Free Profile) AG API provides functions for a Bluetooth device to act as an Audio Gateway (AG), enabling communication with HFP Client devices such as headsets or car kits. It supports connection management, call handling, volume control, and other hands-free operations.
Application Examples
--------------------