Commit c437e52e authored by Robey Pointer's avatar Robey Pointer
Browse files

add back all the remaining hid commands except OINV, which can now be done a different way

parent dbf4ccbc
......@@ -24,6 +24,11 @@
#define CMD_OLED_BITMAP cmd("WBIT") // (u16 offset, u8 bytes...) write raw bytes into the oled framebuffer
#define CMD_OLED_RLE cmd("WRLE") // (u16 offset, u8 bytes...) write RLE-encoded bytes into the oled framebuffer
#define CMD_POWER_OFF cmd("PWR0") // turn off power rails
#define CMD_LIGHT cmd("LITE") // keyboard backlight
#define CMD_UART_ON cmd("UAR1") // uart reporting on
#define CMD_UART_OFF cmd("UAR0") // uart reporting off
#define CMD_AUX_ON cmd("PWR4") // turn on aux power
#define CMD_AUX_OFF cmd("PWR3") // turn off aux power
#define CMD_TEST cmd("test")
......@@ -95,35 +100,15 @@ void CALLBACK_HID_Device_ProcessHIDReport(
}
} else if (command == CMD_POWER_OFF) {
controller_turn_off_som();
} else if (command == CMD_LIGHT) {
kbd_brightness_set(report_size > 4 ? data[4] - '0' + 1 : 0);
} else if (command == CMD_UART_ON) {
controller_enable_som_uart();
} else if (command == CMD_UART_OFF) {
controller_disable_som_uart();
} else if (command == CMD_AUX_ON) {
controller_turn_on_aux();
} else if (command == CMD_AUX_OFF) {
controller_turn_off_aux();
}
#if 0
if (data[0]=='O' && data[1]=='I' && data[2]=='N' && data[3]=='V') {
gfx_clear_invert();
gfx_invert_row(data[4]-'0');
}
else if (data[0]=='L' && data[1]=='I' && data[2]=='T' && data[3]=='E') {
char brite = data[4]-'0';
brite++;
if (brite<=1) brite=0;
if (brite>9) brite=9;
kbd_brightness_set(brite);
}
else if (data[0]=='P' && data[1]=='W' && data[2]=='R' && data[3]=='3') {
// PWR3: aux power off
remote_turn_off_aux();
}
else if (data[0]=='P' && data[1]=='W' && data[2]=='R' && data[3]=='4') {
// PWR4: aux power on
remote_turn_on_aux();
}
else if (data[0]=='U' && data[1]=='A' && data[2]=='R' && data[3]=='1') {
// UAR1: UART reporting on
remote_enable_som_uart();
}
else if (data[0]=='U' && data[1]=='A' && data[2]=='R' && data[3]=='0') {
// UAR0: UART reporting off
remote_disable_som_uart();
}
#endif
}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment