greatscottgadgets / libgreat

a library to help you do Great things
BSD 3-Clause "New" or "Revised" License
31 stars 25 forks source link

handle usb exclusive access on windows #23

Closed BJamin99 closed 2 years ago

BJamin99 commented 3 years ago

Instead of waiting for exclusive access when e.errno is None, just return. This addresses issue #327. Limited testing performed, but the device seems to work in i2c, info, and some facedancer testing.

BJamin99 commented 2 years ago

Doesn't seem like this is strictly necessary to resolve the issue. Found another way to resolve by assigning libusbK to "GreatFET (Interface 0)" only so "GreatFET (Interface 1)" isn't seen by pyusb. That seems to fix the issue without having to skip claim_interface on Windows. See comment on greatfet issue #327.