Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

80HE Support #72

Merged
merged 2 commits into from
Oct 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading