vendor: update USB HID lib (fix macOS crash)

This commit is contained in:
Péter Szilágyi
2017-08-21 13:45:50 +03:00
parent afdfdebd87
commit 3e14837c1c
6 changed files with 25 additions and 6 deletions

View File

@@ -24,6 +24,12 @@ and go-gettable.
Supported platforms at the moment are Linux, macOS and Windows (exclude constraints are also specified
for Android and iOS to allow smoother vendoring into cross platform projects).
## Cross-compiling
Using `go get` the embedded C library is compiled into the binary format of your host OS. Cross compiling to a different platform or architecture entails disabling CGO by default in Go, causing device enumeration `hid.Enumerate()` to yield no results.
To cross compile a functional version of this library, you'll need to enable CGO during cross compilation via `CGO_ENABLED=1` and you'll need to install and set a cross compilation enabled C toolkit via `CC=your-cross-gcc`.
## Acknowledgements
Although the `hid` package is an implementation from scratch, it was heavily inspired by the existing