Initial commit for Razer Basilisk V3 X HyperSpeed

+ Adding PID for the Basilisk V3 X HyperSpeed
+ Registered detectors
+ Added metadata to RazerDevices.cpp
+ Added capabilities to RazerController.cpp
+ Small adjustments to packet timing to ensure serial / firmware is
readable
+ Resolves #3687
This commit is contained in:
Chris M 2023-10-24 09:20:12 +11:00
parent 7067bb774f
commit fda419faca
4 changed files with 43 additions and 4 deletions

View file

@ -74,6 +74,7 @@ RazerController::RazerController(hid_device* dev_handle, hid_device* dev_argb_ha
switch(dev_pid)
{
case RAZER_BASILISK_V3_PID:
case RAZER_BASILISK_V3_X_HYPERSPEED_PID:
case RAZER_BASILISK_V3_PRO_WIRED_PID:
case RAZER_BASILISK_V3_PRO_WIRELESS_PID:
case RAZER_BASILISK_V3_PRO_BLUETOOTH_PID:
@ -961,9 +962,9 @@ std::string RazerController::razer_get_firmware()
struct razer_report report = razer_create_report(0x00, RAZER_COMMAND_ID_GET_FIRMWARE_VERSION, 0x02);
struct razer_report response_report = razer_create_response();
std::this_thread::sleep_for(1ms);
std::this_thread::sleep_for(2ms);
razer_usb_send(&report);
std::this_thread::sleep_for(1ms);
std::this_thread::sleep_for(5ms);
razer_usb_receive(&response_report);
firmware_string = "v" + std::to_string(response_report.arguments[0]) + "." + std::to_string(response_report.arguments[1]);
@ -977,9 +978,9 @@ std::string RazerController::razer_get_serial()
struct razer_report report = razer_create_report(0x00, RAZER_COMMAND_ID_GET_SERIAL_STRING, 0x16);
struct razer_report response_report = razer_create_response();
std::this_thread::sleep_for(1ms);
std::this_thread::sleep_for(2ms);
razer_usb_send(&report);
std::this_thread::sleep_for(1ms);
std::this_thread::sleep_for(5ms);
razer_usb_receive(&response_report);
strncpy(&serial_string[0], (const char*)&response_report.arguments[0], 22);

View file

@ -239,6 +239,7 @@ REGISTER_HID_DETECTOR_IPU("Razer Basilisk V3", Det
REGISTER_HID_DETECTOR_IPU("Razer Basilisk V3 Pro (Wired)", DetectRazerControllers, RAZER_VID, RAZER_BASILISK_V3_PRO_WIRED_PID, 0x00, 0x01, 0x02);
REGISTER_HID_DETECTOR_IPU("Razer Basilisk V3 Pro (Wireless)", DetectRazerControllers, RAZER_VID, RAZER_BASILISK_V3_PRO_WIRELESS_PID, 0x00, 0x01, 0x02);
// REGISTER_HID_DETECTOR_PU ("Razer Basilisk V3 Pro (Bluetooth)", DetectRazerControllers, RAZER_VID, RAZER_BASILISK_V3_PRO_BLUETOOTH_PID, 0x01, 0x02);
REGISTER_HID_DETECTOR_IPU("Razer Basilisk V3 X HyperSpeed", DetectRazerControllers, RAZER_VID, RAZER_BASILISK_V3_X_HYPERSPEED_PID, 0x00, 0x01, 0x02);
REGISTER_HID_DETECTOR_IPU("Razer Deathadder Chroma", DetectRazerControllers, RAZER_VID, RAZER_DEATHADDER_CHROMA_PID, 0x00, 0x01, 0x02);
REGISTER_HID_DETECTOR_IPU("Razer Deathadder Elite", DetectRazerControllers, RAZER_VID, RAZER_DEATHADDER_ELITE_PID, 0x00, 0x01, 0x02);
REGISTER_HID_DETECTOR_IPU("Razer Deathadder Essential", DetectRazerControllers, RAZER_VID, RAZER_DEATHADDER_ESSENTIAL_PID, 0x00, 0x01, 0x02);

View file

@ -4321,6 +4321,41 @@ static const razer_device basilisk_v3_pro_bluetooth_device =
NULL
};
/*-------------------------------------------------------------*\
| Razer Basilisk V3 X HyperSpeed 1532:00B9 |
| |
| Zone "Scroll Wheel" |
| Single |
| 1 LED |
\*-------------------------------------------------------------*/
static const razer_zone basilisk_v3_x_hyperspeed_scroll_wheel_zone =
{
"Scroll Wheel",
ZONE_TYPE_SINGLE,
1,
1
};
static const razer_device basilisk_v3_x_hyperspeed_device =
{
"Razer Basilisk V3 X HyperSpeed",
RAZER_BASILISK_V3_X_HYPERSPEED_PID,
DEVICE_TYPE_MOUSE,
RAZER_MATRIX_TYPE_EXTENDED,
0x1F,
1,
1,
{
&basilisk_v3_x_hyperspeed_scroll_wheel_zone,
NULL,
NULL,
NULL,
NULL,
NULL
},
NULL
};
/*-------------------------------------------------------------*\
| Razer DeathAdder Chroma |
| |
@ -7704,6 +7739,7 @@ const razer_device* razer_device_list[] =
&basilisk_v3_pro_wired_device,
&basilisk_v3_pro_wireless_device,
&basilisk_v3_pro_bluetooth_device,
&basilisk_v3_x_hyperspeed_device,
&deathadder_chroma_device,
&deathadder_elite_device,
&deathadder_essential_device,

View file

@ -138,6 +138,7 @@
#define RAZER_BASILISK_V3_PRO_WIRED_PID 0x00AA
#define RAZER_BASILISK_V3_PRO_WIRELESS_PID 0x00AB
#define RAZER_BASILISK_V3_PRO_BLUETOOTH_PID 0x00AC
#define RAZER_BASILISK_V3_X_HYPERSPEED_PID 0x00B9
#define RAZER_DEATHADDER_1800_PID 0x0038
#define RAZER_DEATHADDER_2000_PID 0x004F
#define RAZER_DEATHADDER_2013_PID 0x0037