hid_host: add new HID_SUBEVENT_DESCRIPTOR_AVAILABLE event

This commit is contained in:
Milanka Ringwald 2021-02-09 10:18:42 +01:00 committed by Matthias Ringwald
parent 5f0d88b06f
commit 33d66f0378
2 changed files with 27 additions and 0 deletions

View File

@ -2963,6 +2963,14 @@ typedef uint8_t sm_key_t[16];
*/ */
#define HID_SUBEVENT_REPORT 0x0C #define HID_SUBEVENT_REPORT 0x0C
/**
* @format 121
* @param subevent_code
* @param hid_cid
* @param status
*/
#define HID_SUBEVENT_DESCRIPTOR_AVAILABLE 0x0D
// HIDS Meta Event Group // HIDS Meta Event Group

View File

@ -8846,6 +8846,25 @@ static inline const uint8_t * hid_subevent_report_get_report(const uint8_t * eve
return &event[7]; return &event[7];
} }
/**
* @brief Get field hid_cid from event HID_SUBEVENT_DESCRIPTOR_AVAILABLE
* @param event packet
* @return hid_cid
* @note: btstack_type 2
*/
static inline uint16_t hid_subevent_descriptor_available_get_hid_cid(const uint8_t * event){
return little_endian_read_16(event, 3);
}
/**
* @brief Get field status from event HID_SUBEVENT_DESCRIPTOR_AVAILABLE
* @param event packet
* @return status
* @note: btstack_type 1
*/
static inline uint8_t hid_subevent_descriptor_available_get_status(const uint8_t * event){
return event[5];
}
/** /**
* @brief Get field con_handle from event HIDS_SUBEVENT_CAN_SEND_NOW * @brief Get field con_handle from event HIDS_SUBEVENT_CAN_SEND_NOW
* @param event packet * @param event packet