FreeBSD kernel usb device Code
usb_hid.c File Reference
#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>
Include dependency graph for usb_hid.c:

Go to the source code of this file.

Macros

#define USB_DEBUG_VAR   usb_debug
 

Functions

struct usb_hid_descriptorhid_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)
 

Macro Definition Documentation

◆ USB_DEBUG_VAR

#define USB_DEBUG_VAR   usb_debug

Definition at line 62 of file usb_hid.c.

Function Documentation

◆ hid_get_descriptor_from_usb()

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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ usbd_req_get_hid_desc()

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 
)