apmorton / pyhidapi

hidapi bindings in ctypes
MIT License
112 stars 42 forks source link

Add support for 'bus_type' filed #59

Closed ndreys closed 8 months ago

ndreys commented 8 months ago

Starting with version 0.13, struct hid_device_info has an extra data field that indicates the type of the underlying HID transport used by the device. Add plumbing necessary to expose that via DeviceInfo class. We also introduce BusType enum that mirrors its C-equivalent "hid_bus_type".

apmorton commented 8 months ago

hid_version is itself fairly new in the grand scheme of hidapi - can you make sure we continue to support older versions of hidapi that don't have hid_version?

https://github.com/libusb/hidapi/commit/8f72236099290345928e646d2f2c48f0187ac4af

ndreys commented 8 months ago

Yea, good point, I'll add code to handle that

ndreys commented 8 months ago

Added

apmorton commented 8 months ago

Thanks!

1.0.6 has been released on pypi