hid_host: extend HID_SUBEVENT_SET_PROTOCOL_RESPONSE event with protocol_mode field

This commit is contained in:
Milanka Ringwald 2021-02-09 10:56:40 +01:00 committed by Matthias Ringwald
parent 05439aa6ca
commit 48174cc50f
2 changed files with 11 additions and 1 deletions

View File

@ -2947,10 +2947,11 @@ typedef uint8_t sm_key_t[16];
#define HID_SUBEVENT_GET_PROTOCOL_RESPONSE 0x0A #define HID_SUBEVENT_GET_PROTOCOL_RESPONSE 0x0A
/** /**
* @format 121 * @format 1211
* @param subevent_code * @param subevent_code
* @param hid_cid * @param hid_cid
* @param handshake_status * @param handshake_status
* @param protocol_mode
*/ */
#define HID_SUBEVENT_SET_PROTOCOL_RESPONSE 0x0B #define HID_SUBEVENT_SET_PROTOCOL_RESPONSE 0x0B

View File

@ -8817,6 +8817,15 @@ static inline uint16_t hid_subevent_set_protocol_response_get_hid_cid(const uint
static inline uint8_t hid_subevent_set_protocol_response_get_handshake_status(const uint8_t * event){ static inline uint8_t hid_subevent_set_protocol_response_get_handshake_status(const uint8_t * event){
return event[5]; return event[5];
} }
/**
* @brief Get field protocol_mode from event HID_SUBEVENT_SET_PROTOCOL_RESPONSE
* @param event packet
* @return protocol_mode
* @note: btstack_type 1
*/
static inline uint8_t hid_subevent_set_protocol_response_get_protocol_mode(const uint8_t * event){
return event[6];
}
/** /**
* @brief Get field hid_cid from event HID_SUBEVENT_REPORT * @brief Get field hid_cid from event HID_SUBEVENT_REPORT