diff --git a/rawhid.h b/rawhid.h index 6dcaca1..48cdcb0 100644 --- a/rawhid.h +++ b/rawhid.h @@ -21,8 +21,20 @@ void hid_send_state(void); // Sent by host when connection is initiated. +// +// Packet structure: +// Data: | cmd | +// # of Bytes: | 1 | #define CMD_HELLO 0x00 +// Sent periodically by host to test connection. +// Keyboard should ignore this command. +// +// Packet structure: +// Data: | cmd | +// # of Bytes: | 1 | +#define CMD_RUTHERE 0x01 + // Send keyboard state to host. // // Packet structure: @@ -33,7 +45,7 @@ void hid_send_state(void); // 0x00: RGBMatrix disabled // 0x01: normal animation, no HID data. // 0x02: FFT Animation -#define CMD_SEND_STATE 0x01 +#define CMD_SEND_STATE 0x02 // Animation data. Sent by host. @@ -47,9 +59,10 @@ void hid_send_state(void); // // data: // Animation data. Content depends on data type. -#define CMD_ANIM_DATA 0x02 +#define CMD_ANIM_DATA 0x03 // Data for FFT animation. // Data segment consists of 10 bits, each representing the height of a column. // Minimum height is 0, maximum is 250. #define CMD_ANIM_DATA_fft 0x00 +