mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-22 09:06:27 +00:00
feat(bt/bluedroid): Add supprot for specific indicator sending from AG to Client
This commit is contained in:

committed by
gongyantao

parent
5600da1cfe
commit
5875f1160e
@@ -402,7 +402,7 @@ esp_err_t esp_hf_ag_vra_control(esp_bd_addr_t remote_bda, esp_hf_vr_state_t valu
|
||||
*/
|
||||
esp_err_t esp_hf_ag_volume_control(esp_bd_addr_t remote_bda, esp_hf_volume_control_target_t type, int volume);
|
||||
|
||||
/**
|
||||
/**
|
||||
*
|
||||
* @brief Handle Unknown AT command from HFP Client.
|
||||
* As a precondition to use this API, Service Level Connection shall exist with HFP client.
|
||||
@@ -419,7 +419,7 @@ esp_err_t esp_hf_ag_volume_control(esp_bd_addr_t remote_bda, esp_hf_volume_contr
|
||||
*/
|
||||
esp_err_t esp_hf_ag_unknown_at_send(esp_bd_addr_t remote_addr, char *unat);
|
||||
|
||||
/**
|
||||
/**
|
||||
*
|
||||
* @brief Unsolicited send extend AT error code to HFP Client.
|
||||
* As a precondition to use this API, Service Level Connection shall exist with HFP client.
|
||||
@@ -435,7 +435,7 @@ esp_err_t esp_hf_ag_unknown_at_send(esp_bd_addr_t remote_addr, char *unat);
|
||||
*/
|
||||
esp_err_t esp_hf_ag_cmee_send(esp_bd_addr_t remote_bda, esp_hf_at_response_code_t response_code, esp_hf_cme_err_t error_code);
|
||||
|
||||
/**
|
||||
/**
|
||||
*
|
||||
* @brief Unsolicited send device status notification to HFP Client.
|
||||
* As a precondition to use this API, Service Level Connection shall exist with HFP client.
|
||||
@@ -452,10 +452,29 @@ esp_err_t esp_hf_ag_cmee_send(esp_bd_addr_t remote_bda, esp_hf_at_response_code_
|
||||
*
|
||||
*/
|
||||
esp_err_t esp_hf_ag_devices_status_indchange(esp_bd_addr_t remote_addr, esp_hf_call_status_t call_state,
|
||||
esp_hf_call_setup_status_t call_setup_state,
|
||||
esp_hf_network_state_t ntk_state, int signal);
|
||||
esp_hf_call_setup_status_t call_setup_state,
|
||||
esp_hf_network_state_t ntk_state, int signal) __attribute__((
|
||||
deprecated("Please use esp_hf_ag_ciev_report")
|
||||
));
|
||||
|
||||
/**
|
||||
/**
|
||||
*
|
||||
* @brief Send indicator report "+CIEV: <ind> <value>" to HFP Client. "CIEV" means “indicator events reporting",
|
||||
* and all indicator types can be sent one type at a time.
|
||||
* As a precondition to use this API, Service Level Connection shall exist with HFP client.
|
||||
*
|
||||
* @param[in] remote_addr: remote bluetooth device address
|
||||
* @param[in] ind_type: indicator type
|
||||
* @param[in] value: indicator value
|
||||
* @return
|
||||
* - ESP_OK: disconnect request is sent to lower layer
|
||||
* - ESP_INVALID_STATE: if bluetooth stack is not yet enabled
|
||||
* - ESP_FAIL: others
|
||||
*
|
||||
*/
|
||||
esp_err_t esp_hf_ag_ciev_report(esp_bd_addr_t remote_addr, esp_hf_ciev_report_type_t ind_type, int value);
|
||||
|
||||
/**
|
||||
*
|
||||
* @brief Response to device individual indicators to HFP Client.
|
||||
* As a precondition to use this API, Service Level Connection shall exist with HFP client.
|
||||
|
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2015-2021 Espressif Systems (Shanghai) CO LTD
|
||||
* SPDX-FileCopyrightText: 2015-2023 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
@@ -51,6 +51,17 @@ typedef enum
|
||||
ESP_HF_NETWORK_STATE_AVAILABLE
|
||||
} esp_hf_network_state_t;
|
||||
|
||||
/// +CIEV report type
|
||||
typedef enum {
|
||||
ESP_HF_IND_TYPE_CALL = 1, /*!< position of call indicator */
|
||||
ESP_HF_IND_TYPE_CALLSETUP, /*!< position of callsetup indicator */
|
||||
ESP_HF_IND_TYPE_SERVICE, /*!< position of service indicator */
|
||||
ESP_HF_IND_TYPE_SIGNAL, /*!< position of signal strength indicator, range: 0-5 */
|
||||
ESP_HF_IND_TYPE_ROAM, /*!< position of roaming indicator */
|
||||
ESP_HF_IND_TYPE_BATTCHG, /*!< position of battery charge indicator, range: 0-5 */
|
||||
ESP_HF_IND_TYPE_CALLHELD /*!< position of callheld indicator */
|
||||
} esp_hf_ciev_report_type_t;
|
||||
|
||||
/** +CIEV Service type */
|
||||
typedef enum
|
||||
{
|
||||
@@ -60,7 +71,7 @@ typedef enum
|
||||
|
||||
/// +CIND call status indicator values
|
||||
typedef enum {
|
||||
ESP_HF_CALL_STATUS_NO_CALLS = 0, /*!< no call in progress */
|
||||
ESP_HF_CALL_STATUS_NO_CALLS = 0, /*!< no call in progress */
|
||||
ESP_HF_CALL_STATUS_CALL_IN_PROGRESS = 1, /*!< call is present(active or held) */
|
||||
} esp_hf_call_status_t;
|
||||
|
||||
|
Reference in New Issue
Block a user