|
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. | |
| #define | CDC_SEND_ENCAPSULATED_COMMAND |
| Send encapsulated command. | |
| #define | CDC_GET_ENCAPSULATED_RESPONSE |
| Get encapsulated response. | |
| #define | CDC_SUBTYPE_UNION 6 |
| Union functional descriptor subtype. | |
| #define | CDC_SUBTYPE_ETHERNET 15 |
| Ethernet descriptor subtype. | |
| #define | CDC_RESPONSE_AVAILABLE |
| Response available. | |
| #define | CDC_NETWORK_CONNECTION |
| Network connection notification. | |
| #define | CDC_CONNECTION_SPEED_CHANGE |
| Connection speed change notification. | |
Functions | |
| FILE_LICENCE (GPL2_OR_LATER_OR_UBDL) | |
| FILE_SECBOOT (PERMITTED) | |
| 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. | |
| static int | cdc_get_encapsulated_response (struct usb_device *usb, unsigned int interface, void *data, size_t len) |
| Get encapsulated response. | |
USB Communications Device Class (CDC)
Definition in file cdc.h.
| #define USB_CLASS_CDC 2 |
Class code for communications devices.
Definition at line 16 of file cdc.h.
Referenced by usb_describe().
| #define CDC_SEND_ENCAPSULATED_COMMAND |
Send encapsulated command.
Definition at line 19 of file cdc.h.
Referenced by cdc_send_encapsulated_command().
| #define CDC_GET_ENCAPSULATED_RESPONSE |
Get encapsulated response.
Definition at line 24 of file cdc.h.
Referenced by cdc_get_encapsulated_response().
| #define CDC_SUBTYPE_UNION 6 |
Union functional descriptor subtype.
Definition at line 39 of file cdc.h.
Referenced by cdc_union_descriptor().
| #define CDC_SUBTYPE_ETHERNET 15 |
Ethernet descriptor subtype.
Definition at line 42 of file cdc.h.
Referenced by ecm_ethernet_descriptor().
| #define CDC_RESPONSE_AVAILABLE |
Response available.
Definition at line 45 of file cdc.h.
Referenced by acm_intr_complete().
| #define CDC_NETWORK_CONNECTION |
Network connection notification.
Definition at line 50 of file cdc.h.
Referenced by ecm_intr_complete(), and ncm_intr_complete().
| #define CDC_CONNECTION_SPEED_CHANGE |
Connection speed change notification.
Definition at line 55 of file cdc.h.
Referenced by ecm_intr_complete(), and ncm_intr_complete().
| FILE_LICENCE | ( | GPL2_OR_LATER_OR_UBDL | ) |
| FILE_SECBOOT | ( | PERMITTED | ) |
|
extern |
Locate CDC union functional descriptor.
| config | Configuration descriptor |
| interface | Interface descriptor |
| desc | Union functional descriptor, or NULL if not found |
Definition at line 45 of file cdc.c.
References CDC_SUBTYPE_UNION, desc, for_each_interface_descriptor, NULL, 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 81 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 98 of file cdc.h.
References CDC_GET_ENCAPSULATED_RESPONSE, data, len, and usb_control().
Referenced by acm_control_receive().