mirror of
https://github.com/bluekitchen/btstack.git
synced 2025-02-11 09:40:24 +00:00
hfp: define Enhanced Voice Recognition Status and Voice Recognition Text events
This commit is contained in:
parent
ef3ae4eb99
commit
024ad916e6
@ -1753,6 +1753,35 @@ typedef uint8_t sm_key_t[16];
|
|||||||
*/
|
*/
|
||||||
#define HFP_SUBEVENT_IN_BAND_RING_TONE 0x1D
|
#define HFP_SUBEVENT_IN_BAND_RING_TONE 0x1D
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @format 1H1
|
||||||
|
* @param subevent_code
|
||||||
|
* @param acl_handle
|
||||||
|
* @param activated
|
||||||
|
*/
|
||||||
|
#define HFP_SUBEVENT_VOICE_RECOGNITION_STATUS 0x1E
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @format 1H1
|
||||||
|
* @param subevent_code
|
||||||
|
* @param acl_handle
|
||||||
|
* @param state
|
||||||
|
*/
|
||||||
|
#define HFP_SUBEVENT_ENHANCED_VOICE_RECOGNITION_STATUS 0x1F
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @format 1H21LV
|
||||||
|
* @param subevent_code
|
||||||
|
* @param acl_handle
|
||||||
|
* @param text_id
|
||||||
|
* @param text_type
|
||||||
|
* @param text_length
|
||||||
|
* @param text
|
||||||
|
*/
|
||||||
|
#define HFP_SUBEVENT_ENHANCED_VOICE_RECOGNITION_TEXT 0x20
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// ANCS Client
|
// ANCS Client
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -4662,6 +4662,90 @@ static inline uint8_t hfp_subevent_in_band_ring_tone_get_status(const uint8_t *
|
|||||||
return event[5];
|
return event[5];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Get field acl_handle from event HFP_SUBEVENT_VOICE_RECOGNITION_STATUS
|
||||||
|
* @param event packet
|
||||||
|
* @return acl_handle
|
||||||
|
* @note: btstack_type H
|
||||||
|
*/
|
||||||
|
static inline hci_con_handle_t hfp_subevent_voice_recognition_status_get_acl_handle(const uint8_t * event){
|
||||||
|
return little_endian_read_16(event, 3);
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* @brief Get field activated from event HFP_SUBEVENT_VOICE_RECOGNITION_STATUS
|
||||||
|
* @param event packet
|
||||||
|
* @return activated
|
||||||
|
* @note: btstack_type 1
|
||||||
|
*/
|
||||||
|
static inline uint8_t hfp_subevent_voice_recognition_status_get_activated(const uint8_t * event){
|
||||||
|
return event[5];
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Get field acl_handle from event HFP_SUBEVENT_ENHANCED_VOICE_RECOGNITION_STATUS
|
||||||
|
* @param event packet
|
||||||
|
* @return acl_handle
|
||||||
|
* @note: btstack_type H
|
||||||
|
*/
|
||||||
|
static inline hci_con_handle_t hfp_subevent_enhanced_voice_recognition_status_get_acl_handle(const uint8_t * event){
|
||||||
|
return little_endian_read_16(event, 3);
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* @brief Get field state from event HFP_SUBEVENT_ENHANCED_VOICE_RECOGNITION_STATUS
|
||||||
|
* @param event packet
|
||||||
|
* @return state
|
||||||
|
* @note: btstack_type 1
|
||||||
|
*/
|
||||||
|
static inline uint8_t hfp_subevent_enhanced_voice_recognition_status_get_state(const uint8_t * event){
|
||||||
|
return event[5];
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Get field acl_handle from event HFP_SUBEVENT_ENHANCED_VOICE_RECOGNITION_TEXT
|
||||||
|
* @param event packet
|
||||||
|
* @return acl_handle
|
||||||
|
* @note: btstack_type H
|
||||||
|
*/
|
||||||
|
static inline hci_con_handle_t hfp_subevent_enhanced_voice_recognition_text_get_acl_handle(const uint8_t * event){
|
||||||
|
return little_endian_read_16(event, 3);
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* @brief Get field text_id from event HFP_SUBEVENT_ENHANCED_VOICE_RECOGNITION_TEXT
|
||||||
|
* @param event packet
|
||||||
|
* @return text_id
|
||||||
|
* @note: btstack_type 2
|
||||||
|
*/
|
||||||
|
static inline uint16_t hfp_subevent_enhanced_voice_recognition_text_get_text_id(const uint8_t * event){
|
||||||
|
return little_endian_read_16(event, 5);
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* @brief Get field text_type from event HFP_SUBEVENT_ENHANCED_VOICE_RECOGNITION_TEXT
|
||||||
|
* @param event packet
|
||||||
|
* @return text_type
|
||||||
|
* @note: btstack_type 1
|
||||||
|
*/
|
||||||
|
static inline uint8_t hfp_subevent_enhanced_voice_recognition_text_get_text_type(const uint8_t * event){
|
||||||
|
return event[7];
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* @brief Get field text_length from event HFP_SUBEVENT_ENHANCED_VOICE_RECOGNITION_TEXT
|
||||||
|
* @param event packet
|
||||||
|
* @return text_length
|
||||||
|
* @note: btstack_type L
|
||||||
|
*/
|
||||||
|
static inline uint16_t hfp_subevent_enhanced_voice_recognition_text_get_text_length(const uint8_t * event){
|
||||||
|
return little_endian_read_16(event, 8);
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* @brief Get field text from event HFP_SUBEVENT_ENHANCED_VOICE_RECOGNITION_TEXT
|
||||||
|
* @param event packet
|
||||||
|
* @return text
|
||||||
|
* @note: btstack_type V
|
||||||
|
*/
|
||||||
|
static inline const uint8_t * hfp_subevent_enhanced_voice_recognition_text_get_text(const uint8_t * event){
|
||||||
|
return &event[10];
|
||||||
|
}
|
||||||
|
|
||||||
#ifdef ENABLE_BLE
|
#ifdef ENABLE_BLE
|
||||||
/**
|
/**
|
||||||
* @brief Get field handle from event ANCS_SUBEVENT_CLIENT_CONNECTED
|
* @brief Get field handle from event ANCS_SUBEVENT_CLIENT_CONNECTED
|
||||||
|
Loading…
x
Reference in New Issue
Block a user