6 * USB Communications Device Class (CDC)
10 FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
14 /** Class code for communications devices */
15 #define USB_CLASS_CDC 2
17 /** Union functional descriptor */
18 struct cdc_union_descriptor {
19 /** Descriptor header */
20 struct usb_descriptor_header header;
21 /** Descriptor subtype */
23 /** Interfaces (variable-length) */
25 } __attribute__ (( packed ));
27 /** Union functional descriptor subtype */
28 #define CDC_SUBTYPE_UNION 6
30 /** Ethernet descriptor subtype */
31 #define CDC_SUBTYPE_ETHERNET 15
33 /** Network connection notification */
34 #define CDC_NETWORK_CONNECTION \
35 ( USB_DIR_IN | USB_TYPE_CLASS | USB_RECIP_INTERFACE | \
36 USB_REQUEST_TYPE ( 0x00 ) )
38 /** Connection speed change notification */
39 #define CDC_CONNECTION_SPEED_CHANGE \
40 ( USB_DIR_IN | USB_TYPE_CLASS | USB_RECIP_INTERFACE | \
41 USB_REQUEST_TYPE ( 0x2a ) )
43 /** Connection speed change notification */
44 struct cdc_connection_speed_change {
45 /** Downlink bit rate, in bits per second */
47 /** Uplink bit rate, in bits per second */
49 } __attribute__ (( packed ));
51 extern struct cdc_union_descriptor *
52 cdc_union_descriptor ( struct usb_configuration_descriptor *config,
53 struct usb_interface_descriptor *interface );
55 #endif /* _IPXE_CDC_H */