Difference between revisions of "Unit USBCDC"

From Ultibo.org
Jump to: navigation, search
Line 383: Line 383:
 
----
 
----
  
''To be documented''
+
 
 +
'''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%;"|&nbsp;
 +
|-
 +
| <code>bDescriptorType:Byte;</code>
 +
| &nbsp;
 +
|-
 +
| <code>bDescriptorSubType:Byte;</code>
 +
| &nbsp;
 +
|-
 +
|}
 +
</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>
 +
| &nbsp;
 +
|-
 +
| <code>bDescriptorType:Byte;</code>
 +
| &nbsp;
 +
|-
 +
| <code>bDescriptorSubType:Byte;</code>
 +
| &nbsp;
 +
|-
 +
|colspan="2"|&nbsp;
 +
|-
 +
| <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>
 +
| &nbsp;
 +
|-
 +
| <code>bDescriptorType:Byte;</code>
 +
| &nbsp;
 +
|-
 +
| <code>bDescriptorSubType:Byte;</code>
 +
| &nbsp;
 +
|-
 +
|colspan="2"|&nbsp;
 +
|-
 +
| <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>
 +
| &nbsp;
 +
|-
 +
| <code>bDescriptorType:Byte;</code>
 +
| &nbsp;
 +
|-
 +
| <code>bDescriptorSubType:Byte;</code>
 +
| &nbsp;
 +
|-
 +
|colspan="2"|&nbsp;
 +
|-
 +
| <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%;"|&nbsp;
 +
|-
 +
| <code>bDescriptorType:Byte;</code>
 +
| &nbsp;
 +
|-
 +
| <code>bDescriptorSubType:Byte;</code>
 +
| &nbsp;
 +
|-
 +
|colspan="2"|&nbsp;
 +
|-
 +
| <code>bMasterInterface0:Byte;</code>
 +
| &nbsp;
 +
|-
 +
| <code>bSlaveInterface0:Byte;</code>
 +
| &nbsp;
 +
|-
 +
|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>
 +
| &nbsp;
 +
|-
 +
| <code>bDescriptorType:Byte;</code>
 +
| &nbsp;
 +
|-
 +
| <code>bDescriptorSubType:Byte;</code>
 +
| &nbsp;
 +
|-
 +
|colspan="2"|&nbsp;
 +
|-
 +
| <code>iCountryCodeRelDate:Byte;</code>
 +
| &nbsp;
 +
|-
 +
| <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%;"|&nbsp;
 +
|-
 +
| <code>bDescriptorType:Byte;</code>
 +
| &nbsp;
 +
|-
 +
| <code>bDescriptorSubType:Byte;</code>
 +
| &nbsp;
 +
|-
 +
|colspan="2"|&nbsp;
 +
|-
 +
| <code>bEntityId:Byte;</code>
 +
| &nbsp;
 +
|-
 +
| <code>iName:Byte;</code>
 +
| &nbsp;
 +
|-
 +
| <code>bChannelIndex:Byte;</code>
 +
| &nbsp;
 +
|-
 +
| <code>bPhysicalInterface:Byte;</code>
 +
| &nbsp;
 +
|-
 +
|}
 +
</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>
 +
| &nbsp;
 +
|-
 +
| <code>bDescriptorType:Byte;</code>
 +
| &nbsp;
 +
|-
 +
| <code>bDescriptorSubType:Byte;</code>
 +
| &nbsp;
 +
|-
 +
|colspan="2"|&nbsp;
 +
|-
 +
| <code>iMACAddress:Byte;</code>
 +
| &nbsp;
 +
|-
 +
| <code>bmEthernetStatistics:LongWord;</code>
 +
| LE32
 +
|-
 +
| <code>wMaxSegmentSize:Word;</code>
 +
| LE16
 +
|-
 +
| <code>wNumberMCFilters:Word;</code>
 +
| LE16
 +
|-
 +
| <code>bNumberPowerFilters:Byte;</code>
 +
| &nbsp;
 +
|-
 +
|}
 +
</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>
 +
| &nbsp;
 +
|-
 +
| <code>bDescriptorType:Byte;</code>
 +
| &nbsp;
 +
|-
 +
| <code>bDescriptorSubType:Byte;</code>
 +
| &nbsp;
 +
|-
 +
|colspan="2"|&nbsp;
 +
|-
 +
| <code>bcdVersion:Word;</code>
 +
| &nbsp;
 +
|-
 +
| <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>
 +
| &nbsp;
 +
|-
 +
| <code>bDescriptorType:Byte;</code>
 +
| &nbsp;
 +
|-
 +
| <code>bDescriptorSubType:Byte;</code>
 +
| &nbsp;
 +
|-
 +
|colspan="2"|&nbsp;
 +
|-
 +
| <code>bcdVersion:Word;</code>
 +
| LE16
 +
|-
 +
| <code>bGUID:array[0..15] of Byte;</code>
 +
| &nbsp;
 +
|-
 +
|}
 +
</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>
 +
| &nbsp;
 +
|-
 +
| <code>bDescriptorType:Byte;</code>
 +
| &nbsp;
 +
|-
 +
| <code>bDescriptorSubType:Byte;</code>
 +
| &nbsp;
 +
|-
 +
|colspan="2"|&nbsp;
 +
|-
 +
| <code>bGuidDescriptorType:Byte;</code>
 +
| Associated with TUSBCDCMDLMDescriptor.bGUID
 +
|-
 +
| <code>bDetailData:array[0..0] of Byte;</code>
 +
| &nbsp;
 +
|-
 +
|}
 +
</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>
 +
| &nbsp;
 +
|-
 +
| <code>bDescriptorType:Byte;</code>
 +
| &nbsp;
 +
|-
 +
| <code>bDescriptorSubType:Byte;</code>
 +
| &nbsp;
 +
|-
 +
|colspan="2"|&nbsp;
 +
|-
 +
| <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>
 +
| &nbsp;
 +
|-
 +
| <code>bDescriptorType:Byte;</code>
 +
| &nbsp;
 +
|-
 +
| <code>bDescriptorSubType:Byte;</code>
 +
| &nbsp;
 +
|-
 +
|colspan="2"|&nbsp;
 +
|-
 +
| <code>bcdNcmVersion:Word;</code>
 +
| LE16
 +
|-
 +
| <code>bmNetworkCapabilities:Byte;</code>
 +
| &nbsp;
 +
|-
 +
|}
 +
</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>
 +
| &nbsp;
 +
|-
 +
| <code>bDescriptorType:Byte;</code>
 +
| &nbsp;
 +
|-
 +
| <code>bDescriptorSubType:Byte;</code>
 +
| &nbsp;
 +
|-
 +
|colspan="2"|&nbsp;
 +
|-
 +
| <code>bcdMBIMVersion:Word;</code>
 +
| LE16
 +
|-
 +
| <code>wMaxControlMessage:Word;</code>
 +
| LE16
 +
|-
 +
| <code>bNumberFilters:Byte;</code>
 +
| &nbsp;
 +
|-
 +
| <code>bMaxFilterSize:Byte;</code>
 +
| &nbsp;
 +
|-
 +
| <code>wMaxSegmentSize:Word;</code>
 +
| LE16
 +
|-
 +
| <code>bmNetworkCapabilities:Byte;</code>
 +
| &nbsp;
 +
|-
 +
|}
 +
</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>
 +
| &nbsp;
 +
|-
 +
| <code>bDescriptorType:Byte;</code>
 +
| &nbsp;
 +
|-
 +
| <code>bDescriptorSubType:Byte;</code>
 +
| &nbsp;
 +
|-
 +
|colspan="2"|&nbsp;
 +
|-
 +
| <code>bcdMBIMExtendedVersion:Word;</code>
 +
| LE16
 +
|-
 +
| <code>bMaxOutstandingCommandMessages:Byte;</code>
 +
| &nbsp;
 +
|-
 +
| <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>
 +
| &nbsp;
 +
|-
 +
|}
 +
</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>
 +
| &nbsp;
 +
|-
 +
| <code>bNotificationType:Byte;</code>
 +
| &nbsp;
 +
|-
 +
| <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"|&nbsp;
 +
|-
 +
| <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 ===

Revision as of 06:18, 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



CDC specific 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;  


CDC call management capabilities 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;  


CDC abstract control model capabilities 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;  


CDC class specific control requests 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;  


CDC get/set line coding bCharFormat 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;  


CDC get/set line coding bParityType 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;  


CDC set control line state wValue 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.


CDC set ethernet packet filter wValue 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


CDC class specific notifications 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;  


CDC serial state notification data 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


To be documented


Return to Unit Reference