diff --git a/src/btstack_defines.h b/src/btstack_defines.h index 649923360..1b8d44505 100644 --- a/src/btstack_defines.h +++ b/src/btstack_defines.h @@ -3222,9 +3222,10 @@ typedef uint8_t sm_key_t[16]; #define GATTSERVICE_SUBEVENT_HID_SERVICE_CONNECTED 0x13 /** - * @format 121LV + * @format 1211LV * @param subevent_code * @param hids_cid + * @param service_index * @param report_id * @param report_len * @param report diff --git a/src/btstack_event.h b/src/btstack_event.h index 99d346bb8..768cfd622 100644 --- a/src/btstack_event.h +++ b/src/btstack_event.h @@ -9560,6 +9560,15 @@ static inline uint8_t gattservice_subevent_hid_service_connected_get_num_instanc static inline uint16_t gattservice_subevent_hid_report_get_hids_cid(const uint8_t * event){ return little_endian_read_16(event, 3); } +/** + * @brief Get field service_index from event GATTSERVICE_SUBEVENT_HID_REPORT + * @param event packet + * @return service_index + * @note: btstack_type 1 + */ +static inline uint8_t gattservice_subevent_hid_report_get_service_index(const uint8_t * event){ + return event[5]; +} /** * @brief Get field report_id from event GATTSERVICE_SUBEVENT_HID_REPORT * @param event packet @@ -9567,7 +9576,7 @@ static inline uint16_t gattservice_subevent_hid_report_get_hids_cid(const uint8_ * @note: btstack_type 1 */ static inline uint8_t gattservice_subevent_hid_report_get_report_id(const uint8_t * event){ - return event[5]; + return event[6]; } /** * @brief Get field report_len from event GATTSERVICE_SUBEVENT_HID_REPORT @@ -9576,7 +9585,7 @@ static inline uint8_t gattservice_subevent_hid_report_get_report_id(const uint8_ * @note: btstack_type L */ static inline uint16_t gattservice_subevent_hid_report_get_report_len(const uint8_t * event){ - return little_endian_read_16(event, 6); + return little_endian_read_16(event, 7); } /** * @brief Get field report from event GATTSERVICE_SUBEVENT_HID_REPORT @@ -9585,7 +9594,7 @@ static inline uint16_t gattservice_subevent_hid_report_get_report_len(const uint * @note: btstack_type V */ static inline const uint8_t * gattservice_subevent_hid_report_get_report(const uint8_t * event){ - return &event[8]; + return &event[9]; } /**