mirror of
https://github.com/bluekitchen/btstack.git
synced 2025-01-01 00:28:18 +00:00
btstack_defines: introduce HCI_EVENT_META_GAP
This commit is contained in:
parent
c08410378d
commit
a911051fd1
@ -1719,8 +1719,8 @@ typedef uint8_t sm_key_t[16];
|
||||
*/
|
||||
#define GAP_EVENT_PAIRING_COMPLETE 0xE1u
|
||||
|
||||
|
||||
// Meta Events, see below for sub events
|
||||
#define HCI_EVENT_META_GAP 0xE7u
|
||||
#define HCI_EVENT_HSP_META 0xE8u
|
||||
#define HCI_EVENT_HFP_META 0xE9u
|
||||
#define HCI_EVENT_ANCS_META 0xEAu
|
||||
@ -1744,6 +1744,25 @@ typedef uint8_t sm_key_t[16];
|
||||
// #define HCI_EVENT_SDP_META 0xxx
|
||||
// #define HCI_EVENT_SM_META 0xxx
|
||||
|
||||
/** GAP Subevent */
|
||||
|
||||
|
||||
/**
|
||||
* @format 1111
|
||||
* @param subevent_code
|
||||
* @param advertisement_handle
|
||||
* @param status
|
||||
* @param selected_tx_power
|
||||
*/
|
||||
#define GAP_SUBEVENT_ADVERTISING_SET_INSTALLED 0x00u
|
||||
|
||||
/**
|
||||
* @format 11
|
||||
* @param subevent_code
|
||||
* @param advertisement_handle
|
||||
*/
|
||||
#define GAP_SUBEVENT_ADVERTISING_SET_REMOVED 0x01u
|
||||
|
||||
|
||||
/** HSP Subevent */
|
||||
|
||||
|
@ -100,6 +100,14 @@ static inline uint8_t hci_event_avdtp_meta_get_subevent_code(const uint8_t * eve
|
||||
static inline uint8_t hci_event_avrcp_meta_get_subevent_code(const uint8_t * event){
|
||||
return event[2];
|
||||
}
|
||||
/***
|
||||
* @brief Get subevent code for gap event
|
||||
* @param event packet
|
||||
* @return subevent_code
|
||||
*/
|
||||
static inline uint8_t hci_event_gap_meta_get_subevent_code(const uint8_t * event){
|
||||
return event[2];
|
||||
}
|
||||
/***
|
||||
* @brief Get subevent code for gattservice event
|
||||
* @param event packet
|
||||
@ -5133,6 +5141,44 @@ static inline uint16_t hci_subevent_le_subrate_change_get_supervision_timeout(co
|
||||
return little_endian_read_16(event, 12);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Get field advertisement_handle from event GAP_SUBEVENT_ADVERTISING_SET_INSTALLED
|
||||
* @param event packet
|
||||
* @return advertisement_handle
|
||||
* @note: btstack_type 1
|
||||
*/
|
||||
static inline uint8_t gap_subevent_advertising_set_installed_get_advertisement_handle(const uint8_t * event){
|
||||
return event[3];
|
||||
}
|
||||
/**
|
||||
* @brief Get field status from event GAP_SUBEVENT_ADVERTISING_SET_INSTALLED
|
||||
* @param event packet
|
||||
* @return status
|
||||
* @note: btstack_type 1
|
||||
*/
|
||||
static inline uint8_t gap_subevent_advertising_set_installed_get_status(const uint8_t * event){
|
||||
return event[4];
|
||||
}
|
||||
/**
|
||||
* @brief Get field selected_tx_power from event GAP_SUBEVENT_ADVERTISING_SET_INSTALLED
|
||||
* @param event packet
|
||||
* @return selected_tx_power
|
||||
* @note: btstack_type 1
|
||||
*/
|
||||
static inline uint8_t gap_subevent_advertising_set_installed_get_selected_tx_power(const uint8_t * event){
|
||||
return event[5];
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Get field advertisement_handle from event GAP_SUBEVENT_ADVERTISING_SET_REMOVED
|
||||
* @param event packet
|
||||
* @return advertisement_handle
|
||||
* @note: btstack_type 1
|
||||
*/
|
||||
static inline uint8_t gap_subevent_advertising_set_removed_get_advertisement_handle(const uint8_t * event){
|
||||
return event[3];
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Get field acl_handle from event HSP_SUBEVENT_RFCOMM_CONNECTION_COMPLETE
|
||||
* @param event packet
|
||||
|
@ -12,6 +12,7 @@ meta_events = [
|
||||
'ANCS',
|
||||
'AVDTP',
|
||||
'AVRCP',
|
||||
'GAP',
|
||||
'GATTSERVICE',
|
||||
'GOEP',
|
||||
'HFP',
|
||||
|
Loading…
Reference in New Issue
Block a user