summaryrefslogtreecommitdiffstats
path: root/src/include/ipxe/cdc.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/include/ipxe/cdc.h')
-rw-r--r--src/include/ipxe/cdc.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/include/ipxe/cdc.h b/src/include/ipxe/cdc.h
index 2eec598a..929a6a65 100644
--- a/src/include/ipxe/cdc.h
+++ b/src/include/ipxe/cdc.h
@@ -14,6 +14,19 @@ FILE_LICENCE ( GPL2_OR_LATER );
/** Class code for communications devices */
#define USB_CLASS_CDC 2
+/** Union functional descriptor */
+struct cdc_union_descriptor {
+ /** Descriptor header */
+ struct usb_descriptor_header header;
+ /** Descriptor subtype */
+ uint8_t subtype;
+ /** Interfaces (variable-length) */
+ uint8_t interface[1];
+} __attribute__ (( packed ));
+
+/** Union functional descriptor subtype */
+#define CDC_SUBTYPE_UNION 6
+
/** Ethernet descriptor subtype */
#define CDC_SUBTYPE_ETHERNET 15
@@ -35,4 +48,8 @@ struct cdc_connection_speed_change {
uint32_t up;
} __attribute__ (( packed ));
+extern struct cdc_union_descriptor *
+cdc_union_descriptor ( struct usb_configuration_descriptor *config,
+ struct usb_interface_descriptor *interface );
+
#endif /* _IPXE_CDC_H */