Skip to content

Commit

Permalink
80HE Support (#72)
Browse files Browse the repository at this point in the history
* Initial 80HE support

* Use new Device Type for 80HE
  • Loading branch information
simon-wh authored Oct 17, 2024
1 parent be3f8a4 commit ebce02b
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 0 deletions.
18 changes: 18 additions & 0 deletions src/wooting-usb.c
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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) {
Expand Down
3 changes: 3 additions & 0 deletions src/wooting-usb.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit ebce02b

Please sign in to comment.