Works in Windows with this patch
Brought to you by:
tesarik
The latest version (0.3) of this tool (cp210x) works in Windows with the latest libusb-win32 (1.2.6.0) except that it needs the following patch. It would be great if you could include this into the main release:
:::python
def __init__(self, usbdev):
self.usbdev = usbdev
self._locked = None
- self.has_kernel_driver = False
+ try:
+ self.has_kernel_driver = usbdev.is_kernel_driver_active(0)
+ except NotImplementedError:
+ self.has_kernel_driver = False
if self.has_kernel_driver:
cfg = usbdev.get_active_configuration()
self.intf = cfg[(0,0)].bInterfaceNumber
usbdev.detach_kernel_driver(self.intf)
usbdev.set_configuration()
Thank you for the patch! I've applied it to the repository.
Looking at the rate of change and number of downloads, let's finally make a 1.0 release.