device: add USB information for G700s
This commit is contained in:
parent
a9d6b4c319
commit
fdb1b43373
|
|
@ -156,11 +156,11 @@ ALL = (
|
||||||
LIGHTSPEED_RECEIVER_C541,
|
LIGHTSPEED_RECEIVER_C541,
|
||||||
)
|
)
|
||||||
|
|
||||||
_wired_device = lambda product_id: {
|
_wired_device = lambda product_id, interface: {
|
||||||
'vendor_id': 0x046d,
|
'vendor_id': 0x046d,
|
||||||
'product_id': product_id,
|
'product_id': product_id,
|
||||||
'bus_id': 0x3,
|
'bus_id': 0x3,
|
||||||
'usb_interface': 2,
|
'usb_interface': interface,
|
||||||
'isDevice': True
|
'isDevice': True
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -170,7 +170,7 @@ WIRED_DEVICES = []
|
||||||
|
|
||||||
for _ignore, d in _DEVICES.items():
|
for _ignore, d in _DEVICES.items():
|
||||||
if d.usbid:
|
if d.usbid:
|
||||||
WIRED_DEVICES.append(_wired_device(d.usbid))
|
WIRED_DEVICES.append(_wired_device(d.usbid, d.interface if d.interface else 2))
|
||||||
if d.btid:
|
if d.btid:
|
||||||
WIRED_DEVICES.append(_bt_device(d.btid))
|
WIRED_DEVICES.append(_bt_device(d.btid))
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -33,7 +33,7 @@ from .settings_templates import RegisterSettings as _RS
|
||||||
|
|
||||||
_DeviceDescriptor = namedtuple(
|
_DeviceDescriptor = namedtuple(
|
||||||
'_DeviceDescriptor',
|
'_DeviceDescriptor',
|
||||||
('name', 'kind', 'wpid', 'codename', 'protocol', 'registers', 'settings', 'persister', 'usbid', 'btid')
|
('name', 'kind', 'wpid', 'codename', 'protocol', 'registers', 'settings', 'persister', 'usbid', 'interface', 'btid')
|
||||||
)
|
)
|
||||||
del namedtuple
|
del namedtuple
|
||||||
|
|
||||||
|
|
@ -51,7 +51,8 @@ def _D(
|
||||||
settings=None,
|
settings=None,
|
||||||
persister=None,
|
persister=None,
|
||||||
usbid=None,
|
usbid=None,
|
||||||
btid=None
|
interface=None,
|
||||||
|
btid=None,
|
||||||
):
|
):
|
||||||
assert name
|
assert name
|
||||||
|
|
||||||
|
|
@ -96,6 +97,7 @@ def _D(
|
||||||
settings=settings,
|
settings=settings,
|
||||||
persister=persister,
|
persister=persister,
|
||||||
usbid=usbid,
|
usbid=usbid,
|
||||||
|
interface=interface,
|
||||||
btid=btid
|
btid=btid
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
@ -555,6 +557,8 @@ _D(
|
||||||
codename='G700s',
|
codename='G700s',
|
||||||
protocol=1.0,
|
protocol=1.0,
|
||||||
wpid='102A',
|
wpid='102A',
|
||||||
|
usbid=0xc07c,
|
||||||
|
interface=1,
|
||||||
registers=(
|
registers=(
|
||||||
_R.battery_status,
|
_R.battery_status,
|
||||||
_R.three_leds,
|
_R.three_leds,
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue