

def __init__(self, dev):
    self.deviceClass = dev.bDeviceClass
    self.deviceSubClass = dev.bDeviceSubClass
    self.deviceProtocol = dev.bDeviceProtocol
    self.deviceVersion = ((((str(((dev.bcdDevice >> 12) & 15)) + str(((dev.bcdDevice >> 8) & 15))) + '.') + str(((dev.bcdDevice >> 4) & 15))) + str((dev.bcdDevice & 15)))
    self.devnum = None
    self.filename = ''
    self.iManufacturer = dev.iManufacturer
    self.iProduct = dev.iProduct
    self.iSerialNumber = dev.iSerialNumber
    self.idProduct = dev.idProduct
    self.idVendor = dev.idVendor
    self.maxPacketSize = dev.bMaxPacketSize0
    self.usbVersion = ((((str(((dev.bcdUSB >> 12) & 15)) + str(((dev.bcdUSB >> 8) & 15))) + '.') + str(((dev.bcdUSB >> 4) & 15))) + str((dev.bcdUSB & 15)))
    self.configurations = [Configuration(c) for c in dev]
    self.dev = dev

dataset/ETHPy150Open walac/pyusb/usb/legacy.py Device.__init__/original