diff --git a/src/btstack_defines.h b/src/btstack_defines.h index a1ad97c7c..469946368 100644 --- a/src/btstack_defines.h +++ b/src/btstack_defines.h @@ -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 diff --git a/src/btstack_event.h b/src/btstack_event.h index a4e23811d..670211da1 100644 --- a/src/btstack_event.h +++ b/src/btstack_event.h @@ -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