|author||Tom Thorogood <firstname.lastname@example.org>||Wed Feb 03 21:19:46 2021 +1030|
|committer||Tobias Klauser <email@example.com>||Tue Feb 23 08:53:22 2021 +0000|
unix: add HIDRAW ioctls This change adds (most) of the ioctl API for the Linux HIDRAW interface. Reading and writing non-numbered HID reports is done using the read and write system calls respectively. Some of the HIDIOC* request numbers are exported directly while others are kept unexported. This is because some of the #defines require a len attribute that doesn't have a specific well defined value. Wrapper types are added for most of the request numbers as is standard. No wrapper is added for HIDIOCGRDESCSIZE as it would just be IoctlGetUint32. The HIDIOC[GS]FEATURE, HIDIOC[GS]INPUT and HIDIOC[GS]OUTPUT request numbers, which are required for numbered HID reports, are entirely ommitted as the len attribute has to be a runtime variable. These could be added later by doing something like `HIDIOCGFEATURE(0) | (len << _IOC_SIZESHIFT)`, with care taken that len doesn't overflow _IOC_XSIZEMASK. Outdated documentation for the HIDRAW interface is available at: https://www.kernel.org/doc/Documentation/hid/hidraw.txt. Change-Id: I2ae5060f0f46150f6fb52959c2e55f50927c1f69 Reviewed-on: https://go-review.googlesource.com/c/sys/+/289169 Reviewed-by: Ian Lance Taylor <firstname.lastname@example.org> Reviewed-by: Tobias Klauser <email@example.com> Run-TryBot: Ian Lance Taylor <firstname.lastname@example.org> TryBot-Result: Go Bot <email@example.com>
This repository holds supplemental Go packages for low-level interactions with the operating system.
The easiest way to install is to run
go get -u golang.org/x/sys. You can also manually git clone the repository to
This repository uses Gerrit for code changes. To learn how to submit changes to this repository, see https://golang.org/doc/contribute.html.
The main issue tracker for the sys repository is located at https://github.com/golang/go/issues. Prefix your issue with “x/sys:” in the subject line, so it is easy to find.