16#define USB_CLASS_CDC 2
19#define CDC_SEND_ENCAPSULATED_COMMAND \
20 ( USB_DIR_OUT | USB_TYPE_CLASS | USB_RECIP_INTERFACE | \
21 USB_REQUEST_TYPE ( 0x00 ) )
24#define CDC_GET_ENCAPSULATED_RESPONSE \
25 ( USB_DIR_IN | USB_TYPE_CLASS | USB_RECIP_INTERFACE | \
26 USB_REQUEST_TYPE ( 0x01 ) )
39#define CDC_SUBTYPE_UNION 6
42#define CDC_SUBTYPE_ETHERNET 15
45#define CDC_RESPONSE_AVAILABLE \
46 ( USB_DIR_IN | USB_TYPE_CLASS | USB_RECIP_INTERFACE | \
47 USB_REQUEST_TYPE ( 0x01 ) )
50#define CDC_NETWORK_CONNECTION \
51 ( USB_DIR_IN | USB_TYPE_CLASS | USB_RECIP_INTERFACE | \
52 USB_REQUEST_TYPE ( 0x00 ) )
55#define CDC_CONNECTION_SPEED_CHANGE \
56 ( USB_DIR_IN | USB_TYPE_CLASS | USB_RECIP_INTERFACE | \
57 USB_REQUEST_TYPE ( 0x2a ) )
#define CDC_GET_ENCAPSULATED_RESPONSE
Get encapsulated response.
#define CDC_SEND_ENCAPSULATED_COMMAND
Send encapsulated command.
static int cdc_get_encapsulated_response(struct usb_device *usb, unsigned int interface, void *data, size_t len)
Get encapsulated response.
struct cdc_union_descriptor * cdc_union_descriptor(struct usb_configuration_descriptor *config, struct usb_interface_descriptor *interface)
Locate CDC union functional descriptor.
static int cdc_send_encapsulated_command(struct usb_device *usb, unsigned int interface, void *data, size_t len)
Send encapsulated command.
uint8_t data[48]
Additional event data.
#define FILE_LICENCE(_licence)
Declare a particular licence as applying to a file.
#define FILE_SECBOOT(_status)
Declare a file's UEFI Secure Boot permission status.
Universal Serial Bus (USB)
Connection speed change notification.
uint32_t down
Downlink bit rate, in bits per second.
uint32_t up
Uplink bit rate, in bits per second.
Union functional descriptor.
uint8_t subtype
Descriptor subtype.
uint8_t interface[1]
Interfaces (variable-length)
struct usb_descriptor_header header
Descriptor header.
A USB configuration descriptor.
A USB interface descriptor.
int usb_control(struct usb_device *usb, unsigned int request, unsigned int value, unsigned int index, void *data, size_t len)
Issue USB control transaction.