hid_host: add report event

This commit is contained in:
Milanka Ringwald 2021-01-15 14:13:34 +01:00 committed by Matthias Ringwald
parent 4a4b5586fb
commit 01a4f16956
2 changed files with 37 additions and 0 deletions

View File

@ -2954,6 +2954,15 @@ typedef uint8_t sm_key_t[16];
*/
#define HID_SUBEVENT_SET_PROTOCOL_RESPONSE 0x0B
/**
* @format 12LV
* @param subevent_code
* @param hid_cid
* @param report_len
* @param report
*/
#define HID_SUBEVENT_REPORT 0x0C
// HIDS Meta Event Group

View File

@ -8818,6 +8818,34 @@ static inline uint8_t hid_subevent_set_protocol_response_get_handshake_status(co
return event[5];
}
/**
* @brief Get field hid_cid from event HID_SUBEVENT_REPORT
* @param event packet
* @return hid_cid
* @note: btstack_type 2
*/
static inline uint16_t hid_subevent_report_get_hid_cid(const uint8_t * event){
return little_endian_read_16(event, 3);
}
/**
* @brief Get field report_len from event HID_SUBEVENT_REPORT
* @param event packet
* @return report_len
* @note: btstack_type L
*/
static inline uint16_t hid_subevent_report_get_report_len(const uint8_t * event){
return little_endian_read_16(event, 5);
}
/**
* @brief Get field report from event HID_SUBEVENT_REPORT
* @param event packet
* @return report
* @note: btstack_type V
*/
static inline const uint8_t * hid_subevent_report_get_report(const uint8_t * event){
return &event[7];
}
/**
* @brief Get field con_handle from event HIDS_SUBEVENT_CAN_SEND_NOW
* @param event packet