events: fix rfcomm_cid field of rfcomm_event_can_send_now, add missing handle to HSP_SUBEVENT_AUDIO_CONNECTION_COMPLETE

This commit is contained in:
Matthias Ringwald 2016-03-31 23:32:29 +02:00
parent d15afed991
commit 62c468cbb2
2 changed files with 28 additions and 10 deletions

View File

@ -466,7 +466,7 @@ typedef uint8_t sm_key_t[16];
/**
* @format 2
* @param local_cid
* @param rfcomm_cid
*/
#define RFCOMM_EVENT_CAN_SEND_NOW 0x89
@ -769,7 +769,6 @@ typedef uint8_t sm_key_t[16];
/** HSP Subevent */
// data: event(8), len(8), subevent(8), status(8)
/**
* @format 11
* @param subevent_code
@ -777,7 +776,6 @@ typedef uint8_t sm_key_t[16];
*/
#define HSP_SUBEVENT_RFCOMM_CONNECTION_COMPLETE 0x01
// data: event(8), len(8), subevent(8), status(8)
/**
* @format 11
* @param subevent_code
@ -786,11 +784,11 @@ typedef uint8_t sm_key_t[16];
#define HSP_SUBEVENT_RFCOMM_DISCONNECTION_COMPLETE 0x02
// data: event(8), len(8), subevent(8), status(8)
/**
* @format 11
* @format 11H
* @param subevent_code
* @param status 0 == OK
* @param handle
*/
#define HSP_SUBEVENT_AUDIO_CONNECTION_COMPLETE 0x03

View File

@ -1166,12 +1166,12 @@ static inline uint8_t rfcomm_event_remote_modem_status_get_modem_status(const ui
}
/**
* @brief Get field local_cid from event rfcomm_event_can_send_now
* @brief Get field rfcomm_cid from event rfcomm_event_can_send_now
* @param event packet
* @return local_cid
* @return rfcomm_cid
* @note: btstack_type 2
*/
static inline uint16_t rfcomm_event_can_send_now_get_local_cid(const uint8_t * event){
static inline uint16_t rfcomm_event_can_send_now_get_rfcomm_cid(const uint8_t * event){
return little_endian_read_16(event, 2);
}
@ -2197,6 +2197,26 @@ static inline uint8_t hci_subevent_le_connection_complete_get_master_clock_accur
return event[20];
}
/**
* @brief Get field status from event hsp_subevent_rfcomm_connection_complete
* @param event packet
* @return status
* @note: btstack_type 1
*/
static inline uint8_t hsp_subevent_rfcomm_connection_complete_get_status(const uint8_t * event){
return event[3];
}
/**
* @brief Get field status from event hsp_subevent_rfcomm_disconnection_complete
* @param event packet
* @return status
* @note: btstack_type 1
*/
static inline uint8_t hsp_subevent_rfcomm_disconnection_complete_get_status(const uint8_t * event){
return event[3];
}
/**
* @brief Get field status from event hsp_subevent_audio_connection_complete
* @param event packet
@ -2210,9 +2230,9 @@ static inline uint8_t hsp_subevent_audio_connection_complete_get_status(const ui
* @brief Get field handle from event hsp_subevent_audio_connection_complete
* @param event packet
* @return handle
* @note: btstack_type 2
* @note: btstack_type H
*/
static inline uint16_t hsp_subevent_audio_connection_complete_get_handle(const uint8_t * event){
static inline hci_con_handle_t hsp_subevent_audio_connection_complete_get_handle(const uint8_t * event){
return little_endian_read_16(event, 4);
}