Skip to content

Commit

Permalink
fix(bt/bluedroid): corrected the API documents of profile HFP and A2DP
Browse files Browse the repository at this point in the history
  • Loading branch information
BetterJincheng committed Nov 20, 2023
1 parent e4ab449 commit b9a0ca6
Show file tree
Hide file tree
Showing 3 changed files with 98 additions and 98 deletions.
30 changes: 15 additions & 15 deletions components/bt/host/bluedroid/api/include/api/esp_a2dp_api.h
Original file line number Diff line number Diff line change
@@ -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
*/
Expand Down Expand Up @@ -241,7 +241,7 @@ typedef int32_t (* esp_a2d_source_data_cb_t)(uint8_t *buf, int32_t len);
*
* @return
* - ESP_OK: success
* - ESP_INVALID_STATE: if bluetooth stack is not yet enabled
* - ESP_ERR_INVALID_STATE: if bluetooth stack is not yet enabled
* - ESP_FAIL: if callback is a NULL function pointer
*
*/
Expand All @@ -258,7 +258,7 @@ esp_err_t esp_a2d_register_callback(esp_a2d_cb_t callback);
*
* @return
* - ESP_OK: success
* - ESP_INVALID_STATE: if bluetooth stack is not yet enabled
* - ESP_ERR_INVALID_STATE: if bluetooth stack is not yet enabled
* - ESP_FAIL: if callback is a NULL function pointer
*
*/
Expand All @@ -275,7 +275,7 @@ esp_err_t esp_a2d_sink_register_data_callback(esp_a2d_sink_data_cb_t callback);
*
* @return
* - ESP_OK: if the initialization request is sent successfully
* - ESP_INVALID_STATE: if bluetooth stack is not yet enabled
* - ESP_ERR_INVALID_STATE: if bluetooth stack is not yet enabled
* - ESP_FAIL: others
*
*/
Expand All @@ -290,7 +290,7 @@ esp_err_t esp_a2d_sink_init(void);
*
* @return
* - ESP_OK: if the deinitialization request is sent successfully
* - ESP_INVALID_STATE: if bluetooth stack is not yet enabled
* - ESP_ERR_INVALID_STATE: if bluetooth stack is not yet enabled
* - ESP_FAIL: others
*
*/
Expand All @@ -306,7 +306,7 @@ esp_err_t esp_a2d_sink_deinit(void);
*
* @return
* - ESP_OK: connect request is sent to lower layer successfully
* - ESP_INVALID_STATE: if bluetooth stack is not yet enabled
* - ESP_ERR_INVALID_STATE: if bluetooth stack is not yet enabled
* - ESP_FAIL: others
*
*/
Expand All @@ -322,7 +322,7 @@ esp_err_t esp_a2d_sink_connect(esp_bd_addr_t remote_bda);
*
* @return
* - ESP_OK: disconnect request is sent to lower layer successfully
* - ESP_INVALID_STATE: if bluetooth stack is not yet enabled
* - ESP_ERR_INVALID_STATE: if bluetooth stack is not yet enabled
* - ESP_FAIL: others
*
*/
Expand All @@ -339,7 +339,7 @@ esp_err_t esp_a2d_sink_disconnect(esp_bd_addr_t remote_bda);
*
* @return
* - ESP_OK: delay value is sent to lower layer successfully
* - ESP_INVALID_STATE: if bluetooth stack is not yet enabled
* - ESP_ERR_INVALID_STATE: if bluetooth stack is not yet enabled
* - ESP_FAIL: others
*
*/
Expand All @@ -352,7 +352,7 @@ esp_err_t esp_a2d_sink_set_delay_value(uint16_t delay_value);
*
* @return
* - ESP_OK: if the request is sent successfully
* - ESP_INVALID_STATE: if bluetooth stack is not yet enabled
* - ESP_ERR_INVALID_STATE: if bluetooth stack is not yet enabled
* - ESP_FAIL: others
*
*/
Expand All @@ -368,7 +368,7 @@ esp_err_t esp_a2d_sink_get_delay_value(void);
*
* @return
* - ESP_OK: control command is sent to lower layer successfully
* - ESP_INVALID_STATE: if bluetooth stack is not yet enabled
* - ESP_ERR_INVALID_STATE: if bluetooth stack is not yet enabled
* - ESP_FAIL: others
*
*/
Expand All @@ -385,7 +385,7 @@ esp_err_t esp_a2d_media_ctrl(esp_a2d_media_ctrl_t ctrl);
*
* @return
* - ESP_OK: if the initialization request is sent to lower layer successfully
* - ESP_INVALID_STATE: if bluetooth stack is not yet enabled
* - ESP_ERR_INVALID_STATE: if bluetooth stack is not yet enabled
* - ESP_FAIL: others
*
*/
Expand All @@ -400,7 +400,7 @@ esp_err_t esp_a2d_source_init(void);
*
* @return
* - ESP_OK: success
* - ESP_INVALID_STATE: if bluetooth stack is not yet enabled
* - ESP_ERR_INVALID_STATE: if bluetooth stack is not yet enabled
* - ESP_FAIL: others
*
*/
Expand All @@ -417,7 +417,7 @@ esp_err_t esp_a2d_source_deinit(void);
*
* @return
* - ESP_OK: success
* - ESP_INVALID_STATE: if bluetooth stack is not yet enabled
* - ESP_ERR_INVALID_STATE: if bluetooth stack is not yet enabled
* - ESP_FAIL: if callback is a NULL function pointer
*
*/
Expand All @@ -433,7 +433,7 @@ esp_err_t esp_a2d_source_register_data_callback(esp_a2d_source_data_cb_t callbac
*
* @return
* - ESP_OK: connect request is sent to lower layer successfully
* - ESP_INVALID_STATE: if bluetooth stack is not yet enabled
* - ESP_ERR_INVALID_STATE: if bluetooth stack is not yet enabled
* - ESP_FAIL: others
*
*/
Expand All @@ -448,7 +448,7 @@ esp_err_t esp_a2d_source_connect(esp_bd_addr_t remote_bda);
* @param[in] remote_bda: remote bluetooth device address
* @return
* - ESP_OK: disconnect request is sent to lower layer
* - ESP_INVALID_STATE: if bluetooth stack is not yet enabled
* - ESP_ERR_INVALID_STATE: if bluetooth stack is not yet enabled
* - ESP_FAIL: others
*
*/
Expand Down
82 changes: 41 additions & 41 deletions components/bt/host/bluedroid/api/include/api/esp_hf_ag_api.h
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,7 @@ typedef void (* esp_hf_cb_t) (esp_hf_cb_event_t event, esp_hf_cb_param_t *param)
*
* @return
* - ESP_OK: success
* - ESP_INVALID_STATE: if bluetooth stack is not yet enabled
* - ESP_ERR_INVALID_STATE: if bluetooth stack is not yet enabled
* - ESP_FAIL: if callback is a NULL function pointer
*
*/
Expand All @@ -287,7 +287,7 @@ esp_err_t esp_hf_ag_register_callback(esp_hf_cb_t callback);
*
* @return
* - ESP_OK: if the initialization request is sent successfully
* - ESP_INVALID_STATE: if bluetooth stack is not yet enabled
* - ESP_ERR_INVALID_STATE: if bluetooth stack is not yet enabled
* - ESP_FAIL: others
*
*/
Expand All @@ -300,7 +300,7 @@ esp_err_t esp_hf_ag_init(void);
*
* @return
* - ESP_OK: success
* - ESP_INVALID_STATE: if bluetooth stack is not yet enabled
* - ESP_ERR_INVALID_STATE: if bluetooth stack is not yet enabled
* - ESP_FAIL: others
*
*/
Expand All @@ -315,7 +315,7 @@ esp_err_t esp_hf_ag_deinit(void);
*
* @return
* - ESP_OK: connect request is sent to lower layer
* - ESP_INVALID_STATE: if bluetooth stack is not yet enabled
* - ESP_ERR_INVALID_STATE: if bluetooth stack is not yet enabled
* - ESP_FAIL: others
*
*/
Expand All @@ -330,7 +330,7 @@ esp_err_t esp_hf_ag_slc_connect(esp_bd_addr_t remote_bda);
*
* @return
* - ESP_OK: disconnect request is sent to lower layer
* - ESP_INVALID_STATE: if bluetooth stack is not yet enabled
* - ESP_ERR_INVALID_STATE: if bluetooth stack is not yet enabled
* - ESP_FAIL: others
*
*/
Expand All @@ -344,8 +344,8 @@ esp_err_t esp_hf_ag_slc_disconnect(esp_bd_addr_t remote_bda);
* @param[in] remote_bda: remote bluetooth device address
*
* @return
* - ESP_OK: disconnect request is sent to lower layer
* - ESP_INVALID_STATE: if bluetooth stack is not yet enabled
* - ESP_OK: audio connect request is sent to lower layer
* - ESP_ERR_INVALID_STATE: if bluetooth stack is not yet enabled
* - ESP_FAIL: others
*
*/
Expand All @@ -359,8 +359,8 @@ esp_err_t esp_hf_ag_audio_connect(esp_bd_addr_t remote_bda);
* @param[in] remote_bda: remote bluetooth device address
*
* @return
* - ESP_OK: disconnect request is sent to lower layer
* - ESP_INVALID_STATE: if bluetooth stack is not yet enabled
* - ESP_OK: audio disconnect request is sent to lower layer
* - ESP_ERR_INVALID_STATE: if bluetooth stack is not yet enabled
* - ESP_FAIL: others
*
*/
Expand All @@ -376,8 +376,8 @@ esp_err_t esp_hf_ag_audio_disconnect(esp_bd_addr_t remote_bda);
* @param[in] value: 0 - voice recognition disabled, 1- voice recognition enabled
*
* @return
* - ESP_OK: disconnect request is sent to lower layer
* - ESP_INVALID_STATE: if bluetooth stack is not yet enabled
* - ESP_OK: response of volume recognition is sent to lower layer
* - ESP_ERR_INVALID_STATE: if bluetooth stack is not yet enabled
* - ESP_FAIL: others
*
*/
Expand All @@ -395,8 +395,8 @@ esp_err_t esp_hf_ag_vra_control(esp_bd_addr_t remote_bda, esp_hf_vr_state_t valu
* @param[in] volume: gain of the speaker of microphone, ranges 0 to 15
*
* @return
* - ESP_OK: disconnect request is sent to lower layer
* - ESP_INVALID_STATE: if bluetooth stack is not yet enabled
* - ESP_OK: volume synchronization control is sent to lower layer
* - ESP_ERR_INVALID_STATE: if bluetooth stack is not yet enabled
* - ESP_ERR_INVALID_ARG: if arguments are invalid
* - ESP_FAIL: others
*
Expand All @@ -413,8 +413,8 @@ esp_err_t esp_hf_ag_volume_control(esp_bd_addr_t remote_bda, esp_hf_volume_contr
* @param[in] unat: User AT command response to HF Client.
* It will response "ERROR" by default if unat is NULL.
* @return
* - ESP_OK: disconnect request is sent to lower layer
* - ESP_INVALID_STATE: if bluetooth stack is not yet enabled
* - ESP_OK: response of unknown AT command is sent to lower layer
* - ESP_ERR_INVALID_STATE: if bluetooth stack is not yet enabled
* - ESP_FAIL: others
*
*/
Expand All @@ -429,8 +429,8 @@ esp_err_t esp_hf_ag_unknown_at_send(esp_bd_addr_t remote_addr, char *unat);
* @param[in] response_code: AT command response code
* @param[in] error_code: CME error code
* @return
* - ESP_OK: disconnect request is sent to lower layer
* - ESP_INVALID_STATE: if bluetooth stack is not yet enabled
* - ESP_OK: extend error code is sent to lower layer
* - ESP_ERR_INVALID_STATE: if bluetooth stack is not yet enabled
* - ESP_FAIL: others
*
*/
Expand All @@ -447,8 +447,8 @@ esp_err_t esp_hf_ag_cmee_send(esp_bd_addr_t remote_bda, esp_hf_at_response_code_
* @param[in] ntk_state: network service state
* @param[in] signal: signal strength from 0 to 5
* @return
* - ESP_OK: disconnect request is sent to lower layer
* - ESP_INVALID_STATE: if bluetooth stack is not yet enabled
* - ESP_OK: device status notification is sent to lower layer
* - ESP_ERR_INVALID_STATE: if bluetooth stack is not yet enabled
* - ESP_ERR_INVALID_ARG: if arguments are invalid
* - ESP_FAIL: others
*
Expand All @@ -469,8 +469,8 @@ esp_err_t esp_hf_ag_devices_status_indchange(esp_bd_addr_t remote_addr, esp_hf_c
* @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_OK: indicator report is sent to lower layer
* - ESP_ERR_INVALID_STATE: if bluetooth stack is not yet enabled
* - ESP_FAIL: others
*
*/
Expand All @@ -490,8 +490,8 @@ esp_err_t esp_hf_ag_ciev_report(esp_bd_addr_t remote_addr, esp_hf_ciev_report_ty
* @param[in] batt_lev: battery level from 0 to 5
* @param[in] call_held_status: call held status
* @return
* - ESP_OK: disconnect request is sent to lower layer
* - ESP_INVALID_STATE: if bluetooth stack is not yet enabled
* - ESP_OK: response to device individual indicators is sent to lower layer
* - ESP_ERR_INVALID_STATE: if bluetooth stack is not yet enabled
* - ESP_ERR_INVALID_ARG: if the arguments are invalid
* - ESP_FAIL: others
*
Expand All @@ -510,8 +510,8 @@ esp_err_t esp_hf_ag_cind_response(esp_bd_addr_t remote_addr,
* @param[in] remote_addr: remote bluetooth device address
* @param[in] name: current operator name
* @return
* - ESP_OK: disconnect request is sent to lower layer
* - ESP_INVALID_STATE: if bluetooth stack is not yet enabled
* - ESP_OK: reponse for AT+COPS command is sent to lower layer
* - ESP_ERR_INVALID_STATE: if bluetooth stack is not yet enabled
* - ESP_FAIL: others
*
*/
Expand All @@ -531,8 +531,8 @@ esp_err_t esp_hf_ag_cops_response(esp_bd_addr_t remote_addr, char *name);
* @param[in] number: current call number
* @param[in] type: international type or unknow
* @return
* - ESP_OK: disconnect request is sent to lower layer
* - ESP_INVALID_STATE: if bluetooth stack is not yet enabled
* - ESP_OK: response to AT+CLCC command is sent to lower layer
* - ESP_ERR_INVALID_STATE: if bluetooth stack is not yet enabled
* - ESP_FAIL: others
*
*/
Expand All @@ -553,8 +553,8 @@ esp_err_t esp_hf_ag_clcc_response(esp_bd_addr_t remote_addr, int index, esp_hf_c
* 160-175: national, but no prefix nor escape digits
* @param[in] service_type: service type (unknown/voice/fax)
* @return
* - ESP_OK: disconnect request is sent to lower layer
* - ESP_INVALID_STATE: if bluetooth stack is not yet enabled
* - ESP_OK: response for AT+CNUM command is sent to lower layer
* - ESP_ERR_INVALID_STATE: if bluetooth stack is not yet enabled
* - ESP_FAIL: others
*
*/
Expand All @@ -568,8 +568,8 @@ esp_err_t esp_hf_ag_cnum_response(esp_bd_addr_t remote_addr, char *number, int n
* @param[in] remote_addr: remote bluetooth device address
* @param[in] state: in-band ring tone state
* @return
* - ESP_OK: disconnect request is sent to lower layer
* - ESP_INVALID_STATE: if bluetooth stack is not yet enabled
* - ESP_OK: information of in-band ring tone is sent to lower layer
* - ESP_ERR_INVALID_STATE: if bluetooth stack is not yet enabled
* - ESP_ERR_INVALID_ARG: if arguments are invalid
* - ESP_FAIL: others
*
Expand All @@ -589,8 +589,8 @@ esp_err_t esp_hf_ag_bsir(esp_bd_addr_t remote_addr, esp_hf_in_band_ring_state_t
* @param[in] number: number of the incoming call
* @param[in] call_addr_type: call address type
* @return
* - ESP_OK: disconnect request is sent to lower layer
* - ESP_INVALID_STATE: if bluetooth stack is not yet enabled
* - ESP_OK: answer incoming call is sent to lower layer
* - ESP_ERR_INVALID_STATE: if bluetooth stack is not yet enabled
* - ESP_FAIL: others
*
*/
Expand All @@ -611,8 +611,8 @@ esp_err_t esp_hf_ag_answer_call(esp_bd_addr_t remote_addr, int num_active, int n
* @param[in] number: number of the incoming call
* @param[in] call_addr_type: call address type
* @return
* - ESP_OK: disconnect request is sent to lower layer
* - ESP_INVALID_STATE: if bluetooth stack is not yet enabled
* - ESP_OK: reject incoming call is sent to lower layer
* - ESP_ERR_INVALID_STATE: if bluetooth stack is not yet enabled
* - ESP_FAIL: others
*
*/
Expand All @@ -636,8 +636,8 @@ esp_err_t esp_hf_ag_reject_call(esp_bd_addr_t remote_addr, int num_active, int n
* @param[in] number: number of the outgoing call
* @param[in] call_addr_type: call address type
* @return
* - ESP_OK: disconnect request is sent to lower layer
* - ESP_INVALID_STATE: if bluetooth stack is not yet enabled
* - ESP_OK: a call initiation is sent to lower layer
* - ESP_ERR_INVALID_STATE: if bluetooth stack is not yet enabled
* - ESP_FAIL: others
*
*/
Expand All @@ -658,8 +658,8 @@ esp_err_t esp_hf_ag_out_call(esp_bd_addr_t remote_addr, int num_active, int num_
* @param[in] number: number of the call
* @param[in] call_addr_type: call address type
* @return
* - ESP_OK: disconnect request is sent to lower layer
* - ESP_INVALID_STATE: if bluetooth stack is not yet enabled
* - ESP_OK: end an ongoing call is sent to lower layer
* - ESP_ERR_INVALID_STATE: if bluetooth stack is not yet enabled
* - ESP_FAIL: others
*
*/
Expand All @@ -676,7 +676,7 @@ esp_err_t esp_hf_ag_end_call(esp_bd_addr_t remote_addr, int num_active, int num_
*
* @return
* - ESP_OK: success
* - ESP_INVALID_STATE: if bluetooth stack is not yet enabled
* - ESP_ERR_INVALID_STATE: if bluetooth stack is not yet enabled
* - ESP_FAIL: if callback is a NULL function pointer
*
*/
Expand All @@ -693,7 +693,7 @@ esp_err_t esp_hf_ag_register_data_callback(esp_hf_incoming_data_cb_t recv, esp_h
*
* @return
* - ESP_OK: if the request is sent successfully
* - ESP_INVALID_STATE: if bluetooth stack is not yet enabled
* - ESP_ERR_INVALID_STATE: if bluetooth stack is not yet enabled
* - ESP_FAIL: others
*
*/
Expand Down
Loading

0 comments on commit b9a0ca6

Please sign in to comment.