Difference between revisions of "Unit USBCDC"
(2 intermediate revisions by the same user not shown) | |||
Line 12: | Line 12: | ||
---- | ---- | ||
− | '' | + | |
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;"> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''CDC specific constants''' <code> USB_CDC_*_TYPE </code></div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | |colspan="2"|Class specific descriptor types (See: USB Class Definitions for Communications Devices 1.2) | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>USB_CDC_HEADER_TYPE = $00;</code> | ||
+ | | Header Functional Descriptor | ||
+ | |- | ||
+ | | <code>USB_CDC_CALL_MANAGEMENT_TYPE = $01;</code> | ||
+ | | Call Management Functional Descriptor | ||
+ | |- | ||
+ | | <code>USB_CDC_ACM_TYPE = $02;</code> | ||
+ | | Abstract Control Management Functional Descriptor | ||
+ | |- | ||
+ | | <code>USB_CDC_DLM_TYPE = $03;</code> | ||
+ | | Direct Line Management Functional Descriptor | ||
+ | |- | ||
+ | | <code>USB_CDC_RINGER_TYPE = $04;</code> | ||
+ | | Telephone Ringer Functional Descriptor | ||
+ | |- | ||
+ | | <code>USB_CDC_CALL_LINE_TYPE = $05;</code> | ||
+ | | Telephone Call and Line State Reporting Capabilities Functional Descriptor | ||
+ | |- | ||
+ | | <code>USB_CDC_UNION_TYPE = $06;</code> | ||
+ | | Union Functional Descriptor | ||
+ | |- | ||
+ | | <code>USB_CDC_COUNTRY_TYPE = $07;</code> | ||
+ | | Country Selection Functional Descriptor | ||
+ | |- | ||
+ | | <code>USB_CDC_TOM_TYPE = $08;</code> | ||
+ | | Telephone Operational Modes Functional Descriptor | ||
+ | |- | ||
+ | | <code>USB_CDC_USB_TERMINAL_TYPE = $09;</code> | ||
+ | | USB Terminal Functional Descriptor | ||
+ | |- | ||
+ | | <code>USB_CDC_NETWORK_TERMINAL_TYPE = $0a;</code> | ||
+ | | Network Channel Terminal Descriptor | ||
+ | |- | ||
+ | | <code>USB_CDC_PROTOCOL_TYPE = $0b;</code> | ||
+ | | Protocol Unit Functional Descriptor | ||
+ | |- | ||
+ | | <code>USB_CDC_EXTENSION_TYPE = $0c;</code> | ||
+ | | Extension Unit Functional Descriptor | ||
+ | |- | ||
+ | | <code>USB_CDC_MCCM_TYPE = $0d;</code> | ||
+ | | Multi-Channel Management Functional Descriptor | ||
+ | |- | ||
+ | | <code>USB_CDC_CCM_TYPE = $0e;</code> | ||
+ | | CAPI Control Management Functional Descriptor | ||
+ | |- | ||
+ | | <code>USB_CDC_ETHERNET_TYPE = $0f;</code> | ||
+ | | Ethernet Networking Functional Descriptor | ||
+ | |- | ||
+ | | <code>USB_CDC_ATM_TYPE = $10;</code> | ||
+ | | ATM Networking Functional Descriptor | ||
+ | |- | ||
+ | | <code>USB_CDC_WHCM_TYPE = $11;</code> | ||
+ | | Wireless Handset Control Model Functional Descriptor | ||
+ | |- | ||
+ | | <code>USB_CDC_MDLM_TYPE = $12;</code> | ||
+ | | Mobile Direct Line Model Functional Descriptor | ||
+ | |- | ||
+ | | <code>USB_CDC_MDLM_DETAIL_TYPE = $13;</code> | ||
+ | | MDLM Detail Functional Descriptor | ||
+ | |- | ||
+ | | <code>USB_CDC_DMM_TYPE = $14;</code> | ||
+ | | Device Management Model Functional Descriptor | ||
+ | |- | ||
+ | | <code>USB_CDC_OBEX_TYPE = $15;</code> | ||
+ | | OBEX Functional Descriptor | ||
+ | |- | ||
+ | | <code>USB_CDC_TCM_TYPE = $18;</code> | ||
+ | | Telephone Control Model Functional Descriptor | ||
+ | |- | ||
+ | | <code>USB_CDC_NCM_TYPE = $1a;</code> | ||
+ | | NCM Functional Descriptor | ||
+ | |- | ||
+ | | <code>USB_CDC_MBIM_TYPE = $1b;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>USB_CDC_MBIM_EXTENDED_TYPE = $1c;</code> | ||
+ | | | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;"> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''CDC call management capabilities''' <code> USB_CDC_CALL_MGMT_CAP_* </code></div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | |colspan="2"|Call Management Capabilities (See: Section 5.2.3.2 of USB Class Definitions for Communications Devices 1.2) | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>USB_CDC_CALL_MGMT_CAP_CALL_MGMT = $01;</code> | ||
+ | | style="width: 50%;"| | ||
+ | |- | ||
+ | | <code>USB_CDC_CALL_MGMT_CAP_DATA_INTF = $02;</code> | ||
+ | | | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;"> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''CDC abstract control model capabilities''' <code> USB_CDC_ACM_* </code></div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | |colspan="2"|Abstract Control Model Capabilities (See: Section 5.2.3.3 of USB Class Definitions for Communications Devices 1.2) | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>USB_CDC_ACM_COMM_FEATURE = $01;</code> | ||
+ | | style="width: 50%;"| | ||
+ | |- | ||
+ | | <code>USB_CDC_ACM_CAP_LINE = $02;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>USB_CDC_ACM_CAP_BRK = $04;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>USB_CDC_ACM_CAP_NOTIFY = $08;</code> | ||
+ | | | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;"> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''CDC class specific control requests''' <code> USB_CDC_* </code></div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | |colspan="2"|Class specific Control Requests (See: Section 6.2 of USB Class Definitions for Communications Devices 1.2) | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>USB_CDC_SEND_ENCAPSULATED_COMMAND = $00;</code> | ||
+ | | style="width: 50%;"| | ||
+ | |- | ||
+ | | <code>USB_CDC_GET_ENCAPSULATED_RESPONSE = $01;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>USB_CDC_REQ_SET_LINE_CODING = $20;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>USB_CDC_REQ_GET_LINE_CODING = $21;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>USB_CDC_REQ_SET_CONTROL_LINE_STATE = $22;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>USB_CDC_REQ_SEND_BREAK = $23;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>USB_CDC_SET_ETHERNET_MULTICAST_FILTERS = $40;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>USB_CDC_SET_ETHERNET_PM_PATTERN_FILTER = $41;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>USB_CDC_GET_ETHERNET_PM_PATTERN_FILTER = $42;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>USB_CDC_SET_ETHERNET_PACKET_FILTER = $43;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>USB_CDC_GET_ETHERNET_STATISTIC = $44;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>USB_CDC_GET_NTB_PARAMETERS = $80;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>USB_CDC_GET_NET_ADDRESS = $81;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>USB_CDC_SET_NET_ADDRESS = $82;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>USB_CDC_GET_NTB_FORMAT = $83;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>USB_CDC_SET_NTB_FORMAT = $84;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>USB_CDC_GET_NTB_INPUT_SIZE = $85;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>USB_CDC_SET_NTB_INPUT_SIZE = $86;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>USB_CDC_GET_MAX_DATAGRAM_SIZE = $87;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>USB_CDC_SET_MAX_DATAGRAM_SIZE = $88;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>USB_CDC_GET_CRC_MODE = $89;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>USB_CDC_SET_CRC_MODE = $8a;</code> | ||
+ | | | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;"> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''CDC get/set line coding bCharFormat''' <code> USB_CDC_*_STOP_BITS </code></div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | |colspan="2"|Get/Set Line Coding bCharFormat (See: Section 6.3.11 of USB Communications Class Subclass Specification for PSTN Devices 1.2) | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>USB_CDC_1_STOP_BITS = 0;</code> | ||
+ | | style="width: 50%;"| | ||
+ | |- | ||
+ | | <code>USB_CDC_1_5_STOP_BITS = 1;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>USB_CDC_2_STOP_BITS = 2;</code> | ||
+ | | | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;"> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''CDC get/set line coding bParityType''' <code> USB_CDC_*_PARITY </code></div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | |colspan="2"|Get/Set Line Coding bParityType (See: Section 6.3.11 of USB Communications Class Subclass Specification for PSTN Devices 1.2) | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>USB_CDC_NO_PARITY = 0;</code> | ||
+ | | style="width: 50%;"| | ||
+ | |- | ||
+ | | <code>USB_CDC_ODD_PARITY = 1;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>USB_CDC_EVEN_PARITY = 2;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>USB_CDC_MARK_PARITY = 3;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>USB_CDC_SPACE_PARITY = 4;</code> | ||
+ | | | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;"> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''CDC set control line state wValue''' <code> USB_CDC_ACM_CTRL_* </code></div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | |colspan="2"|Set Control Line State wValue (See: Section 6.3.12 of USB Communications Class Subclass Specification for PSTN Devices 1.2) | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>USB_CDC_ACM_CTRL_DTR = $01;</code> | ||
+ | | Indicates to DCE if DTE is present or not. This signal corresponds to V.24 signal 108/2 and RS-232 signal DTR. | ||
+ | |- | ||
+ | | <code>USB_CDC_ACM_CTRL_RTS = $02;</code> | ||
+ | | Carrier control for half duplex modems. This signal corresponds to V.24 signal 105 and RS-232 signal RTS. | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;"> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''CDC set ethernet packet filter wValue''' <code> USB_CDC_PACKET_TYPE_* </code></div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | |colspan="2"|Set Ethernet Packet Filter wValue (See: Section 6.2.4 of USB Communications Class Subclass Specification for Ethernet Control Model Devices 1.2) | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>USB_CDC_PACKET_TYPE_PROMISCUOUS = (1 shl 0);</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>USB_CDC_PACKET_TYPE_ALL_MULTICAST = (1 shl 1);</code> | ||
+ | | No filter | ||
+ | |- | ||
+ | | <code>USB_CDC_PACKET_TYPE_DIRECTED = (1 shl 2);</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>USB_CDC_PACKET_TYPE_BROADCAST = (1 shl 3);</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>USB_CDC_PACKET_TYPE_MULTICAST = (1 shl 4);</code> | ||
+ | | Filtered | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;"> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''CDC class specific notifications''' <code> USB_CDC_NOTIFY_* </code></div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | |colspan="2"|Class Specific Notifications (See: Section 6.3 of USB Class Definitions for Communications Devices 1.2) | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>USB_CDC_NOTIFY_NETWORK_CONNECTION = $00;</code> | ||
+ | | style="width: 50%;"| | ||
+ | |- | ||
+ | | <code>USB_CDC_NOTIFY_RESPONSE_AVAILABLE = $01;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>USB_CDC_NOTIFY_SERIAL_STATE = $20;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>USB_CDC_NOTIFY_SPEED_CHANGE = $2a;</code> | ||
+ | | | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;"> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''CDC serial state notification data''' <code> USB_CDC_ACM_CTRL_* </code></div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | |colspan="2"|Serial State Notification Data (See: Section 6.5.4 of USB Communications Class Subclass Specification for PSTN Devices 1.2) | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>USB_CDC_ACM_CTRL_DCD = $01;</code> | ||
+ | | State of receiver carrier detection mechanism of device. This signal corresponds to V.24 signal 109 and RS-232 signal DCD. | ||
+ | |- | ||
+ | | <code>USB_CDC_ACM_CTRL_DSR = $02;</code> | ||
+ | | State of transmission carrier. This signal corresponds to V.24 signal 106 and RS-232 signal DSR. | ||
+ | |- | ||
+ | | <code>USB_CDC_ACM_CTRL_BRK = $04;</code> | ||
+ | | State of break detection mechanism of the device | ||
+ | |- | ||
+ | | <code>USB_CDC_ACM_CTRL_RI = $08;</code> | ||
+ | | State of ring signal detection of the device | ||
+ | |- | ||
+ | | <code>USB_CDC_ACM_CTRL_FRAMING = $10;</code> | ||
+ | | A framing error has occurred | ||
+ | |- | ||
+ | | <code>USB_CDC_ACM_CTRL_PARITY = $20;</code> | ||
+ | | A parity error has occurred | ||
+ | |- | ||
+ | | <code>USB_CDC_ACM_CTRL_OVERRUN = $40;</code> | ||
+ | | Received data has been discarded due to overrun in the device | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | |colspan="2"|<code>USB_CDC_ACM_CTRL_CONTROL_MASK = USB_CDC_ACM_CTRL_DCD or USB_CDC_ACM_CTRL_DSR or USB_CDC_ACM_CTRL_RI;</code> | ||
+ | |- | ||
+ | |colspan="2"|<code>USB_CDC_ACM_CTRL_TRANSIENT_MASK = USB_CDC_ACM_CTRL_BRK or USB_CDC_ACM_CTRL_FRAMING or USB_CDC_ACM_CTRL_PARITY or USB_CDC_ACM_CTRL_OVERRUN;</code> | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
=== Type definitions === | === Type definitions === | ||
---- | ---- | ||
− | '' | + | |
+ | '''CDC descriptor''' | ||
+ | |||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;"> | ||
+ | <code>PUSBCDCDescriptor = ^TUSBCDCDescriptor;</code> | ||
+ | |||
+ | <code>TUSBCDCDescriptor = packed record</code> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | | <code>bFunctionLength:Byte;</code> | ||
+ | | style="width: 50%;"| | ||
+ | |- | ||
+ | | <code>bDescriptorType:Byte;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>bDescriptorSubType:Byte;</code> | ||
+ | | | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | |||
+ | '''CDC header descriptor''' | ||
+ | |||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;"> | ||
+ | <code>PUSBCDCHeaderDescriptor = ^TUSBCDCHeaderDescriptor;</code> | ||
+ | |||
+ | <code>TUSBCDCHeaderDescriptor = packed record</code> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | |colspan="2"|See: Section 5.2.3.1 of USB Class Definitions for Communications Devices 1.2 | ||
+ | |- | ||
+ | | <code>bFunctionLength:Byte;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>bDescriptorType:Byte;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>bDescriptorSubType:Byte;</code> | ||
+ | | | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>bcdCDC:Word;</code> | ||
+ | | LE16 | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | |||
+ | '''CDC call management descriptor''' | ||
+ | |||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;"> | ||
+ | <code>PUSBCDCCallManagementDescriptor = ^TUSBCDCCallManagementDescriptor;</code> | ||
+ | |||
+ | <code>TUSBCDCCallManagementDescriptor = packed record</code> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | |colspan="2"|See: Section 5.2.3.2 of USB Class Definitions for Communications Devices 1.2 | ||
+ | |- | ||
+ | | <code>bFunctionLength:Byte;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>bDescriptorType:Byte;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>bDescriptorSubType:Byte;</code> | ||
+ | | | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>bmCapabilities:Byte;</code> | ||
+ | | See USB_CDC_CALL_MGMT_CAP_* | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | |||
+ | '''CDC abstract control management descriptor''' | ||
+ | |||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;"> | ||
+ | <code>PUSBCDCACMDescriptor = ^TUSBCDCACMDescriptor;</code> | ||
+ | |||
+ | <code>TUSBCDCACMDescriptor = packed record</code> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | |colspan="2"|See: Section 5.2.3.3 of USB Class Definitions for Communications Devices 1.2 | ||
+ | |- | ||
+ | | <code>bFunctionLength:Byte;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>bDescriptorType:Byte;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>bDescriptorSubType:Byte;</code> | ||
+ | | | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>bmCapabilities:Byte;</code> | ||
+ | | See USB_CDC_ACM_* | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | |||
+ | '''CDC union descriptor''' | ||
+ | |||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;"> | ||
+ | <code>PUSBCDCUnionDescriptor = ^TUSBCDCUnionDescriptor;</code> | ||
+ | |||
+ | <code>TUSBCDCUnionDescriptor = packed record</code> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | |colspan="2"|See: Section 5.2.3.8 of USB Class Definitions for Communications Devices 1.2 | ||
+ | |- | ||
+ | | <code>bFunctionLength:Byte;</code> | ||
+ | | style="width: 50%;"| | ||
+ | |- | ||
+ | | <code>bDescriptorType:Byte;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>bDescriptorSubType:Byte;</code> | ||
+ | | | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>bMasterInterface0:Byte;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>bSlaveInterface0:Byte;</code> | ||
+ | | | ||
+ | |- | ||
+ | |colspan="2"|''Additional Slave interfaces dependent on bFunctionLength'' | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | |||
+ | '''CDC country descriptor''' | ||
+ | |||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;"> | ||
+ | <code>PUSBCDCCountryDescriptor = ^TUSBCDCCountryDescriptor;</code> | ||
+ | |||
+ | <code>TUSBCDCCountryDescriptor = packed record</code> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | |colspan="2"|See: Section 5.2.3.9 of USB Class Definitions for Communications Devices 1.2 | ||
+ | |- | ||
+ | | <code>bFunctionLength:Byte;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>bDescriptorType:Byte;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>bDescriptorSubType:Byte;</code> | ||
+ | | | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>iCountryCodeRelDate:Byte;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>wCountyCode0:Word;</code> | ||
+ | | LE16 | ||
+ | |- | ||
+ | |colspan="2"|''Additional Country codes dependent on bFunctionLength'' | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | |||
+ | '''CDC network terminal descriptor''' | ||
+ | |||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;"> | ||
+ | <code>PUSBCDCNetworkTerminalDescriptor = ^TUSBCDCNetworkTerminalDescriptor;</code> | ||
+ | |||
+ | <code>TUSBCDCNetworkTerminalDescriptor = packed record</code> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | |colspan="2"|See: Section 5.2.3.11 of USB Class Definitions for Communications Devices 1.2 | ||
+ | |- | ||
+ | | <code>bFunctionLength:Byte;</code> | ||
+ | | style="width: 50%;"| | ||
+ | |- | ||
+ | | <code>bDescriptorType:Byte;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>bDescriptorSubType:Byte;</code> | ||
+ | | | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>bEntityId:Byte;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>iName:Byte;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>bChannelIndex:Byte;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>bPhysicalInterface:Byte;</code> | ||
+ | | | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | |||
+ | '''CDC ethernet descriptor''' | ||
+ | |||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;"> | ||
+ | <code>PUSBCDCEthernetDescriptor = ^TUSBCDCEthernetDescriptor;</code> | ||
+ | |||
+ | <code>TUSBCDCEthernetDescriptor = packed record</code> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | |colspan="2"|See: Section 5.4 of USB Communications Class Subclass Specification for Ethernet Control Model Devices 1.2 | ||
+ | |- | ||
+ | | <code>bFunctionLength:Byte;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>bDescriptorType:Byte;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>bDescriptorSubType:Byte;</code> | ||
+ | | | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>iMACAddress:Byte;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>bmEthernetStatistics:LongWord;</code> | ||
+ | | LE32 | ||
+ | |- | ||
+ | | <code>wMaxSegmentSize:Word;</code> | ||
+ | | LE16 | ||
+ | |- | ||
+ | | <code>wNumberMCFilters:Word;</code> | ||
+ | | LE16 | ||
+ | |- | ||
+ | | <code>bNumberPowerFilters:Byte;</code> | ||
+ | | | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | |||
+ | '''CDC telephone control model descriptor''' | ||
+ | |||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;"> | ||
+ | <code>PUSBCDCTCMDescriptor = ^TUSBCDCTCMDescriptor;</code> | ||
+ | |||
+ | <code>TUSBCDCTCMDescriptor = packed record</code> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | |colspan="2"|See: Section 6.3.2.3 of USB CDC Subclass Specification for Wireless Mobile Communications Devices 1.1 | ||
+ | |- | ||
+ | | <code>bFunctionLength:Byte;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>bDescriptorType:Byte;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>bDescriptorSubType:Byte;</code> | ||
+ | | | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>bcdVersion:Word;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>wMaxCommand:Word;</code> | ||
+ | | LE16 | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | |||
+ | '''CDC MDLM descriptor''' | ||
+ | |||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;"> | ||
+ | <code>PUSBCDCMDLMDescriptor = ^TUSBCDCMDLMDescriptor;</code> | ||
+ | |||
+ | <code>TUSBCDCMDLMDescriptor = packed record</code> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | |colspan="2"|See: Section 6.7.2.3 of USB CDC Subclass Specification for Wireless Mobile Communications Devices 1.1 | ||
+ | |- | ||
+ | | <code>bFunctionLength:Byte;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>bDescriptorType:Byte;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>bDescriptorSubType:Byte;</code> | ||
+ | | | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>bcdVersion:Word;</code> | ||
+ | | LE16 | ||
+ | |- | ||
+ | | <code>bGUID:array[0..15] of Byte;</code> | ||
+ | | | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | |||
+ | '''CDC MDLM detail descriptor''' | ||
+ | |||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;"> | ||
+ | <code>PUSBCDCMDLMDetailDescriptor = ^TUSBCDCMDLMDetailDescriptor;</code> | ||
+ | |||
+ | <code>TUSBCDCMDLMDetailDescriptor = packed record</code> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | |colspan="2"|See: Section 6.7.2.4 of USB CDC Subclass Specification for Wireless Mobile Communications Devices 1.1 | ||
+ | |- | ||
+ | | <code>bFunctionLength:Byte;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>bDescriptorType:Byte;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>bDescriptorSubType:Byte;</code> | ||
+ | | | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>bGuidDescriptorType:Byte;</code> | ||
+ | | Associated with TUSBCDCMDLMDescriptor.bGUID | ||
+ | |- | ||
+ | | <code>bDetailData:array[0..0] of Byte;</code> | ||
+ | | | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | |||
+ | '''CDC OBEX descriptor''' | ||
+ | |||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;"> | ||
+ | <code>PUSBCDCOBEXDescriptor = ^TUSBCDCOBEXDescriptor;</code> | ||
+ | |||
+ | <code>TUSBCDCOBEXDescriptor = packed record</code> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | |colspan="2"|See: Section 6.5.2.3 of USB CDC Subclass Specification for Wireless Mobile Communications Devices 1.1 | ||
+ | |- | ||
+ | | <code>bFunctionLength:Byte;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>bDescriptorType:Byte;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>bDescriptorSubType:Byte;</code> | ||
+ | | | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>bcdVersion:Word;</code> | ||
+ | | LE16 | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | |||
+ | '''CDC NCM descriptor''' | ||
+ | |||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;"> | ||
+ | <code>PUSBCDCNCMDescriptor = ^TUSBCDCNCMDescriptor;</code> | ||
+ | |||
+ | <code>TUSBCDCNCMDescriptor = packed record</code> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | | <code>bFunctionLength:Byte;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>bDescriptorType:Byte;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>bDescriptorSubType:Byte;</code> | ||
+ | | | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>bcdNcmVersion:Word;</code> | ||
+ | | LE16 | ||
+ | |- | ||
+ | | <code>bmNetworkCapabilities:Byte;</code> | ||
+ | | | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | |||
+ | '''CDC MBIM descriptor''' | ||
+ | |||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;"> | ||
+ | <code>PUSBCDCMBIMDescriptor = ^TUSBCDCMBIMDescriptor;</code> | ||
+ | |||
+ | <code>TUSBCDCMBIMDescriptor = packed record</code> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | | <code>bFunctionLength:Byte;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>bDescriptorType:Byte;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>bDescriptorSubType:Byte;</code> | ||
+ | | | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>bcdMBIMVersion:Word;</code> | ||
+ | | LE16 | ||
+ | |- | ||
+ | | <code>wMaxControlMessage:Word;</code> | ||
+ | | LE16 | ||
+ | |- | ||
+ | | <code>bNumberFilters:Byte;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>bMaxFilterSize:Byte;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>wMaxSegmentSize:Word;</code> | ||
+ | | LE16 | ||
+ | |- | ||
+ | | <code>bmNetworkCapabilities:Byte;</code> | ||
+ | | | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | |||
+ | '''CDC MBIM extended descriptor''' | ||
+ | |||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;"> | ||
+ | <code>PUSBCDCMBIMExtendedDescriptor = ^TUSBCDCMBIMExtendedDescriptor;</code> | ||
+ | |||
+ | <code>TUSBCDCMBIMExtendedDescriptor = packed record</code> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | |colspan="2"|''Device Properties'' | ||
+ | |- | ||
+ | | <code>bFunctionLength:Byte;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>bDescriptorType:Byte;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>bDescriptorSubType:Byte;</code> | ||
+ | | | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>bcdMBIMExtendedVersion:Word;</code> | ||
+ | | LE16 | ||
+ | |- | ||
+ | | <code>bMaxOutstandingCommandMessages:Byte;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>wMTU:Word;</code> | ||
+ | | LE16 | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | |||
+ | '''CDC line coding''' | ||
+ | |||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;"> | ||
+ | <code>PUSBCDCLineCoding = ^TUSBCDCLineCoding;</code> | ||
+ | |||
+ | <code>TUSBCDCLineCoding = packed record</code> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | |colspan="2"|See: Section 6.3.11 of USB Communications Class Subclass Specification for PSTN Devices 1.2 | ||
+ | |- | ||
+ | | <code>dwDTERate:LongWord;</code> | ||
+ | | LE32 | ||
+ | |- | ||
+ | | <code>bCharFormat:Byte;</code> | ||
+ | | See USB_CDC_1_STOP_BITS etc | ||
+ | |- | ||
+ | | <code>bParityType:Byte;</code> | ||
+ | | See USB_CDC_NO_PARITY etc | ||
+ | |- | ||
+ | | <code>bDataBits:Byte;</code> | ||
+ | | | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | |||
+ | '''CDC notification''' | ||
+ | |||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;"> | ||
+ | <code>PUSBCDCNotification = ^TUSBCDCNotification;</code> | ||
+ | |||
+ | <code>TUSBCDCNotification = packed record</code> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | |colspan="2"|See: Section 6.3 of USB Class Definitions for Communications Devices 1.2 | ||
+ | |- | ||
+ | | <code>bmRequestType:Byte;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>bNotificationType:Byte;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>wValue:Word;</code> | ||
+ | | LE16 | ||
+ | |- | ||
+ | | <code>wIndex:Word;</code> | ||
+ | | LE16 | ||
+ | |- | ||
+ | | <code>wLength:Word;</code> | ||
+ | | LE16 | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | |||
+ | '''CDC connection speed change''' | ||
+ | |||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;"> | ||
+ | <code>PUSBCDCSpeedChange = ^TUSBCDCSpeedChange;</code> | ||
+ | |||
+ | <code>TUSBCDCSpeedChange = packed record</code> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | |colspan="2"|See: Section 6.3.3 of USB Class Definitions for Communications Devices 1.2 | ||
+ | |- | ||
+ | | <code>DLBitRRate:LongWord;</code> | ||
+ | | LE32 Contains the downlink bit rate, in bits per second, as sent on the IN pipe. | ||
+ | |- | ||
+ | | <code>ULBitRate:LongWord;</code> | ||
+ | | LE32 Contains the uplink bit rate, in bits per second, as sent on the OUT pipe. | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | |||
+ | '''CDC headers''' | ||
+ | |||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;"> | ||
+ | <code>PUSBCDCHeaders = ^TUSBCDCHeaders;</code> | ||
+ | |||
+ | <code>TUSBCDCHeaders = record</code> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | | <code>UnionDescriptor:PUSBCDCUnionDescriptor;</code> | ||
+ | | Union Functional Descriptor | ||
+ | |- | ||
+ | | <code>HeaderDescriptor:PUSBCDCHeaderDescriptor;</code> | ||
+ | | Header Functional Descriptor | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>CallManagementDescriptor:PUSBCDCCallManagementDescriptor;</code> | ||
+ | | Call Management Descriptor | ||
+ | |- | ||
+ | | <code>ACMDescriptor:PUSBCDCACMDescriptor;</code> | ||
+ | | Abstract Control Management Descriptor | ||
+ | |- | ||
+ | | <code>CountryDescriptor:PUSBCDCCountryDescriptor;</code> | ||
+ | | Country Selection Functional Descriptor | ||
+ | |- | ||
+ | | <code>NetworkTerminalDescriptor:PUSBCDCNetworkTerminalDescriptor;</code> | ||
+ | | Network Channel Terminal Functional Descriptor | ||
+ | |- | ||
+ | | <code>EthernetDescriptor:PUSBCDCEthernetDescriptor;</code> | ||
+ | | Ethernet Networking Functional Descriptor | ||
+ | |- | ||
+ | | <code>TCMDescriptor:PUSBCDCTCMDescriptor;</code> | ||
+ | | Telephone Control Model Functional Descriptor | ||
+ | |- | ||
+ | | <code>MDLMDescriptor:PUSBCDCMDLMDescriptor;</code> | ||
+ | | MDLM Functional Descriptor | ||
+ | |- | ||
+ | | <code>MDLMDetailDescriptor:PUSBCDCMDLMDetailDescriptor;</code> | ||
+ | | MDLM Detail Functional Descriptor | ||
+ | |- | ||
+ | | <code>OBEXDescriptor:PUSBCDCOBEXDescriptor;</code> | ||
+ | | OBEX Control Model Functional Descriptor | ||
+ | |- | ||
+ | | <code>NCMDescriptor:PUSBCDCNCMDescriptor;</code> | ||
+ | | NCM Control Model Functional Descriptor | ||
+ | |- | ||
+ | | <code>MBIMDescriptor:PUSBCDCMBIMDescriptor;</code> | ||
+ | | MBIM Control Model Functional Descriptor | ||
+ | |- | ||
+ | | <code>MBIMExtendedDescriptor:PUSBCDCMBIMExtendedDescriptor;</code> | ||
+ | | MBIM Extended Functional Descriptor | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
=== Public variables === | === Public variables === | ||
Line 27: | Line 997: | ||
---- | ---- | ||
− | |||
+ | '''CDC helper functions''' | ||
+ | |||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function USBCDCParseHeaders(Device:PUSBDevice; Headers:PUSBCDCHeaders; Data:Pointer; Size:LongWord):LongWord;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Parse the extra data contained in a CDC interface and return pointers to the available headers</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! Device | ||
+ | | The USB device the headers belong to | ||
+ | |- | ||
+ | ! Headers | ||
+ | | A pointer to the headers structure to be returned | ||
+ | |- | ||
+ | ! Data | ||
+ | | A pointer to the extra data from a CDC interface | ||
+ | |- | ||
+ | ! Size | ||
+ | | The size of the buffer pointed to by Data | ||
+ | |- | ||
+ | ! Return | ||
+ | | USB_STATUS_SUCCESS if completed or another error code on failure | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
Return to [[Unit_Reference|Unit Reference]] | Return to [[Unit_Reference|Unit Reference]] |
Latest revision as of 06:19, 9 September 2021
Return to Unit Reference
Description
Ultibo USB CDC Interface unit
The USB Communications Device Class (CDC) standard defines the protocol for communicating with a range of network adapters, modems and ISDN devices. This unit provides common definitions and structures used in conjunction with CDC devices.
Constants
USB_CDC_*_TYPE
Class specific descriptor types (See: USB Class Definitions for Communications Devices 1.2) | |
USB_CDC_HEADER_TYPE = $00;
|
Header Functional Descriptor |
USB_CDC_CALL_MANAGEMENT_TYPE = $01;
|
Call Management Functional Descriptor |
USB_CDC_ACM_TYPE = $02;
|
Abstract Control Management Functional Descriptor |
USB_CDC_DLM_TYPE = $03;
|
Direct Line Management Functional Descriptor |
USB_CDC_RINGER_TYPE = $04;
|
Telephone Ringer Functional Descriptor |
USB_CDC_CALL_LINE_TYPE = $05;
|
Telephone Call and Line State Reporting Capabilities Functional Descriptor |
USB_CDC_UNION_TYPE = $06;
|
Union Functional Descriptor |
USB_CDC_COUNTRY_TYPE = $07;
|
Country Selection Functional Descriptor |
USB_CDC_TOM_TYPE = $08;
|
Telephone Operational Modes Functional Descriptor |
USB_CDC_USB_TERMINAL_TYPE = $09;
|
USB Terminal Functional Descriptor |
USB_CDC_NETWORK_TERMINAL_TYPE = $0a;
|
Network Channel Terminal Descriptor |
USB_CDC_PROTOCOL_TYPE = $0b;
|
Protocol Unit Functional Descriptor |
USB_CDC_EXTENSION_TYPE = $0c;
|
Extension Unit Functional Descriptor |
USB_CDC_MCCM_TYPE = $0d;
|
Multi-Channel Management Functional Descriptor |
USB_CDC_CCM_TYPE = $0e;
|
CAPI Control Management Functional Descriptor |
USB_CDC_ETHERNET_TYPE = $0f;
|
Ethernet Networking Functional Descriptor |
USB_CDC_ATM_TYPE = $10;
|
ATM Networking Functional Descriptor |
USB_CDC_WHCM_TYPE = $11;
|
Wireless Handset Control Model Functional Descriptor |
USB_CDC_MDLM_TYPE = $12;
|
Mobile Direct Line Model Functional Descriptor |
USB_CDC_MDLM_DETAIL_TYPE = $13;
|
MDLM Detail Functional Descriptor |
USB_CDC_DMM_TYPE = $14;
|
Device Management Model Functional Descriptor |
USB_CDC_OBEX_TYPE = $15;
|
OBEX Functional Descriptor |
USB_CDC_TCM_TYPE = $18;
|
Telephone Control Model Functional Descriptor |
USB_CDC_NCM_TYPE = $1a;
|
NCM Functional Descriptor |
USB_CDC_MBIM_TYPE = $1b;
|
|
USB_CDC_MBIM_EXTENDED_TYPE = $1c;
|
USB_CDC_CALL_MGMT_CAP_*
Call Management Capabilities (See: Section 5.2.3.2 of USB Class Definitions for Communications Devices 1.2) | |
USB_CDC_CALL_MGMT_CAP_CALL_MGMT = $01;
|
|
USB_CDC_CALL_MGMT_CAP_DATA_INTF = $02;
|
USB_CDC_ACM_*
Abstract Control Model Capabilities (See: Section 5.2.3.3 of USB Class Definitions for Communications Devices 1.2) | |
USB_CDC_ACM_COMM_FEATURE = $01;
|
|
USB_CDC_ACM_CAP_LINE = $02;
|
|
USB_CDC_ACM_CAP_BRK = $04;
|
|
USB_CDC_ACM_CAP_NOTIFY = $08;
|
USB_CDC_*
Class specific Control Requests (See: Section 6.2 of USB Class Definitions for Communications Devices 1.2) | |
USB_CDC_SEND_ENCAPSULATED_COMMAND = $00;
|
|
USB_CDC_GET_ENCAPSULATED_RESPONSE = $01;
|
|
USB_CDC_REQ_SET_LINE_CODING = $20;
|
|
USB_CDC_REQ_GET_LINE_CODING = $21;
|
|
USB_CDC_REQ_SET_CONTROL_LINE_STATE = $22;
|
|
USB_CDC_REQ_SEND_BREAK = $23;
|
|
USB_CDC_SET_ETHERNET_MULTICAST_FILTERS = $40;
|
|
USB_CDC_SET_ETHERNET_PM_PATTERN_FILTER = $41;
|
|
USB_CDC_GET_ETHERNET_PM_PATTERN_FILTER = $42;
|
|
USB_CDC_SET_ETHERNET_PACKET_FILTER = $43;
|
|
USB_CDC_GET_ETHERNET_STATISTIC = $44;
|
|
USB_CDC_GET_NTB_PARAMETERS = $80;
|
|
USB_CDC_GET_NET_ADDRESS = $81;
|
|
USB_CDC_SET_NET_ADDRESS = $82;
|
|
USB_CDC_GET_NTB_FORMAT = $83;
|
|
USB_CDC_SET_NTB_FORMAT = $84;
|
|
USB_CDC_GET_NTB_INPUT_SIZE = $85;
|
|
USB_CDC_SET_NTB_INPUT_SIZE = $86;
|
|
USB_CDC_GET_MAX_DATAGRAM_SIZE = $87;
|
|
USB_CDC_SET_MAX_DATAGRAM_SIZE = $88;
|
|
USB_CDC_GET_CRC_MODE = $89;
|
|
USB_CDC_SET_CRC_MODE = $8a;
|
USB_CDC_*_STOP_BITS
Get/Set Line Coding bCharFormat (See: Section 6.3.11 of USB Communications Class Subclass Specification for PSTN Devices 1.2) | |
USB_CDC_1_STOP_BITS = 0;
|
|
USB_CDC_1_5_STOP_BITS = 1;
|
|
USB_CDC_2_STOP_BITS = 2;
|
USB_CDC_*_PARITY
Get/Set Line Coding bParityType (See: Section 6.3.11 of USB Communications Class Subclass Specification for PSTN Devices 1.2) | |
USB_CDC_NO_PARITY = 0;
|
|
USB_CDC_ODD_PARITY = 1;
|
|
USB_CDC_EVEN_PARITY = 2;
|
|
USB_CDC_MARK_PARITY = 3;
|
|
USB_CDC_SPACE_PARITY = 4;
|
USB_CDC_ACM_CTRL_*
Set Control Line State wValue (See: Section 6.3.12 of USB Communications Class Subclass Specification for PSTN Devices 1.2) | |
USB_CDC_ACM_CTRL_DTR = $01;
|
Indicates to DCE if DTE is present or not. This signal corresponds to V.24 signal 108/2 and RS-232 signal DTR. |
USB_CDC_ACM_CTRL_RTS = $02;
|
Carrier control for half duplex modems. This signal corresponds to V.24 signal 105 and RS-232 signal RTS. |
USB_CDC_PACKET_TYPE_*
Set Ethernet Packet Filter wValue (See: Section 6.2.4 of USB Communications Class Subclass Specification for Ethernet Control Model Devices 1.2) | |
USB_CDC_PACKET_TYPE_PROMISCUOUS = (1 shl 0);
|
|
USB_CDC_PACKET_TYPE_ALL_MULTICAST = (1 shl 1);
|
No filter |
USB_CDC_PACKET_TYPE_DIRECTED = (1 shl 2);
|
|
USB_CDC_PACKET_TYPE_BROADCAST = (1 shl 3);
|
|
USB_CDC_PACKET_TYPE_MULTICAST = (1 shl 4);
|
Filtered |
USB_CDC_NOTIFY_*
Class Specific Notifications (See: Section 6.3 of USB Class Definitions for Communications Devices 1.2) | |
USB_CDC_NOTIFY_NETWORK_CONNECTION = $00;
|
|
USB_CDC_NOTIFY_RESPONSE_AVAILABLE = $01;
|
|
USB_CDC_NOTIFY_SERIAL_STATE = $20;
|
|
USB_CDC_NOTIFY_SPEED_CHANGE = $2a;
|
USB_CDC_ACM_CTRL_*
Serial State Notification Data (See: Section 6.5.4 of USB Communications Class Subclass Specification for PSTN Devices 1.2) | |
USB_CDC_ACM_CTRL_DCD = $01;
|
State of receiver carrier detection mechanism of device. This signal corresponds to V.24 signal 109 and RS-232 signal DCD. |
USB_CDC_ACM_CTRL_DSR = $02;
|
State of transmission carrier. This signal corresponds to V.24 signal 106 and RS-232 signal DSR. |
USB_CDC_ACM_CTRL_BRK = $04;
|
State of break detection mechanism of the device |
USB_CDC_ACM_CTRL_RI = $08;
|
State of ring signal detection of the device |
USB_CDC_ACM_CTRL_FRAMING = $10;
|
A framing error has occurred |
USB_CDC_ACM_CTRL_PARITY = $20;
|
A parity error has occurred |
USB_CDC_ACM_CTRL_OVERRUN = $40;
|
Received data has been discarded due to overrun in the device |
USB_CDC_ACM_CTRL_CONTROL_MASK = USB_CDC_ACM_CTRL_DCD or USB_CDC_ACM_CTRL_DSR or USB_CDC_ACM_CTRL_RI;
| |
USB_CDC_ACM_CTRL_TRANSIENT_MASK = USB_CDC_ACM_CTRL_BRK or USB_CDC_ACM_CTRL_FRAMING or USB_CDC_ACM_CTRL_PARITY or USB_CDC_ACM_CTRL_OVERRUN;
|
Type definitions
CDC descriptor
PUSBCDCDescriptor = ^TUSBCDCDescriptor;
TUSBCDCDescriptor = packed record
bFunctionLength:Byte;
|
|
bDescriptorType:Byte;
|
|
bDescriptorSubType:Byte;
|
CDC header descriptor
PUSBCDCHeaderDescriptor = ^TUSBCDCHeaderDescriptor;
TUSBCDCHeaderDescriptor = packed record
See: Section 5.2.3.1 of USB Class Definitions for Communications Devices 1.2 | |
bFunctionLength:Byte;
|
|
bDescriptorType:Byte;
|
|
bDescriptorSubType:Byte;
|
|
bcdCDC:Word;
|
LE16 |
CDC call management descriptor
PUSBCDCCallManagementDescriptor = ^TUSBCDCCallManagementDescriptor;
TUSBCDCCallManagementDescriptor = packed record
See: Section 5.2.3.2 of USB Class Definitions for Communications Devices 1.2 | |
bFunctionLength:Byte;
|
|
bDescriptorType:Byte;
|
|
bDescriptorSubType:Byte;
|
|
bmCapabilities:Byte;
|
See USB_CDC_CALL_MGMT_CAP_* |
CDC abstract control management descriptor
PUSBCDCACMDescriptor = ^TUSBCDCACMDescriptor;
TUSBCDCACMDescriptor = packed record
See: Section 5.2.3.3 of USB Class Definitions for Communications Devices 1.2 | |
bFunctionLength:Byte;
|
|
bDescriptorType:Byte;
|
|
bDescriptorSubType:Byte;
|
|
bmCapabilities:Byte;
|
See USB_CDC_ACM_* |
CDC union descriptor
PUSBCDCUnionDescriptor = ^TUSBCDCUnionDescriptor;
TUSBCDCUnionDescriptor = packed record
See: Section 5.2.3.8 of USB Class Definitions for Communications Devices 1.2 | |
bFunctionLength:Byte;
|
|
bDescriptorType:Byte;
|
|
bDescriptorSubType:Byte;
|
|
bMasterInterface0:Byte;
|
|
bSlaveInterface0:Byte;
|
|
Additional Slave interfaces dependent on bFunctionLength |
CDC country descriptor
PUSBCDCCountryDescriptor = ^TUSBCDCCountryDescriptor;
TUSBCDCCountryDescriptor = packed record
See: Section 5.2.3.9 of USB Class Definitions for Communications Devices 1.2 | |
bFunctionLength:Byte;
|
|
bDescriptorType:Byte;
|
|
bDescriptorSubType:Byte;
|
|
iCountryCodeRelDate:Byte;
|
|
wCountyCode0:Word;
|
LE16 |
Additional Country codes dependent on bFunctionLength |
CDC network terminal descriptor
PUSBCDCNetworkTerminalDescriptor = ^TUSBCDCNetworkTerminalDescriptor;
TUSBCDCNetworkTerminalDescriptor = packed record
See: Section 5.2.3.11 of USB Class Definitions for Communications Devices 1.2 | |
bFunctionLength:Byte;
|
|
bDescriptorType:Byte;
|
|
bDescriptorSubType:Byte;
|
|
bEntityId:Byte;
|
|
iName:Byte;
|
|
bChannelIndex:Byte;
|
|
bPhysicalInterface:Byte;
|
CDC ethernet descriptor
PUSBCDCEthernetDescriptor = ^TUSBCDCEthernetDescriptor;
TUSBCDCEthernetDescriptor = packed record
See: Section 5.4 of USB Communications Class Subclass Specification for Ethernet Control Model Devices 1.2 | |
bFunctionLength:Byte;
|
|
bDescriptorType:Byte;
|
|
bDescriptorSubType:Byte;
|
|
iMACAddress:Byte;
|
|
bmEthernetStatistics:LongWord;
|
LE32 |
wMaxSegmentSize:Word;
|
LE16 |
wNumberMCFilters:Word;
|
LE16 |
bNumberPowerFilters:Byte;
|
CDC telephone control model descriptor
PUSBCDCTCMDescriptor = ^TUSBCDCTCMDescriptor;
TUSBCDCTCMDescriptor = packed record
See: Section 6.3.2.3 of USB CDC Subclass Specification for Wireless Mobile Communications Devices 1.1 | |
bFunctionLength:Byte;
|
|
bDescriptorType:Byte;
|
|
bDescriptorSubType:Byte;
|
|
bcdVersion:Word;
|
|
wMaxCommand:Word;
|
LE16 |
CDC MDLM descriptor
PUSBCDCMDLMDescriptor = ^TUSBCDCMDLMDescriptor;
TUSBCDCMDLMDescriptor = packed record
See: Section 6.7.2.3 of USB CDC Subclass Specification for Wireless Mobile Communications Devices 1.1 | |
bFunctionLength:Byte;
|
|
bDescriptorType:Byte;
|
|
bDescriptorSubType:Byte;
|
|
bcdVersion:Word;
|
LE16 |
bGUID:array[0..15] of Byte;
|
CDC MDLM detail descriptor
PUSBCDCMDLMDetailDescriptor = ^TUSBCDCMDLMDetailDescriptor;
TUSBCDCMDLMDetailDescriptor = packed record
See: Section 6.7.2.4 of USB CDC Subclass Specification for Wireless Mobile Communications Devices 1.1 | |
bFunctionLength:Byte;
|
|
bDescriptorType:Byte;
|
|
bDescriptorSubType:Byte;
|
|
bGuidDescriptorType:Byte;
|
Associated with TUSBCDCMDLMDescriptor.bGUID |
bDetailData:array[0..0] of Byte;
|
CDC OBEX descriptor
PUSBCDCOBEXDescriptor = ^TUSBCDCOBEXDescriptor;
TUSBCDCOBEXDescriptor = packed record
See: Section 6.5.2.3 of USB CDC Subclass Specification for Wireless Mobile Communications Devices 1.1 | |
bFunctionLength:Byte;
|
|
bDescriptorType:Byte;
|
|
bDescriptorSubType:Byte;
|
|
bcdVersion:Word;
|
LE16 |
CDC NCM descriptor
PUSBCDCNCMDescriptor = ^TUSBCDCNCMDescriptor;
TUSBCDCNCMDescriptor = packed record
bFunctionLength:Byte;
|
|
bDescriptorType:Byte;
|
|
bDescriptorSubType:Byte;
|
|
bcdNcmVersion:Word;
|
LE16 |
bmNetworkCapabilities:Byte;
|
CDC MBIM descriptor
PUSBCDCMBIMDescriptor = ^TUSBCDCMBIMDescriptor;
TUSBCDCMBIMDescriptor = packed record
bFunctionLength:Byte;
|
|
bDescriptorType:Byte;
|
|
bDescriptorSubType:Byte;
|
|
bcdMBIMVersion:Word;
|
LE16 |
wMaxControlMessage:Word;
|
LE16 |
bNumberFilters:Byte;
|
|
bMaxFilterSize:Byte;
|
|
wMaxSegmentSize:Word;
|
LE16 |
bmNetworkCapabilities:Byte;
|
CDC MBIM extended descriptor
PUSBCDCMBIMExtendedDescriptor = ^TUSBCDCMBIMExtendedDescriptor;
TUSBCDCMBIMExtendedDescriptor = packed record
Device Properties | |
bFunctionLength:Byte;
|
|
bDescriptorType:Byte;
|
|
bDescriptorSubType:Byte;
|
|
bcdMBIMExtendedVersion:Word;
|
LE16 |
bMaxOutstandingCommandMessages:Byte;
|
|
wMTU:Word;
|
LE16 |
CDC line coding
PUSBCDCLineCoding = ^TUSBCDCLineCoding;
TUSBCDCLineCoding = packed record
See: Section 6.3.11 of USB Communications Class Subclass Specification for PSTN Devices 1.2 | |
dwDTERate:LongWord;
|
LE32 |
bCharFormat:Byte;
|
See USB_CDC_1_STOP_BITS etc |
bParityType:Byte;
|
See USB_CDC_NO_PARITY etc |
bDataBits:Byte;
|
CDC notification
PUSBCDCNotification = ^TUSBCDCNotification;
TUSBCDCNotification = packed record
See: Section 6.3 of USB Class Definitions for Communications Devices 1.2 | |
bmRequestType:Byte;
|
|
bNotificationType:Byte;
|
|
wValue:Word;
|
LE16 |
wIndex:Word;
|
LE16 |
wLength:Word;
|
LE16 |
CDC connection speed change
PUSBCDCSpeedChange = ^TUSBCDCSpeedChange;
TUSBCDCSpeedChange = packed record
See: Section 6.3.3 of USB Class Definitions for Communications Devices 1.2 | |
DLBitRRate:LongWord;
|
LE32 Contains the downlink bit rate, in bits per second, as sent on the IN pipe. |
ULBitRate:LongWord;
|
LE32 Contains the uplink bit rate, in bits per second, as sent on the OUT pipe. |
CDC headers
PUSBCDCHeaders = ^TUSBCDCHeaders;
TUSBCDCHeaders = record
UnionDescriptor:PUSBCDCUnionDescriptor;
|
Union Functional Descriptor |
HeaderDescriptor:PUSBCDCHeaderDescriptor;
|
Header Functional Descriptor |
CallManagementDescriptor:PUSBCDCCallManagementDescriptor;
|
Call Management Descriptor |
ACMDescriptor:PUSBCDCACMDescriptor;
|
Abstract Control Management Descriptor |
CountryDescriptor:PUSBCDCCountryDescriptor;
|
Country Selection Functional Descriptor |
NetworkTerminalDescriptor:PUSBCDCNetworkTerminalDescriptor;
|
Network Channel Terminal Functional Descriptor |
EthernetDescriptor:PUSBCDCEthernetDescriptor;
|
Ethernet Networking Functional Descriptor |
TCMDescriptor:PUSBCDCTCMDescriptor;
|
Telephone Control Model Functional Descriptor |
MDLMDescriptor:PUSBCDCMDLMDescriptor;
|
MDLM Functional Descriptor |
MDLMDetailDescriptor:PUSBCDCMDLMDetailDescriptor;
|
MDLM Detail Functional Descriptor |
OBEXDescriptor:PUSBCDCOBEXDescriptor;
|
OBEX Control Model Functional Descriptor |
NCMDescriptor:PUSBCDCNCMDescriptor;
|
NCM Control Model Functional Descriptor |
MBIMDescriptor:PUSBCDCMBIMDescriptor;
|
MBIM Control Model Functional Descriptor |
MBIMExtendedDescriptor:PUSBCDCMBIMExtendedDescriptor;
|
MBIM Extended Functional Descriptor |
Public variables
None defined
Function declarations
CDC helper functions
function USBCDCParseHeaders(Device:PUSBDevice; Headers:PUSBCDCHeaders; Data:Pointer; Size:LongWord):LongWord;
Device | The USB device the headers belong to |
---|---|
Headers | A pointer to the headers structure to be returned |
Data | A pointer to the extra data from a CDC interface |
Size | The size of the buffer pointed to by Data |
Return | USB_STATUS_SUCCESS if completed or another error code on failure |
Return to Unit Reference