Skip to content

Commit

Permalink
Merge pull request #214 from Trja17/patch-1
Browse files Browse the repository at this point in the history
Adding razer naga trinity support
  • Loading branch information
1kc authored Feb 10, 2021
2 parents 0225ef6 + 7d6ab65 commit 86fd70e
Showing 1 changed file with 19 additions and 2 deletions.
21 changes: 19 additions & 2 deletions src/driver/razermouse_driver.c
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ static int razer_get_report(IOUSBDeviceInterface **usb_dev, struct razer_report

case USB_DEVICE_ID_RAZER_VIPER_ULTIMATE_WIRELESS:
case USB_DEVICE_ID_RAZER_VIPER_ULTIMATE_WIRED:
case USB_DEVICE_ID_RAZER_NAGA_TRINITY:
case USB_DEVICE_ID_RAZER_DEATHADDER_V2_PRO_WIRELESS:
case USB_DEVICE_ID_RAZER_DEATHADDER_V2_PRO_WIRED:
return razer_get_usb_response(usb_dev, 0x00, request_report, 0x00, response_report, RAZER_VIPER_MOUSE_RECEIVER_WAIT_MIN_US);
Expand Down Expand Up @@ -388,6 +389,7 @@ ssize_t razer_attr_write_side_mode_static(IOUSBDeviceInterface **usb_dev, const
case USB_DEVICE_ID_RAZER_VIPER_8KHZ:
case USB_DEVICE_ID_RAZER_VIPER_MINI:
case USB_DEVICE_ID_RAZER_VIPER_ULTIMATE_WIRED:
case USB_DEVICE_ID_RAZER_NAGA_TRINITY:
case USB_DEVICE_ID_RAZER_VIPER_ULTIMATE_WIRELESS:
case USB_DEVICE_ID_RAZER_BASILISK:
case USB_DEVICE_ID_RAZER_BASILISK_ULTIMATE:
Expand Down Expand Up @@ -446,6 +448,7 @@ ssize_t razer_attr_write_side_mode_static_no_store(IOUSBDeviceInterface **usb_de
case USB_DEVICE_ID_RAZER_VIPER_8KHZ:
case USB_DEVICE_ID_RAZER_VIPER_MINI:
case USB_DEVICE_ID_RAZER_VIPER_ULTIMATE_WIRED:
case USB_DEVICE_ID_RAZER_NAGA_TRINITY:
case USB_DEVICE_ID_RAZER_VIPER_ULTIMATE_WIRELESS:
case USB_DEVICE_ID_RAZER_BASILISK:
case USB_DEVICE_ID_RAZER_BASILISK_ULTIMATE:
Expand Down Expand Up @@ -501,6 +504,7 @@ ssize_t razer_attr_write_side_mode_spectrum(IOUSBDeviceInterface **usb_dev, cons
case USB_DEVICE_ID_RAZER_VIPER_8KHZ:
case USB_DEVICE_ID_RAZER_VIPER_MINI:
case USB_DEVICE_ID_RAZER_VIPER_ULTIMATE_WIRED:
case USB_DEVICE_ID_RAZER_NAGA_TRINITY:
case USB_DEVICE_ID_RAZER_DEATHADDER_V2_PRO_WIRELESS:
case USB_DEVICE_ID_RAZER_DEATHADDER_V2_PRO_WIRED:
case USB_DEVICE_ID_RAZER_VIPER_ULTIMATE_WIRELESS:
Expand Down Expand Up @@ -569,6 +573,7 @@ ssize_t razer_attr_write_side_mode_breath(IOUSBDeviceInterface **usb_dev, const
case USB_DEVICE_ID_RAZER_VIPER_8KHZ:
case USB_DEVICE_ID_RAZER_VIPER_MINI:
case USB_DEVICE_ID_RAZER_VIPER_ULTIMATE_WIRED:
case USB_DEVICE_ID_RAZER_NAGA_TRINITY:
case USB_DEVICE_ID_RAZER_DEATHADDER_V2_PRO_WIRELESS:
case USB_DEVICE_ID_RAZER_DEATHADDER_V2_PRO_WIRED:
case USB_DEVICE_ID_RAZER_VIPER_ULTIMATE_WIRELESS:
Expand Down Expand Up @@ -636,6 +641,7 @@ ssize_t razer_attr_write_side_mode_none(IOUSBDeviceInterface **usb_dev, const ch
case USB_DEVICE_ID_RAZER_VIPER_8KHZ:
case USB_DEVICE_ID_RAZER_VIPER_MINI:
case USB_DEVICE_ID_RAZER_VIPER_ULTIMATE_WIRED:
case USB_DEVICE_ID_RAZER_NAGA_TRINITY:
case USB_DEVICE_ID_RAZER_DEATHADDER_V2_PRO_WIRELESS:
case USB_DEVICE_ID_RAZER_DEATHADDER_V2_PRO_WIRED:
case USB_DEVICE_ID_RAZER_VIPER_ULTIMATE_WIRELESS:
Expand Down Expand Up @@ -794,6 +800,7 @@ ssize_t razer_attr_write_logo_mode_static(IOUSBDeviceInterface **usb_dev, const
case USB_DEVICE_ID_RAZER_VIPER_8KHZ:
case USB_DEVICE_ID_RAZER_VIPER_MINI:
case USB_DEVICE_ID_RAZER_VIPER_ULTIMATE_WIRED:
case USB_DEVICE_ID_RAZER_NAGA_TRINITY:
case USB_DEVICE_ID_RAZER_DEATHADDER_V2_PRO_WIRELESS:
case USB_DEVICE_ID_RAZER_DEATHADDER_V2_PRO_WIRED:
case USB_DEVICE_ID_RAZER_VIPER_ULTIMATE_WIRELESS:
Expand Down Expand Up @@ -861,6 +868,7 @@ ssize_t razer_attr_write_scroll_mode_static(IOUSBDeviceInterface **usb_dev, cons
case USB_DEVICE_ID_RAZER_VIPER_8KHZ:
case USB_DEVICE_ID_RAZER_VIPER_MINI:
case USB_DEVICE_ID_RAZER_VIPER_ULTIMATE_WIRED:
case USB_DEVICE_ID_RAZER_NAGA_TRINITY:
case USB_DEVICE_ID_RAZER_DEATHADDER_V2_PRO_WIRELESS:
case USB_DEVICE_ID_RAZER_DEATHADDER_V2_PRO_WIRED:
case USB_DEVICE_ID_RAZER_VIPER_ULTIMATE_WIRELESS:
Expand Down Expand Up @@ -949,9 +957,10 @@ ssize_t razer_attr_write_logo_mode_static_no_store(IOUSBDeviceInterface **usb_de
case USB_DEVICE_ID_RAZER_ABYSSUS_ELITE_DVA_EDITION:
case USB_DEVICE_ID_RAZER_ABYSSUS_ESSENTIAL:
case USB_DEVICE_ID_RAZER_VIPER:
case USB_DEVICE_ID_RAZER_VIPER_MINI:
case USB_DEVICE_ID_RAZER_VIPER_8KHZ:
case USB_DEVICE_ID_RAZER_VIPER_MINI:
case USB_DEVICE_ID_RAZER_VIPER_ULTIMATE_WIRED:
case USB_DEVICE_ID_RAZER_NAGA_TRINITY:
case USB_DEVICE_ID_RAZER_DEATHADDER_V2_PRO_WIRELESS:
case USB_DEVICE_ID_RAZER_DEATHADDER_V2_PRO_WIRED:
case USB_DEVICE_ID_RAZER_VIPER_ULTIMATE_WIRELESS:
Expand Down Expand Up @@ -1022,6 +1031,7 @@ ssize_t razer_attr_write_scroll_mode_static_no_store(IOUSBDeviceInterface **usb_
case USB_DEVICE_ID_RAZER_VIPER_8KHZ:
case USB_DEVICE_ID_RAZER_VIPER_MINI:
case USB_DEVICE_ID_RAZER_VIPER_ULTIMATE_WIRED:
case USB_DEVICE_ID_RAZER_NAGA_TRINITY:
case USB_DEVICE_ID_RAZER_DEATHADDER_V2_PRO_WIRELESS:
case USB_DEVICE_ID_RAZER_DEATHADDER_V2_PRO_WIRED:
case USB_DEVICE_ID_RAZER_VIPER_ULTIMATE_WIRELESS:
Expand Down Expand Up @@ -1107,6 +1117,7 @@ ssize_t razer_attr_write_logo_mode_spectrum(IOUSBDeviceInterface **usb_dev, cons
case USB_DEVICE_ID_RAZER_VIPER_8KHZ:
case USB_DEVICE_ID_RAZER_VIPER_MINI:
case USB_DEVICE_ID_RAZER_VIPER_ULTIMATE_WIRED:
case USB_DEVICE_ID_RAZER_NAGA_TRINITY:
case USB_DEVICE_ID_RAZER_DEATHADDER_V2_PRO_WIRELESS:
case USB_DEVICE_ID_RAZER_DEATHADDER_V2_PRO_WIRED:
case USB_DEVICE_ID_RAZER_VIPER_ULTIMATE_WIRELESS:
Expand Down Expand Up @@ -1164,6 +1175,7 @@ ssize_t razer_attr_write_scroll_mode_spectrum(IOUSBDeviceInterface **usb_dev, co
case USB_DEVICE_ID_RAZER_VIPER_8KHZ:
case USB_DEVICE_ID_RAZER_VIPER_MINI:
case USB_DEVICE_ID_RAZER_VIPER_ULTIMATE_WIRED:
case USB_DEVICE_ID_RAZER_NAGA_TRINITY:
case USB_DEVICE_ID_RAZER_DEATHADDER_V2_PRO_WIRELESS:
case USB_DEVICE_ID_RAZER_DEATHADDER_V2_PRO_WIRED:
case USB_DEVICE_ID_RAZER_VIPER_ULTIMATE_WIRELESS:
Expand Down Expand Up @@ -1258,6 +1270,7 @@ ssize_t razer_attr_write_logo_mode_breath(IOUSBDeviceInterface **usb_dev, const
case USB_DEVICE_ID_RAZER_VIPER_8KHZ:
case USB_DEVICE_ID_RAZER_VIPER_MINI:
case USB_DEVICE_ID_RAZER_VIPER_ULTIMATE_WIRED:
case USB_DEVICE_ID_RAZER_NAGA_TRINITY:
case USB_DEVICE_ID_RAZER_DEATHADDER_V2_PRO_WIRELESS:
case USB_DEVICE_ID_RAZER_DEATHADDER_V2_PRO_WIRED:
case USB_DEVICE_ID_RAZER_VIPER_ULTIMATE_WIRELESS:
Expand Down Expand Up @@ -1344,6 +1357,7 @@ ssize_t razer_attr_write_scroll_mode_breath(IOUSBDeviceInterface **usb_dev, cons
case USB_DEVICE_ID_RAZER_VIPER_8KHZ:
case USB_DEVICE_ID_RAZER_VIPER_MINI:
case USB_DEVICE_ID_RAZER_VIPER_ULTIMATE_WIRED:
case USB_DEVICE_ID_RAZER_NAGA_TRINITY:
case USB_DEVICE_ID_RAZER_DEATHADDER_V2_PRO_WIRELESS:
case USB_DEVICE_ID_RAZER_DEATHADDER_V2_PRO_WIRED:
case USB_DEVICE_ID_RAZER_VIPER_ULTIMATE_WIRELESS:
Expand Down Expand Up @@ -1436,6 +1450,7 @@ ssize_t razer_attr_write_logo_mode_none(IOUSBDeviceInterface **usb_dev, const ch
case USB_DEVICE_ID_RAZER_VIPER_8KHZ:
case USB_DEVICE_ID_RAZER_VIPER_MINI:
case USB_DEVICE_ID_RAZER_VIPER_ULTIMATE_WIRED:
case USB_DEVICE_ID_RAZER_NAGA_TRINITY:
case USB_DEVICE_ID_RAZER_DEATHADDER_V2_PRO_WIRELESS:
case USB_DEVICE_ID_RAZER_DEATHADDER_V2_PRO_WIRED:
case USB_DEVICE_ID_RAZER_VIPER_ULTIMATE_WIRELESS:
Expand Down Expand Up @@ -1496,6 +1511,7 @@ ssize_t razer_attr_write_scroll_mode_none(IOUSBDeviceInterface **usb_dev, const
case USB_DEVICE_ID_RAZER_VIPER_8KHZ:
case USB_DEVICE_ID_RAZER_VIPER_MINI:
case USB_DEVICE_ID_RAZER_VIPER_ULTIMATE_WIRED:
case USB_DEVICE_ID_RAZER_NAGA_TRINITY:
case USB_DEVICE_ID_RAZER_DEATHADDER_V2_PRO_WIRELESS:
case USB_DEVICE_ID_RAZER_DEATHADDER_V2_PRO_WIRED:
case USB_DEVICE_ID_RAZER_VIPER_ULTIMATE_WIRELESS:
Expand Down Expand Up @@ -1624,6 +1640,7 @@ ssize_t razer_attr_write_logo_mode_reactive(IOUSBDeviceInterface **usb_dev, cons
case USB_DEVICE_ID_RAZER_VIPER_8KHZ:
case USB_DEVICE_ID_RAZER_VIPER_MINI:
case USB_DEVICE_ID_RAZER_VIPER_ULTIMATE_WIRED:
case USB_DEVICE_ID_RAZER_NAGA_TRINITY:
case USB_DEVICE_ID_RAZER_DEATHADDER_V2_PRO_WIRELESS:
case USB_DEVICE_ID_RAZER_DEATHADDER_V2_PRO_WIRED:
case USB_DEVICE_ID_RAZER_VIPER_ULTIMATE_WIRELESS:
Expand Down Expand Up @@ -1838,4 +1855,4 @@ ssize_t razer_attr_read_is_charging(IOUSBDeviceInterface **usb_dev, char *buf)

response_report = razer_send_payload(usb_dev, &report);
return sprintf(buf, "%d\n", response_report.arguments[1]);
}
}

0 comments on commit 86fd70e

Please sign in to comment.