mirror of
https://github.com/infiniteCable2/panda.git
synced 2026-02-19 01:33:52 +08:00
add to dfu as well
This commit is contained in:
15
panda/dfu.py
15
panda/dfu.py
@@ -31,12 +31,15 @@ class PandaDFU(object):
|
||||
def list():
|
||||
context = usb1.USBContext()
|
||||
dfu_serials = []
|
||||
for device in context.getDeviceList(skip_on_error=True):
|
||||
if device.getVendorID() == 0x0483 and device.getProductID() == 0xdf11:
|
||||
try:
|
||||
dfu_serials.append(device._getASCIIStringDescriptor(3))
|
||||
except Exception:
|
||||
pass
|
||||
try:
|
||||
for device in context.getDeviceList(skip_on_error=True):
|
||||
if device.getVendorID() == 0x0483 and device.getProductID() == 0xdf11:
|
||||
try:
|
||||
dfu_serials.append(device._getASCIIStringDescriptor(3))
|
||||
except Exception:
|
||||
pass
|
||||
except Exception:
|
||||
pass
|
||||
return dfu_serials
|
||||
|
||||
@staticmethod
|
||||
|
||||
Reference in New Issue
Block a user