mirror of
https://github.com/bluekitchen/btstack.git
synced 2025-03-03 16:14:11 +00:00
btstack_defines: add GATT_EVENT_SERVICE_CHANGED
This commit is contained in:
parent
84cb16937f
commit
acd15d79cf
@ -1541,6 +1541,14 @@ typedef uint8_t sm_key_t[16];
|
||||
*/
|
||||
#define GATT_EVENT_DISCONNECTED 0xAEu
|
||||
|
||||
/**
|
||||
* @format H22
|
||||
* @param handle
|
||||
* @param attribute_handle_start
|
||||
* @param attribute_handle_end
|
||||
*/
|
||||
#define GATT_EVENT_SERVICE_CHANGED 0xAFu
|
||||
|
||||
|
||||
/**
|
||||
* @format 1BH
|
||||
|
@ -68,6 +68,8 @@ static inline uint8_t hci_event_packet_get_type(const uint8_t * event){
|
||||
return event[0];
|
||||
}
|
||||
|
||||
typedef uint8_t* btstack_event_iterator_t;
|
||||
|
||||
/***
|
||||
* @brief Get subevent code for a2dp event
|
||||
* @param event packet
|
||||
@ -2956,6 +2958,36 @@ static inline hci_con_handle_t gatt_event_disconnected_get_handle(const uint8_t
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef ENABLE_BLE
|
||||
/**
|
||||
* @brief Get field handle from event GATT_EVENT_SERVICE_CHANGED
|
||||
* @param event packet
|
||||
* @return handle
|
||||
* @note: btstack_type H
|
||||
*/
|
||||
static inline hci_con_handle_t gatt_event_service_changed_get_handle(const uint8_t * event){
|
||||
return little_endian_read_16(event, 2);
|
||||
}
|
||||
/**
|
||||
* @brief Get field attribute_handle_start from event GATT_EVENT_SERVICE_CHANGED
|
||||
* @param event packet
|
||||
* @return attribute_handle_start
|
||||
* @note: btstack_type 2
|
||||
*/
|
||||
static inline uint16_t gatt_event_service_changed_get_attribute_handle_start(const uint8_t * event){
|
||||
return little_endian_read_16(event, 4);
|
||||
}
|
||||
/**
|
||||
* @brief Get field attribute_handle_end from event GATT_EVENT_SERVICE_CHANGED
|
||||
* @param event packet
|
||||
* @return attribute_handle_end
|
||||
* @note: btstack_type 2
|
||||
*/
|
||||
static inline uint16_t gatt_event_service_changed_get_attribute_handle_end(const uint8_t * event){
|
||||
return little_endian_read_16(event, 6);
|
||||
}
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief Get field address_type from event ATT_EVENT_CONNECTED
|
||||
* @param event packet
|
||||
|
Loading…
x
Reference in New Issue
Block a user