hid_host: add HID_SUBEVENT_GET_REPORT_RESPONSE event

This commit is contained in:
Milanka Ringwald 2021-01-12 10:53:50 +01:00 committed by Matthias Ringwald
parent 59a2ea7477
commit ecd76fd157
2 changed files with 46 additions and 1 deletions

View File

@ -2919,7 +2919,15 @@ typedef uint8_t sm_key_t[16];
*/
#define HID_SUBEVENT_VIRTUAL_CABLE_UNPLUG 0x07
/**
* @format 121LV
* @param subevent_code
* @param hid_cid
* @param handshake_status
* @param report_len
* @param report
*/
#define HID_SUBEVENT_GET_REPORT_RESPONSE 0x08
// HIDS Meta Event Group

View File

@ -8715,6 +8715,43 @@ static inline uint16_t hid_subevent_virtual_cable_unplug_get_hid_cid(const uint8
return little_endian_read_16(event, 3);
}
/**
* @brief Get field hid_cid from event HID_SUBEVENT_GET_REPORT_RESPONSE
* @param event packet
* @return hid_cid
* @note: btstack_type 2
*/
static inline uint16_t hid_subevent_get_report_response_get_hid_cid(const uint8_t * event){
return little_endian_read_16(event, 3);
}
/**
* @brief Get field handshake_status from event HID_SUBEVENT_GET_REPORT_RESPONSE
* @param event packet
* @return handshake_status
* @note: btstack_type 1
*/
static inline uint8_t hid_subevent_get_report_response_get_handshake_status(const uint8_t * event){
return event[5];
}
/**
* @brief Get field report_len from event HID_SUBEVENT_GET_REPORT_RESPONSE
* @param event packet
* @return report_len
* @note: btstack_type L
*/
static inline uint16_t hid_subevent_get_report_response_get_report_len(const uint8_t * event){
return little_endian_read_16(event, 6);
}
/**
* @brief Get field report from event HID_SUBEVENT_GET_REPORT_RESPONSE
* @param event packet
* @return report
* @note: btstack_type V
*/
static inline const uint8_t * hid_subevent_get_report_response_get_report(const uint8_t * event){
return &event[8];
}
/**
* @brief Get field con_handle from event HIDS_SUBEVENT_CAN_SEND_NOW
* @param event packet