34#include <dev/hid/hid.h>
36#ifndef USB_GLOBAL_INCLUDE_FILE
40#define UR_GET_HID_DESCRIPTOR 0x06
42#define UDESC_REPORT 0x22
43#define UDESC_PHYSICAL 0x23
44#define UR_SET_HID_DESCRIPTOR 0x07
45#define UR_GET_REPORT 0x01
46#define UR_SET_REPORT 0x09
47#define UR_GET_IDLE 0x02
48#define UR_SET_IDLE 0x0a
49#define UR_GET_PROTOCOL 0x03
50#define UR_SET_PROTOCOL 0x0b
64#define USB_HID_DESCRIPTOR_SIZE(n) (9+((n)*3))
66#define UHID_INPUT_REPORT HID_INPUT_REPORT
67#define UHID_OUTPUT_REPORT HID_OUTPUT_REPORT
68#define UHID_FEATURE_REPORT HID_FEATURE_REPORT
70#if defined(_KERNEL) || defined(_STANDALONE)
75#define hid_report_size(buf, len, kind, id) \
76 hid_report_size_max(buf, len, kind, id)
77static __inline uint32_t
78hid_get_data_unsigned(
const uint8_t *buf, hid_size_t
len,
79 struct hid_location *loc)
81 return (hid_get_udata(buf,
len, loc));
84hid_put_data_unsigned(uint8_t *buf, hid_size_t
len,
struct hid_location *loc,
87 return (hid_put_udata(buf,
len, loc, value));
95 void **descp, uint16_t *sizep,
struct malloc_type *mem,
struct usb_hid_descriptor::@92 descrs[1]
usb_error_t usbd_req_get_hid_desc(struct usb_device *udev, struct mtx *mtx, void **descp, uint16_t *sizep, struct malloc_type *mem, uint8_t iface_index)
struct usb_hid_descriptor * hid_get_descriptor_from_usb(struct usb_config_descriptor *cd, struct usb_interface_descriptor *id)
struct usb_hid_descriptor __packed