FreeBSD kernel usb device Code
|
Go to the source code of this file.
Data Structures | |
struct | usb_hid_descriptor |
Macros | |
#define | UR_GET_HID_DESCRIPTOR 0x06 |
#define | UDESC_HID 0x21 |
#define | UDESC_REPORT 0x22 |
#define | UDESC_PHYSICAL 0x23 |
#define | UR_SET_HID_DESCRIPTOR 0x07 |
#define | UR_GET_REPORT 0x01 |
#define | UR_SET_REPORT 0x09 |
#define | UR_GET_IDLE 0x02 |
#define | UR_SET_IDLE 0x0a |
#define | UR_GET_PROTOCOL 0x03 |
#define | UR_SET_PROTOCOL 0x0b |
#define | USB_HID_DESCRIPTOR_SIZE(n) (9+((n)*3)) |
#define | UHID_INPUT_REPORT HID_INPUT_REPORT |
#define | UHID_OUTPUT_REPORT HID_OUTPUT_REPORT |
#define | UHID_FEATURE_REPORT HID_FEATURE_REPORT |
Functions | |
struct usb_hid_descriptor * | hid_get_descriptor_from_usb (struct usb_config_descriptor *cd, struct usb_interface_descriptor *id) |
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) |
Variables | |
struct usb_hid_descriptor | __packed |
struct usb_hid_descriptor * hid_get_descriptor_from_usb | ( | struct usb_config_descriptor * | cd, |
struct usb_interface_descriptor * | id | ||
) |
Definition at line 82 of file usb_hid.c.
References usb_endpoint_descriptor::bDescriptorType, usb_endpoint_descriptor::bLength, desc, UDESC_HID, UDESC_INTERFACE, usb_desc_foreach(), and USB_HID_DESCRIPTOR_SIZE.
Referenced by usbd_req_get_hid_desc(), and usbhid_fill_device_info().
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 | ||
) |
Definition at line 113 of file usb_hid.c.
References usb_hid_descriptor::descrs, hid_get_descriptor_from_usb(), usb_interface::idesc, UGETW, USB_ERR_INVAL, USB_ERR_IOERROR, USB_ERR_NOMEM, USB_ERR_NORMAL_COMPLETION, usbd_get_config_descriptor(), usbd_get_iface(), usbd_req_get_report_descriptor(), and usb_hid_descriptor::wDescriptorLength.
Referenced by ucycom_attach(), ugold_attach(), uhid_attach(), uhid_probe(), ukbd_attach(), ukbd_probe(), ums_attach(), ums_probe(), wmt_probe(), and wsp_attach().
struct usb_hid_descriptor __packed |