btstack_defines: fix GATT_EVENT_LONG_CHARACTERISTIC_DESCRIPTOR_QUERY_RESULT

This commit is contained in:
Matthias Ringwald 2023-08-22 15:44:25 +02:00
parent 98e87e7776
commit 72aba3fa65
2 changed files with 14 additions and 4 deletions

View File

@ -1502,8 +1502,9 @@ typedef uint8_t sm_key_t[16];
#define GATT_EVENT_CHARACTERISTIC_DESCRIPTOR_QUERY_RESULT 0xA9u
/**
* @format H2LV
* @format H22LV
* @param handle
* @param descriptor_handle
* @param descriptor_offset
* @param descriptor_length
* @param descriptor

View File

@ -2835,6 +2835,15 @@ static inline const uint8_t * gatt_event_characteristic_descriptor_query_result_
static inline hci_con_handle_t gatt_event_long_characteristic_descriptor_query_result_get_handle(const uint8_t * event){
return little_endian_read_16(event, 2);
}
/**
* @brief Get field descriptor_handle from event GATT_EVENT_LONG_CHARACTERISTIC_DESCRIPTOR_QUERY_RESULT
* @param event packet
* @return descriptor_handle
* @note: btstack_type 2
*/
static inline uint16_t gatt_event_long_characteristic_descriptor_query_result_get_descriptor_handle(const uint8_t * event){
return little_endian_read_16(event, 4);
}
/**
* @brief Get field descriptor_offset from event GATT_EVENT_LONG_CHARACTERISTIC_DESCRIPTOR_QUERY_RESULT
* @param event packet
@ -2842,7 +2851,7 @@ static inline hci_con_handle_t gatt_event_long_characteristic_descriptor_query_r
* @note: btstack_type 2
*/
static inline uint16_t gatt_event_long_characteristic_descriptor_query_result_get_descriptor_offset(const uint8_t * event){
return little_endian_read_16(event, 4);
return little_endian_read_16(event, 6);
}
/**
* @brief Get field descriptor_length from event GATT_EVENT_LONG_CHARACTERISTIC_DESCRIPTOR_QUERY_RESULT
@ -2851,7 +2860,7 @@ static inline uint16_t gatt_event_long_characteristic_descriptor_query_result_ge
* @note: btstack_type L
*/
static inline uint16_t gatt_event_long_characteristic_descriptor_query_result_get_descriptor_length(const uint8_t * event){
return little_endian_read_16(event, 6);
return little_endian_read_16(event, 8);
}
/**
* @brief Get field descriptor from event GATT_EVENT_LONG_CHARACTERISTIC_DESCRIPTOR_QUERY_RESULT
@ -2860,7 +2869,7 @@ static inline uint16_t gatt_event_long_characteristic_descriptor_query_result_ge
* @note: btstack_type V
*/
static inline const uint8_t * gatt_event_long_characteristic_descriptor_query_result_get_descriptor(const uint8_t * event){
return &event[8];
return &event[10];
}
#endif