-
-
Notifications
You must be signed in to change notification settings - Fork 178
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #19 from Moosieboy/master
add support for Logitech G633
- Loading branch information
Showing
6 changed files
with
41 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
#include "../device.h" | ||
|
||
#include <string.h> | ||
|
||
static struct device device_g633; | ||
|
||
static int g633_send_sidetone(hid_device *device_handle, uint8_t num); | ||
|
||
void g633_init(struct device** device) | ||
{ | ||
device_g633.idVendor = VENDOR_LOGITECH; | ||
device_g633.idProduct = 0x0a5c; | ||
|
||
strcpy(device_g633.device_name, "Logitech G633 Gaming Headset"); | ||
|
||
device_g633.capabilities = CAP_SIDETONE; | ||
device_g633.send_sidetone = &g633_send_sidetone; | ||
|
||
*device = &device_g633; | ||
} | ||
|
||
static int g633_send_sidetone(hid_device *device_handle, uint8_t num) | ||
{ | ||
unsigned char data[5] = {0x11, 0xFF, 0x07, 0x1A, num}; | ||
|
||
return hid_write(device_handle, data, 5); | ||
} | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
#pragma once | ||
|
||
void g633_init(struct device** device); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
SUBSYSTEM=="usb", ENV{ID_MODEL}=="Logitech_G633_Gaming_Headset", MODE="0666" |