April 2012
Intermediate to advanced
352 pages
8h
English
In FreeBSD, usb_config structures are used to find and communicate with individual endpoints. struct usb_config is defined in the <dev/usb/usbdi.h> header as follows:
struct usb_config {
/* USB Module Private Data */
enum usb_hc_mode usb_mode;
/* Mandatory Fields */
uint8_t type;
uint8_t endpoint;
uint8_t direction;
usb_callback_t *callback;
usb_frlength_t bufsize;
/* Optional Fields */
usb_timeout_t timeout;
usb_timeout_t interval;
usb_frcount_t frames;
uint8_t ep_index;
uint8_t if_index;
/* USB Transfer Flags */
struct usb_xfer_flags flags;
};Many of the fields in struct usb_config must be initialized by a USB driver. These fields are described in the following sections.
The type field specifies the ...