From ebce02b64101819fa5ac5e27e42bd4297ce8ed13 Mon Sep 17 00:00:00 2001 From: Simon W Date: Thu, 17 Oct 2024 12:15:54 +0100 Subject: [PATCH] 80HE Support (#72) * Initial 80HE support * Use new Device Type for 80HE --- src/wooting-usb.c | 18 ++++++++++++++++++ src/wooting-usb.h | 3 +++ 2 files changed, 21 insertions(+) diff --git a/src/wooting-usb.c b/src/wooting-usb.c index 0b979c1..a2ce31c 100644 --- a/src/wooting-usb.c +++ b/src/wooting-usb.c @@ -44,6 +44,7 @@ #define WOOTING_60HE_PLUS_PID 0x1320 #define WOOTING_UWU_PID 0x1500 #define WOOTING_UWU_RGB_PID 0x1510 +#define WOOTING_80HE_PID 0x1400 #define CFG_USAGE_PAGE 0x1337 @@ -201,6 +202,16 @@ static void set_meta_wooting_uwu(WOOTING_USB_META *device_meta) { device_meta->led_index_max = 0; } +static void set_meta_wooting_80he(WOOTING_USB_META *device_meta) { + device_meta->model = "Wooting 80HE"; + device_meta->device_type = DEVICE_KEYBOARD_80; + device_meta->max_rows = WOOTING_RGB_ROWS; + device_meta->max_columns = 17; + device_meta->led_index_max = WOOTING_TWO_KEY_CODE_LIMIT; + device_meta->v2_interface = true; + device_meta->uses_small_packets = false; +} + WOOTING_USB_META *wooting_usb_get_meta() { // We want to initialise the struct to the default values if it hasn't been // set @@ -388,6 +399,13 @@ bool wooting_usb_find_keyboard() { walk_hid_devices(hid_info, set_meta_wooting_uwu_rgb); } + if (PID_ALT_CHECK(WOOTING_80HE_PID)) { +#ifdef DEBUG_LOG + printf("Enumerate on Wooting 80HE Successful\n"); +#endif + walk_hid_devices(hid_info, set_meta_wooting_80he); + } + enumerating = false; if (connected_keyboards == 0) { diff --git a/src/wooting-usb.h b/src/wooting-usb.h index 677c50e..57e1aa9 100644 --- a/src/wooting-usb.h +++ b/src/wooting-usb.h @@ -43,6 +43,9 @@ typedef enum WOOTING_DEVICE_TYPE { // 3 key keypad, E.g. Wooting UwU DEVICE_KEYPAD_3KEY = 4, + + // 80 percent keyboard, E.g. Wooting 80HE + DEVICE_KEYBOARD_80 = 5, } WOOTING_DEVICE_TYPE; typedef enum WOOTING_DEVICE_LAYOUT {