iPXE
|
USB Communications Device Class (CDC) More...
#include <ipxe/usb.h>
Go to the source code of this file.
Data Structures | |
struct | cdc_union_descriptor |
Union functional descriptor. More... | |
struct | cdc_connection_speed_change |
Connection speed change notification. More... | |
Macros | |
#define | USB_CLASS_CDC 2 |
Class code for communications devices. More... | |
#define | CDC_SEND_ENCAPSULATED_COMMAND |
Send encapsulated command. More... | |
#define | CDC_GET_ENCAPSULATED_RESPONSE |
Get encapsulated response. More... | |
#define | CDC_SUBTYPE_UNION 6 |
Union functional descriptor subtype. More... | |
#define | CDC_SUBTYPE_ETHERNET 15 |
Ethernet descriptor subtype. More... | |
#define | CDC_RESPONSE_AVAILABLE |
Response available. More... | |
#define | CDC_NETWORK_CONNECTION |
Network connection notification. More... | |
#define | CDC_CONNECTION_SPEED_CHANGE |
Connection speed change notification. More... | |
Functions | |
FILE_LICENCE (GPL2_OR_LATER_OR_UBDL) | |
struct cdc_union_descriptor * | cdc_union_descriptor (struct usb_configuration_descriptor *config, struct usb_interface_descriptor *interface) |
Locate CDC union functional descriptor. More... | |
static int | cdc_send_encapsulated_command (struct usb_device *usb, unsigned int interface, void *data, size_t len) |
Send encapsulated command. More... | |
static int | cdc_get_encapsulated_response (struct usb_device *usb, unsigned int interface, void *data, size_t len) |
Get encapsulated response. More... | |
USB Communications Device Class (CDC)
Definition in file cdc.h.
#define CDC_SEND_ENCAPSULATED_COMMAND |
Send encapsulated command.
#define CDC_GET_ENCAPSULATED_RESPONSE |
Get encapsulated response.
#define CDC_SUBTYPE_UNION 6 |
#define CDC_RESPONSE_AVAILABLE |
Response available.
#define CDC_NETWORK_CONNECTION |
Network connection notification.
#define CDC_CONNECTION_SPEED_CHANGE |
Connection speed change notification.
FILE_LICENCE | ( | GPL2_OR_LATER_OR_UBDL | ) |
struct cdc_union_descriptor* cdc_union_descriptor | ( | struct usb_configuration_descriptor * | config, |
struct usb_interface_descriptor * | interface | ||
) |
Locate CDC union functional descriptor.
config | Configuration descriptor |
interface | Interface descriptor |
desc | Union functional descriptor, or NULL if not found |
Definition at line 44 of file cdc.c.
References CDC_SUBTYPE_UNION, for_each_interface_descriptor, cdc_union_descriptor::header, NULL, cdc_union_descriptor::subtype, usb_descriptor_header::type, and USB_CS_INTERFACE_DESCRIPTOR.
|
inlinestatic |
Send encapsulated command.
usb | USB device |
interface | Interface number |
data | Command |
len | Length of command |
rc | Return status code |
Definition at line 80 of file cdc.h.
References CDC_SEND_ENCAPSULATED_COMMAND, data, len, and usb_control().
Referenced by acm_control_transmit().
|
inlinestatic |
Get encapsulated response.
usb | USB device |
interface | Interface number |
data | Response buffer |
len | Length of response buffer |
rc | Return status code |
Definition at line 97 of file cdc.h.
References CDC_GET_ENCAPSULATED_RESPONSE, data, len, and usb_control().
Referenced by acm_control_receive().