logo

oasis-root

Compiled tree of Oasis Linux based on own branch at <https://hacktivis.me/git/oasis/> git clone https://anongit.hacktivis.me/git/oasis-root.git

g_hid.h (1251B)


  1. /* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */
  2. #ifndef __UAPI_LINUX_USB_G_HID_H
  3. #define __UAPI_LINUX_USB_G_HID_H
  4. #include <linux/types.h>
  5. /* Maximum HID report length for High-Speed USB (i.e. USB 2.0) */
  6. #define MAX_REPORT_LENGTH 64
  7. /**
  8. * struct usb_hidg_report - response to GET_REPORT
  9. * @report_id: report ID that this is a response for
  10. * @userspace_req:
  11. * !0 this report is used for any pending GET_REPORT request
  12. * but wait on userspace to issue a new report on future requests
  13. * 0 this report is to be used for any future GET_REPORT requests
  14. * @length: length of the report response
  15. * @data: report response
  16. * @padding: padding for 32/64 bit compatibility
  17. *
  18. * Structure used by GADGET_HID_WRITE_GET_REPORT ioctl on /dev/hidg*.
  19. */
  20. struct usb_hidg_report {
  21. __u8 report_id;
  22. __u8 userspace_req;
  23. __u16 length;
  24. __u8 data[MAX_REPORT_LENGTH];
  25. __u8 padding[4];
  26. };
  27. /* The 'g' code is used by gadgetfs and hid gadget ioctl requests.
  28. * Don't add any colliding codes to either driver, and keep
  29. * them in unique ranges.
  30. */
  31. #define GADGET_HID_READ_GET_REPORT_ID _IOR('g', 0x41, __u8)
  32. #define GADGET_HID_WRITE_GET_REPORT _IOW('g', 0x42, struct usb_hidg_report)
  33. #endif /* __UAPI_LINUX_USB_G_HID_H */