mirror of
https://github.com/bkerler/mtkclient.git
synced 2024-11-14 19:25:05 -05:00
Update usblib.py
This commit is contained in:
parent
6088abfe59
commit
80af3a5b57
1 changed files with 5 additions and 2 deletions
|
@ -104,8 +104,11 @@ class usb_class(metaclass=LogBase):
|
|||
elif sys.platform.startswith('win32'):
|
||||
self.backend = usb.backend.libusb1.get_backend(find_library=lambda x: "libusb-1.0.dll")
|
||||
if self.backend is not None:
|
||||
self.backend.lib.libusb_set_option.argtypes = [c_void_p, c_int]
|
||||
self.backend.lib.libusb_set_option(self.backend.ctx, 1)
|
||||
try:
|
||||
self.backend.lib.libusb_set_option.argtypes = [c_void_p, c_int]
|
||||
self.backend.lib.libusb_set_option(self.backend.ctx, 1)
|
||||
except:
|
||||
self.backend = None
|
||||
|
||||
def verify_data(self, data, pre="RX:"):
|
||||
if self.__logger.level == logging.DEBUG:
|
||||
|
|
Loading…
Reference in a new issue