diff options
author | jaseg <git@jaseg.net> | 2018-11-12 23:18:45 +0900 |
---|---|---|
committer | jaseg <git@jaseg.net> | 2018-11-12 23:18:45 +0900 |
commit | af15c38a054d969e9dd46e2c547a7064bce4a662 (patch) | |
tree | 357f00ba370dd2e2b28d37352deaa9c7c144cee1 /src/packet_interface.h | |
parent | d2c9b00b36faf8d38a2f0fb32f1464528f4e96bd (diff) | |
download | secure-hid-af15c38a054d969e9dd46e2c547a7064bce4a662.tar.gz secure-hid-af15c38a054d969e9dd46e2c547a7064bce4a662.tar.bz2 secure-hid-af15c38a054d969e9dd46e2c547a7064bce4a662.zip |
New host-side arch working
Diffstat (limited to 'src/packet_interface.h')
-rw-r--r-- | src/packet_interface.h | 22 |
1 files changed, 16 insertions, 6 deletions
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]; |