Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.

cdc.h 1.4KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. #ifndef _IPXE_CDC_H
  2. #define _IPXE_CDC_H
  3. /** @file
  4. *
  5. * USB Communications Device Class (CDC)
  6. *
  7. */
  8. FILE_LICENCE ( GPL2_OR_LATER );
  9. #include <ipxe/usb.h>
  10. /** Class code for communications devices */
  11. #define USB_CLASS_CDC 2
  12. /** Union functional descriptor */
  13. struct cdc_union_descriptor {
  14. /** Descriptor header */
  15. struct usb_descriptor_header header;
  16. /** Descriptor subtype */
  17. uint8_t subtype;
  18. /** Interfaces (variable-length) */
  19. uint8_t interface[1];
  20. } __attribute__ (( packed ));
  21. /** Union functional descriptor subtype */
  22. #define CDC_SUBTYPE_UNION 6
  23. /** Ethernet descriptor subtype */
  24. #define CDC_SUBTYPE_ETHERNET 15
  25. /** Network connection notification */
  26. #define CDC_NETWORK_CONNECTION \
  27. ( USB_DIR_IN | USB_TYPE_CLASS | USB_RECIP_INTERFACE | \
  28. USB_REQUEST_TYPE ( 0x00 ) )
  29. /** Connection speed change notification */
  30. #define CDC_CONNECTION_SPEED_CHANGE \
  31. ( USB_DIR_IN | USB_TYPE_CLASS | USB_RECIP_INTERFACE | \
  32. USB_REQUEST_TYPE ( 0x2a ) )
  33. /** Connection speed change notification */
  34. struct cdc_connection_speed_change {
  35. /** Downlink bit rate, in bits per second */
  36. uint32_t down;
  37. /** Uplink bit rate, in bits per second */
  38. uint32_t up;
  39. } __attribute__ (( packed ));
  40. extern struct cdc_union_descriptor *
  41. cdc_union_descriptor ( struct usb_configuration_descriptor *config,
  42. struct usb_interface_descriptor *interface );
  43. #endif /* _IPXE_CDC_H */