added ant esports GM600 mouse

This commit is contained in:
shafiahaz2478 2024-08-30 19:26:19 +00:00 committed by Adam Honse
parent 11bdaaa2fc
commit 406350f5f5
5 changed files with 87 additions and 9 deletions

View file

@ -17,6 +17,7 @@ InstantMouseController::InstantMouseController(hid_device* dev_handle, const hid
{
dev = dev_handle;
location = info.path;
pid = info.product_id;
version = "";
}
@ -43,6 +44,11 @@ std::string InstantMouseController::GetSerialString()
return(StringUtils::wstring_to_string(serial_string));
}
uint16_t InstantMouseController::GetPID()
{
return pid;
}
std::string InstantMouseController::GetFirmwareVersion()
{
return(version);
@ -78,7 +84,7 @@ void InstantMouseController::SetMode(uint8_t mode_value, uint8_t speed, uint8_t
{
/*---------------------------------------------------------*\
| Packet details: |
| 07 13 FF MS DN -B -- -- |
| 07 13 FF MS DN -B M- -- |
| |
| 07 = report id |
| 13 = set mode function |
@ -103,7 +109,7 @@ void InstantMouseController::SetMode(uint8_t mode_value, uint8_t speed, uint8_t
pkt[4] = (direction << 4) | led_mask;
pkt[5] = 0xF - (brightness & 0xF);
pkt[6] = 0x00;
pkt[6] = mode_value & 0xF0;
pkt[7] = 0x00;
hid_send_feature_report(dev, pkt, INSTANT_MOUSE_REPORT_SIZE);