Add handle to HFP_SUBEVENT_AUDIO_CONNECTION_ESTABLISHED getters

This commit is contained in:
Matthias Ringwald 2016-04-21 15:29:46 +02:00
parent be2a1a7820
commit 6ff51cfd6b
2 changed files with 11 additions and 1 deletions

View File

@ -904,9 +904,10 @@ typedef uint8_t sm_key_t[16];
#define HFP_SUBEVENT_SERVICE_LEVEL_CONNECTION_RELEASED 0x02 #define HFP_SUBEVENT_SERVICE_LEVEL_CONNECTION_RELEASED 0x02
/** /**
* @format 11 * @format 11H
* @param subevent_code * @param subevent_code
* @param status 0 == OK * @param status 0 == OK
* @param handle
*/ */
#define HFP_SUBEVENT_AUDIO_CONNECTION_ESTABLISHED 0x03 #define HFP_SUBEVENT_AUDIO_CONNECTION_ESTABLISHED 0x03

View File

@ -2660,6 +2660,15 @@ static inline hci_con_handle_t hfp_subevent_service_level_connection_established
static inline uint8_t hfp_subevent_audio_connection_established_get_status(const uint8_t * event){ static inline uint8_t hfp_subevent_audio_connection_established_get_status(const uint8_t * event){
return event[3]; return event[3];
} }
/**
* @brief Get field handle from event HFP_SUBEVENT_AUDIO_CONNECTION_ESTABLISHED
* @param event packet
* @return handle
* @note: btstack_type H
*/
static inline hci_con_handle_t hfp_subevent_audio_connection_established_get_handle(const uint8_t * event){
return little_endian_read_16(event, 4);
}
/** /**