FreeBSD kernel usb device Code
|
#include <sys/stdint.h>
#include <sys/stddef.h>
#include <sys/param.h>
#include <sys/queue.h>
#include <sys/types.h>
#include <sys/systm.h>
#include <sys/kernel.h>
#include <sys/bus.h>
#include <sys/module.h>
#include <sys/lock.h>
#include <sys/mutex.h>
#include <sys/condvar.h>
#include <sys/sysctl.h>
#include <sys/sx.h>
#include <sys/unistd.h>
#include <sys/callout.h>
#include <sys/malloc.h>
#include <sys/priv.h>
#include <dev/usb/usb.h>
#include <dev/usb/usbdi.h>
#include <dev/usb/usbdi_util.h>
#include <dev/usb/usbhid.h>
#include <dev/usb/usb_core.h>
#include <dev/usb/usb_debug.h>
#include <dev/usb/usb_process.h>
#include <dev/usb/usb_device.h>
#include <dev/usb/usb_request.h>
Go to the source code of this file.
Macros | |
#define | USB_DEBUG_VAR usb_debug |
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) |
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().