Fix crash when WBS enabled.

This commit is contained in:
weitianhua
2019-12-02 18:17:44 +08:00
parent 45fb144224
commit ad4b11a4f1
6 changed files with 53 additions and 51 deletions

View File

@@ -64,8 +64,8 @@ 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_BAC_RESPONSE_EVT, /*!< Codec Negotiation */
ESP_HF_BCS_RESPONSE_EVT, /*!< Codec Negotiation */
ESP_HF_WBS_RESPONSE_EVT, /*!< Codec Status */
ESP_HF_BCS_RESPONSE_EVT, /*!< Final Codec Choice */
} esp_hf_cb_event_t;
/// HFP AG callback parameters
@@ -147,12 +147,19 @@ typedef union
esp_hf_nrec_t state; /*!< NREC enabled or disabled */
} nrec; /*!< AG callback param of ESP_HF_NREC_RESPONSE_EVT */
/**
* @brief ESP_HF_WBS_RESPONSE_EVT
*/
struct hf_wbs_rep_param {
esp_hf_wbs_config_t codec; /*!< codec mode CVSD or mSBC */
} wbs_rep; /*!< AG callback param of ESP_HF_WBS_RESPONSE_EVT */
/**
* @brief ESP_HF_BCS_RESPONSE_EVT
*/
struct hf_codec_param {
struct hf_bcs_rep_param {
esp_hf_wbs_config_t mode; /*!< codec mode CVSD or mSBC */
} codec; /*!< AG callback param of ESP_HF_BAC_RESPONSE_EVT */
} bcs_rep; /*!< AG callback param of ESP_HF_BCS_RESPONSE_EVT */
} esp_hf_cb_param_t; /*!< HFP AG callback param compound*/