felHR85 / WinUsbPy

A python wrapper over WinUsb library
MIT License
27 stars 21 forks source link

Updates from WinUsbCDC #7

Closed andrewleech closed 4 years ago

andrewleech commented 4 years ago

This PR contains a number of patches made during my work on WinUsbCDC as discussed in https://github.com/felHR85/WinUsbPy/issues/6#issuecomment-647360544

Includes Python 3 support originally based on: https://github.com/Vlastbia/WinUsbPy/commit/05bfac7b0cd9fafdbb1c8d2ee2856b0460631d00

On top of this there's 64bit support (over a couple of commits), changes to the way WinUSB devices are found/attached to to support optionally searching by name instead on vid/pid.

There's some work to support communicating with devices that are part of a composite device but I haven't included all of the commits because I think my approach for it was pretty hacky and not ideal.

There's a couple of new functions: flush and set_timeout

Minor changes to the return values of read() and write()