Changed commands

master
Mark 2022-07-09 13:34:45 -07:00
parent a3e5e8b83a
commit 40aadc97ea
Signed by: Mark
GPG Key ID: AD62BB059C2AAEE4
1 changed files with 15 additions and 2 deletions

View File

@ -21,8 +21,20 @@ void hid_send_state(void);
// Sent by host when connection is initiated. // Sent by host when connection is initiated.
//
// Packet structure:
// Data: | cmd |
// # of Bytes: | 1 |
#define CMD_HELLO 0x00 #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. // Send keyboard state to host.
// //
// Packet structure: // Packet structure:
@ -33,7 +45,7 @@ void hid_send_state(void);
// 0x00: RGBMatrix disabled // 0x00: RGBMatrix disabled
// 0x01: normal animation, no HID data. // 0x01: normal animation, no HID data.
// 0x02: FFT Animation // 0x02: FFT Animation
#define CMD_SEND_STATE 0x01 #define CMD_SEND_STATE 0x02
// Animation data. Sent by host. // Animation data. Sent by host.
@ -47,9 +59,10 @@ void hid_send_state(void);
// //
// data: // data:
// Animation data. Content depends on data type. // Animation data. Content depends on data type.
#define CMD_ANIM_DATA 0x02 #define CMD_ANIM_DATA 0x03
// Data for FFT animation. // Data for FFT animation.
// Data segment consists of 10 bits, each representing the height of a column. // Data segment consists of 10 bits, each representing the height of a column.
// Minimum height is 0, maximum is 250. // Minimum height is 0, maximum is 250.
#define CMD_ANIM_DATA_fft 0x00 #define CMD_ANIM_DATA_fft 0x00