mirror of
https://github.com/bluekitchen/btstack.git
synced 2025-03-16 07:20:52 +00:00
hid_host: fix send protocol
This commit is contained in:
parent
d7ae48d520
commit
bcaa0699e2
@ -941,7 +941,8 @@ static void hid_host_packet_handler(uint8_t packet_type, uint16_t channel, uint8
|
||||
case HID_HOST_W4_INTERRUPT_CONNECTION_ESTABLISHED:
|
||||
if (connection->set_protocol){
|
||||
connection->set_protocol = false;
|
||||
uint8_t header = (HID_MESSAGE_TYPE_SET_PROTOCOL << 4) | connection->requested_protocol_mode;
|
||||
uint8_t protocol_mode = connection->requested_protocol_mode == HID_PROTOCOL_MODE_BOOT ? 0 : 1;
|
||||
uint8_t header = (HID_MESSAGE_TYPE_SET_PROTOCOL << 4) | protocol_mode;
|
||||
uint8_t report[] = {header};
|
||||
connection->w4_set_protocol_response = true;
|
||||
l2cap_send(connection->control_cid, (uint8_t*) report, sizeof(report));
|
||||
|
Loading…
x
Reference in New Issue
Block a user