From af15c38a054d969e9dd46e2c547a7064bce4a662 Mon Sep 17 00:00:00 2001 From: jaseg Date: Mon, 12 Nov 2018 23:18:45 +0900 Subject: New host-side arch working --- src/packet_interface.h | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) (limited to 'src/packet_interface.h') diff --git a/src/packet_interface.h b/src/packet_interface.h index 9e1327d..638405a 100644 --- a/src/packet_interface.h +++ b/src/packet_interface.h @@ -14,18 +14,28 @@ enum control_packet_types { }; enum packet_types { - _PACKET_RESERVED = 0, - HID_KEYBOARD_REPORT = 1, - HID_MOUSE_REPORT = 2, - PAIRING = 3, + _REPORT_RESERVED = 0, + REPORT_KEYBOARD= 1, + REPORT_MOUSE= 2, + REPORT_PAIRING_INPUT = 3, + REPORT_PAIRING_SUCCESS = 4, + REPORT_PAIRING_ERROR = 5, }; struct hid_report_packet { uint8_t type; - uint8_t len; - uint8_t report[8]; + union { + struct { + uint8_t len; + uint8_t report[8]; + } report; + struct { + char c; + } pairing_input; + }; } __attribute__((__packed__)); + struct control_packet { uint8_t type; uint8_t payload[0]; -- cgit