mirror of
https://github.com/bkerler/edl.git
synced 2024-11-14 19:14:58 -05:00
Fix nop and usb kernel issues
This commit is contained in:
parent
941e86ea1a
commit
b208e3edd6
2 changed files with 18 additions and 5 deletions
10
edl
10
edl
|
@ -310,11 +310,11 @@ class main(metaclass=LogBase):
|
|||
self.cdc.timeout = None
|
||||
sahara_info = self.sahara.streaminginfo()
|
||||
if sahara_info:
|
||||
sahara_connnect = self.sahara.connect()
|
||||
if len(sahara_connnect) == 3:
|
||||
mode, cmd, resp = sahara_connnect
|
||||
else:
|
||||
mode, resp = sahara_connnect
|
||||
sahara_connect = self.sahara.connect()
|
||||
if len(sahara_connect) == 3:
|
||||
mode, cmd, resp = sahara_connect
|
||||
else:
|
||||
mode, resp = sahara_connect
|
||||
if mode == "sahara":
|
||||
mode = self.sahara.upload_loader()
|
||||
if "enprg" in self.sahara.programmer.lower():
|
||||
|
|
|
@ -255,6 +255,18 @@ class usb_class(DeviceClass):
|
|||
|
||||
if self.EP_OUT is not None and self.EP_IN is not None:
|
||||
self.maxsize = self.EP_IN.wMaxPacketSize
|
||||
try:
|
||||
if self.device.is_kernel_driver_active(0):
|
||||
self.debug("Detaching kernel driver")
|
||||
self.device.detach_kernel_driver(0)
|
||||
except Exception as err:
|
||||
self.debug("No kernel driver supported: " + str(err))
|
||||
|
||||
try:
|
||||
usb.util.claim_interface(self.device, 0)
|
||||
except:
|
||||
pass
|
||||
"""
|
||||
self.debug(self.configuration)
|
||||
if self.interface != 0:
|
||||
try:
|
||||
|
@ -284,6 +296,7 @@ class usb_class(DeviceClass):
|
|||
usb.util.claim_interface(self.device, self.interface)
|
||||
except:
|
||||
pass
|
||||
"""
|
||||
self.connected = True
|
||||
return True
|
||||
print("Couldn't find CDC interface. Aborting.")
|
||||
|
|
Loading…
Reference in a new issue