Difference between revisions of "Unit USBCDCACM"

From Ultibo.org
Jump to: navigation, search
 
(14 intermediate revisions by the same user not shown)
Line 4: Line 4:
 
=== Description ===
 
=== Description ===
 
----
 
----
 +
 +
'''USB CDC ACM Driver unit'''
  
 
The Abstract Control Model (ACM) is part of the USB Communications Device Class (CDC) standard which allows modem like devices to be supported by USB with a standardized protocol for data transfer and modem control.
 
The Abstract Control Model (ACM) is part of the USB Communications Device Class (CDC) standard which allows modem like devices to be supported by USB with a standardized protocol for data transfer and modem control.
 
   
 
   
A CDC ACM device is defined by information in the interface descriptors and is not specific to any product and vendor ID. There are numerous devices that support the CDC ACM protocol and some of the most important from Ultibo are the Arduino Mega 2560 R3 and the Arduino Due.
+
A CDC ACM device is defined by information in the interface descriptors and is not specific to any product and vendor Id. There are numerous devices that support the CDC ACM protocol and some of the most important from Ultibo are the Arduino Mega 2560 R3 and the Arduino Due.
 
   
 
   
 
This driver presents any device recognized as a CDC ACM as a generic serial interface device that can be accessed using the API in the Serial unit. It should not be necessary to directly call any of the functions in this unit from application code.
 
This driver presents any device recognized as a CDC ACM as a generic serial interface device that can be accessed using the API in the Serial unit. It should not be necessary to directly call any of the functions in this unit from application code.
Line 14: Line 16:
 
----
 
----
  
''To be documented''
+
 
 +
<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 ACM specific constants''' <code> CDCACM_* </code></div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
| <code>CDCACM_DRIVER_NAME = 'USB CDC ACM Serial Driver';</code>
 +
| Name of CDC ACM driver
 +
|-
 +
|colspan="2"|&nbsp;
 +
|-
 +
| <code>CDCACM_SERIAL_DESCRIPTION = 'USB CDC ACM Serial';</code>
 +
| Description of CDC ACM device
 +
|-
 +
|colspan="2"|&nbsp;
 +
|-
 +
| <code>CDCACM_MIN_BAUD = 0;</code>
 +
| Minimum is device specific
 +
|-
 +
| <code>CDCACM_MAX_BAUD = 0;</code>
 +
| Maximum is device specific
 +
|-
 +
|colspan="2"|&nbsp;
 +
|-
 +
| <code>CDCACM_MIN_DATABITS = SERIAL_DATA_5BIT;</code>
 +
| &nbsp;
 +
|-
 +
| <code>CDCACM_MAX_DATABITS = SERIAL_DATA_8BIT;</code>
 +
| &nbsp;
 +
|-
 +
|colspan="2"|&nbsp;
 +
|-
 +
| <code>CDCACM_MIN_STOPBITS = SERIAL_STOP_1BIT;</code>
 +
| &nbsp;
 +
|-
 +
| <code>CDCACM_MAX_STOPBITS = SERIAL_STOP_1BIT5;</code>
 +
| &nbsp;
 +
|-
 +
|colspan="2"|&nbsp;
 +
|-
 +
| <code>CDCACM_MAX_PARITY = SERIAL_PARITY_SPACE;</code>
 +
| &nbsp;
 +
|-
 +
|colspan="2"|&nbsp;
 +
|-
 +
| <code>CDCACM_MAX_FLOW = SERIAL_FLOW_DSR_DTR;</code>
 +
| &nbsp;
 +
|-
 +
|}
 +
</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 ACM USB request''' <code> CDCACM_USB_REQUEST_* </code></div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
| <code>CDCACM_USB_REQUEST_TYPE = (USB_BMREQUESTTYPE_TYPE_CLASS or USB_BMREQUESTTYPE_RECIPIENT_INTERFACE);</code>
 +
| style="width: 50%;"|&nbsp;
 +
|-
 +
|}
 +
</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 ACM device quirk''' <code> CDCACM_QUIRK_* </code></div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
| <code>CDCACM_QUIRK_NONE = $00000000;</code>
 +
| style="width: 50%;"|&nbsp;
 +
|-
 +
| <code>CDCACM_QUIRK_NO_UNION_NORMAL = $00000001;</code>
 +
| &nbsp;
 +
|-
 +
| <code>CDCACM_QUIRK_SINGLE_RX_URB = $00000002;</code>
 +
| &nbsp;
 +
|-
 +
| <code>CDCACM_QUIRK_NO_CAP_LINE = $00000004;</code>
 +
| &nbsp;
 +
|-
 +
| <code>CDCACM_QUIRK_NO_DATA_INTERFACE = $00000008;</code>
 +
| &nbsp;
 +
|-
 +
| <code>CDCACM_QUIRK_IGNORE_DEVICE = $00000010;</code>
 +
| &nbsp;
 +
|-
 +
| <code>CDCACM_QUIRK_CONTROL_LINE_STATE = $00000020;</code>
 +
| &nbsp;
 +
|-
 +
| <code>CDCACM_QUIRK_CLEAR_HALT_CONDITIONS = $00000040;</code>
 +
| &nbsp;
 +
|-
 +
| <code>CDCACM_QUIRK_SEND_ZERO_PACKET = $00000080;</code>
 +
| &nbsp;
 +
|-
 +
| <code>CDCACM_QUIRK_DISABLE_ECHO = $00000100;</code>
 +
| &nbsp;
 +
|-
 +
|}
 +
</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 ACM device Id''' <code> CDCACM_DEVICE_ID_* </code></div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
| <code>CDCACM_DEVICE_ID_COUNT = 49;</code>
 +
| Number of supported Device IDs
 +
|-
 +
|colspan="2"|&nbsp;
 +
|-
 +
|colspan="2"|<code>CDCACM_DEVICE_ID:array[0..CDCACM_DEVICE_ID_COUNT - 1] of TCDCACMDeviceId = (</code>
 +
|-
 +
| <code>(idVendor:$076d;idProduct:$0006;Quirks:CDCACM_QUIRK_NO_UNION_NORMAL),</code>
 +
| Denso Cradle CU-321 (has no union descriptor)
 +
|-
 +
| <code>(idVendor:$17ef;idProduct:$7000;Quirks:CDCACM_QUIRK_NO_UNION_NORMAL),</code>
 +
| Lenovo USB modem (has no union descriptor)
 +
|-
 +
| <code>(idVendor:$0870;idProduct:$0001;Quirks:CDCACM_QUIRK_NO_UNION_NORMAL),</code>
 +
| Metricom GS Modem (has no union descriptor)
 +
|-
 +
| <code>(idVendor:$0e8d;idProduct:$0003;Quirks:CDCACM_QUIRK_NO_UNION_NORMAL),</code>
 +
| FIREFLY, MediaTek Inc (has no union descriptor)
 +
|-
 +
| <code>(idVendor:$0e8d;idProduct:$2000;Quirks:CDCACM_QUIRK_DISABLE_ECHO),</code>
 +
| MediaTek Inc Preloader
 +
|-
 +
| <code>(idVendor:$0e8d;idProduct:$3329;Quirks:CDCACM_QUIRK_NO_UNION_NORMAL),</code>
 +
| MediaTek Inc GPS (has no union descriptor)
 +
|-
 +
| <code>(idVendor:$0482;idProduct:$0203;Quirks:CDCACM_QUIRK_NO_UNION_NORMAL),</code>
 +
| KYOCERA AH-K3001V (has no union descriptor)
 +
|-
 +
| <code>(idVendor:$079b;idProduct:$000f;Quirks:CDCACM_QUIRK_NO_UNION_NORMAL),</code>
 +
| BT On-Air USB MODEM (has no union descriptor)
 +
|-
 +
| <code>(idVendor:$0ace;idProduct:$1602;Quirks:CDCACM_QUIRK_SINGLE_RX_URB),</code>
 +
| ZyDAS 56K USB MODEM
 +
|-
 +
| <code>(idVendor:$0ace;idProduct:$1608;Quirks:CDCACM_QUIRK_SINGLE_RX_URB),</code>
 +
| ZyDAS 56K USB MODEM (firmware bug)
 +
|-
 +
| <code>(idVendor:$0ace;idProduct:$1611;Quirks:CDCACM_QUIRK_SINGLE_RX_URB),</code>
 +
| ZyDAS 56K USB MODEM - new version (firmware bug)
 +
|-
 +
| <code>(idVendor:$11ca;idProduct:$0201;Quirks:CDCACM_QUIRK_SINGLE_RX_URB),</code>
 +
| VeriFone Mx870 Gadget Serial
 +
|-
 +
| <code>(idVendor:$1965;idProduct:$0018;Quirks:CDCACM_QUIRK_NO_UNION_NORMAL),</code>
 +
| Uniden UBC125XLT
 +
|-
 +
| <code>(idVendor:$22b8;idProduct:$7000;Quirks:CDCACM_QUIRK_NO_UNION_NORMAL),</code>
 +
| Motorola Q Phone (has no union descriptor)
 +
|-
 +
| <code>(idVendor:$0803;idProduct:$3095;Quirks:CDCACM_QUIRK_NO_UNION_NORMAL),</code>
 +
| Zoom Telephonics Model 3095F USB MODEM (has no union descriptor)
 +
|-
 +
| <code>(idVendor:$0572;idProduct:$1321;Quirks:CDCACM_QUIRK_NO_UNION_NORMAL),</code>
 +
| Conexant USB MODEM CX93010 (has no union descriptor)
 +
|-
 +
| <code>(idVendor:$0572;idProduct:$1324;Quirks:CDCACM_QUIRK_NO_UNION_NORMAL),</code>
 +
| Conexant USB MODEM RD02-D400 (has no union descriptor)
 +
|-
 +
| <code>(idVendor:$0572;idProduct:$1328;Quirks:CDCACM_QUIRK_NO_UNION_NORMAL),</code>
 +
| Shiro/Aztech USB MODEM UM-3100 (has no union descriptor)
 +
|-
 +
| <code>(idVendor:$0572;idProduct:$1349;Quirks:CDCACM_QUIRK_NO_UNION_NORMAL),</code>
 +
| Hiro (Conexant) USB MODEM H50228
 +
|-
 +
| <code>(idVendor:$20df;idProduct:$0001;Quirks:CDCACM_QUIRK_CONTROL_LINE_STATE),</code>
 +
| Simtec Electronics Entropy Key
 +
|-
 +
| <code>(idVendor:$2184;idProduct:$001c;Quirks:CDCACM_QUIRK_NONE),</code>
 +
| GW Instek AFG-2225
 +
|-
 +
| <code>(idVendor:$2184;idProduct:$0036;Quirks:CDCACM_QUIRK_NONE),</code>
 +
| GW Instek AFG-125
 +
|-
 +
| <code>(idVendor:$22b8;idProduct:$6425;Quirks:CDCACM_QUIRK_NONE),</code>
 +
| Motorola MOTOMAGX phones
 +
|-
 +
|colspan="2"|''Motorola H24 HSPA module''
 +
|-
 +
| <code>(idVendor:$22b8;idProduct:$2d91;Quirks:CDCACM_QUIRK_NONE),</code>
 +
| modem
 +
|-
 +
| <code>(idVendor:$22b8;idProduct:$2d92;Quirks:CDCACM_QUIRK_NO_UNION_NORMAL),</code>
 +
| modem + diagnostics (handle only modem interface)
 +
|-
 +
| <code>(idVendor:$22b8;idProduct:$2d93;Quirks:CDCACM_QUIRK_NO_UNION_NORMAL),</code>
 +
| modem + AT port (handle only modem interface)
 +
|-
 +
| <code>(idVendor:$22b8;idProduct:$2d95;Quirks:CDCACM_QUIRK_NO_UNION_NORMAL),</code>
 +
| modem + AT port + diagnostics (handle only modem interface)
 +
|-
 +
| <code>(idVendor:$22b8;idProduct:$2d96;Quirks:CDCACM_QUIRK_NO_UNION_NORMAL),</code>
 +
| modem + NMEA (handle only modem interface)
 +
|-
 +
| <code>(idVendor:$22b8;idProduct:$2d97;Quirks:CDCACM_QUIRK_NO_UNION_NORMAL),</code>
 +
| modem + diagnostics + NMEA (handle only modem interface)
 +
|-
 +
| <code>(idVendor:$22b8;idProduct:$2d99;Quirks:CDCACM_QUIRK_NO_UNION_NORMAL),</code>
 +
| modem + AT port + NMEA (handle only modem interface)
 +
|-
 +
| <code>(idVendor:$22b8;idProduct:$2d9a;Quirks:CDCACM_QUIRK_NO_UNION_NORMAL),</code>
 +
| modem + AT port + diagnostics + NMEA (handle only modem interface)
 +
|-
 +
| <code>(idVendor:$0572;idProduct:$1329;Quirks:CDCACM_QUIRK_NO_UNION_NORMAL),</code>
 +
| Hummingbird huc56s (Conexant) (union descriptor misplaced on data interface instead of communications interface)
 +
|-
 +
| <code>(idVendor:$0572;idProduct:$1340;Quirks:CDCACM_QUIRK_NO_UNION_NORMAL),</code>
 +
| Conexant CX93010-2x UCMxx
 +
|-
 +
| <code>(idVendor:$05f9;idProduct:$4002;Quirks:CDCACM_QUIRK_NO_UNION_NORMAL),</code>
 +
| PSC Scanning, Magellan 800i
 +
|-
 +
| <code>(idVendor:$1bbb;idProduct:$0003;Quirks:CDCACM_QUIRK_NO_UNION_NORMAL),</code>
 +
| Alcatel OT-I650 (reports zero length descriptor)
 +
|-
 +
| <code>(idVendor:$1576;idProduct:$03b1;Quirks:CDCACM_QUIRK_NO_UNION_NORMAL),</code>
 +
| Maretron USB100 (reports zero length descriptor)
 +
|-
 +
| <code>(idVendor:$fff0;idProduct:$0100;Quirks:CDCACM_QUIRK_NO_UNION_NORMAL),</code>
 +
| DATECS FP-2000
 +
|-
 +
| <code>(idVendor:$09d8;idProduct:$0320;Quirks:CDCACM_QUIRK_NO_UNION_NORMAL),</code>
 +
| Elatec GmbH TWN3
 +
|-
 +
| <code>(idVendor:$0ca6;idProduct:$a050;Quirks:CDCACM_QUIRK_NO_UNION_NORMAL),</code>
 +
| Castles VEGA3000
 +
|-
 +
| <code>(idVendor:$2912;idProduct:$0001;Quirks:CDCACM_QUIRK_CLEAR_HALT_CONDITIONS),</code>
 +
| ATOL FPrint
 +
|-
 +
|colspan="2"|''Support for Owen devices''
 +
|-
 +
| <code>(idVendor:$03eb;idProduct:$0030;Quirks:CDCACM_QUIRK_NONE),</code>
 +
| Owen SI30
 +
|-
 +
|colspan="2"|''Support for Droids MuIn LCD''
 +
|-
 +
| <code>(idVendor:$04d8;idProduct:$000b;Quirks:CDCACM_QUIRK_NO_DATA_INTERFACE), </code>
 +
| &nbsp;
 +
|-
 +
| <code>(idVendor:$04d8;idProduct:$0082;Quirks:CDCACM_QUIRK_IGNORE_DEVICE),</code>
 +
| Application mode
 +
|-
 +
| <code>(idVendor:$04d8;idProduct:$0083;Quirks:CDCACM_QUIRK_IGNORE_DEVICE),</code>
 +
| Bootloader mode
 +
|-
 +
|colspan="2"|''Samsung phone in firmware update mode''
 +
|-
 +
| <code>(idVendor:$04e8;idProduct:$685d;Quirks:CDCACM_QUIRK_IGNORE_DEVICE),</code>
 +
| &nbsp;
 +
|-
 +
|colspan="2"|''Exclude Infineon Flash Loader utility''
 +
|-
 +
| <code>(idVendor:$058b;idProduct:$0041;Quirks:CDCACM_QUIRK_IGNORE_DEVICE),</code>
 +
| &nbsp;
 +
|-
 +
| <code>(idVendor:$1bc7;idProduct:$0021;Quirks:CDCACM_QUIRK_SEND_ZERO_PACKET),</code>
 +
| Telit 3G ACM only composition
 +
|-
 +
| <code>(idVendor:$1bc7;idProduct:$0023;Quirks:CDCACM_QUIRK_SEND_ZERO_PACKET),</code>
 +
| Telit 3G ACM + ECM composition
 +
|-
 +
| <code>(idVendor:$1519;idProduct:$0452;Quirks:CDCACM_QUIRK_SEND_ZERO_PACKET));</code>
 +
| Intel 7260 modem
 +
|-
 +
|}
 +
</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 ACM interface Id''' <code> CDCACM_INTERFACE_ID_* </code></div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
| <code>CDCACM_INTERFACE_ID_COUNT = 7;</code>
 +
| Number of supported Interface Ids
 +
|-
 +
|colspan="2"|&nbsp;
 +
|-
 +
| <code>CDCACM_INTERFACE_ID:array[0..CDCACM_INTERFACE_ID_COUNT - 1] of TUSBInterfaceId = (</code>
 +
| Control interfaces with no protocol set
 +
|-
 +
| <code>(bInterfaceClass:USB_CLASS_CODE_COMMUNICATIONS_AND_CDC_CONTROL; bInterfaceSubClass:USB_SUBCLASS_CDC_ACM; bInterfaceProtocol:USB_PROTOCOL_CDC_ACM_NONE),</code>
 +
| Control interfaces with AT-command sets
 +
|-
 +
| <code>(bInterfaceClass:USB_CLASS_CODE_COMMUNICATIONS_AND_CDC_CONTROL; bInterfaceSubClass:USB_SUBCLASS_CDC_ACM; bInterfaceProtocol:USB_PROTOCOL_CDC_ACM_AT_V25TER),</code>
 +
| &nbsp;
 +
|-
 +
| <code>(bInterfaceClass:USB_CLASS_CODE_COMMUNICATIONS_AND_CDC_CONTROL; bInterfaceSubClass:USB_SUBCLASS_CDC_ACM; bInterfaceProtocol:USB_PROTOCOL_CDC_ACM_AT_PCCA101),</code>
 +
| &nbsp;
 +
|-
 +
| <code>(bInterfaceClass:USB_CLASS_CODE_COMMUNICATIONS_AND_CDC_CONTROL; bInterfaceSubClass:USB_SUBCLASS_CDC_ACM; bInterfaceProtocol:USB_PROTOCOL_CDC_ACM_AT_PCCA101_WAKE),</code>
 +
| &nbsp;
 +
|-
 +
| <code>(bInterfaceClass:USB_CLASS_CODE_COMMUNICATIONS_AND_CDC_CONTROL; bInterfaceSubClass:USB_SUBCLASS_CDC_ACM; bInterfaceProtocol:USB_PROTOCOL_CDC_ACM_AT_GSM),</code>
 +
| &nbsp;
 +
|-
 +
| <code>(bInterfaceClass:USB_CLASS_CODE_COMMUNICATIONS_AND_CDC_CONTROL; bInterfaceSubClass:USB_SUBCLASS_CDC_ACM; bInterfaceProtocol:USB_PROTOCOL_CDC_ACM_AT_3G),</code>
 +
| &nbsp;
 +
|-
 +
| <code>(bInterfaceClass:USB_CLASS_CODE_COMMUNICATIONS_AND_CDC_CONTROL; bInterfaceSubClass:USB_SUBCLASS_CDC_ACM; bInterfaceProtocol:USB_PROTOCOL_CDC_ACM_AT_CDMA));</code>
 +
| &nbsp;
 +
|-
 +
|}
 +
</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 ACM device and interface Id''' <code> CDCACM_DEVICE_INTERFACE_ID_* </code></div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
| <code>CDCACM_DEVICE_INTERFACE_ID_COUNT = 58;</code>
 +
| Number of supported Device and Interface IDs
 +
|-
 +
|colspan="2"|&nbsp;
 +
|-
 +
|colspan="2"|<code>CDCACM_DEVICE_INTERFACE_ID:array[0..CDCACM_DEVICE_INTERFACE_ID_COUNT - 1] of TUSBDeviceAndInterfaceId = (</code>
 +
|-
 +
|colspan="2"|''Nokia S60 phones expose two ACM channels. The first is a modem and is picked up by the standard AT-command information below. The second is 'vendor-specific' but is treated as a serial device.''
 +
|-
 +
|colspan="2"|''Other USB_CLASS_CODE_COMMUNICATIONS_AND_CDC_CONTROL/USB_SUBCLASS_CDC_ACM/USB_PROTOCOL_CDC_ACM_VENDOR devices are likely to be Microsoft RNDIS not a modem.''
 +
|-
 +
| <code>(idVendor:$0421; idProduct:$042D;bInterfaceClass:USB_CLASS_CODE_COMMUNICATIONS_AND_CDC_CONTROL; bInterfaceSubClass:USB_SUBCLASS_CDC_ACM; bInterfaceProtocol:USB_PROTOCOL_CDC_ACM_VENDOR),</code>
 +
| Nokia 3250
 +
|-
 +
| <code>(idVendor:$0421; idProduct:$04D8;bInterfaceClass:USB_CLASS_CODE_COMMUNICATIONS_AND_CDC_CONTROL; bInterfaceSubClass:USB_SUBCLASS_CDC_ACM; bInterfaceProtocol:USB_PROTOCOL_CDC_ACM_VENDOR),</code>
 +
| Nokia 5500 Sport
 +
|-
 +
| <code>(idVendor:$0421; idProduct:$04C9;bInterfaceClass:USB_CLASS_CODE_COMMUNICATIONS_AND_CDC_CONTROL; bInterfaceSubClass:USB_SUBCLASS_CDC_ACM; bInterfaceProtocol:USB_PROTOCOL_CDC_ACM_VENDOR),</code>
 +
| Nokia E50
 +
|-
 +
| <code>(idVendor:$0421; idProduct:$0419;bInterfaceClass:USB_CLASS_CODE_COMMUNICATIONS_AND_CDC_CONTROL; bInterfaceSubClass:USB_SUBCLASS_CDC_ACM; bInterfaceProtocol:USB_PROTOCOL_CDC_ACM_VENDOR),</code>
 +
| Nokia E60
 +
|-
 +
| <code>(idVendor:$0421; idProduct:$044D;bInterfaceClass:USB_CLASS_CODE_COMMUNICATIONS_AND_CDC_CONTROL; bInterfaceSubClass:USB_SUBCLASS_CDC_ACM; bInterfaceProtocol:USB_PROTOCOL_CDC_ACM_VENDOR),</code>
 +
| Nokia E61
 +
|-
 +
| <code>(idVendor:$0421; idProduct:$0001;bInterfaceClass:USB_CLASS_CODE_COMMUNICATIONS_AND_CDC_CONTROL; bInterfaceSubClass:USB_SUBCLASS_CDC_ACM; bInterfaceProtocol:USB_PROTOCOL_CDC_ACM_VENDOR),</code>
 +
| Nokia E61i
 +
|-
 +
| <code>(idVendor:$0421; idProduct:$0475;bInterfaceClass:USB_CLASS_CODE_COMMUNICATIONS_AND_CDC_CONTROL; bInterfaceSubClass:USB_SUBCLASS_CDC_ACM; bInterfaceProtocol:USB_PROTOCOL_CDC_ACM_VENDOR),</code>
 +
| Nokia E62
 +
|-
 +
| <code>(idVendor:$0421; idProduct:$0508;bInterfaceClass:USB_CLASS_CODE_COMMUNICATIONS_AND_CDC_CONTROL; bInterfaceSubClass:USB_SUBCLASS_CDC_ACM; bInterfaceProtocol:USB_PROTOCOL_CDC_ACM_VENDOR),</code>
 +
| Nokia E65
 +
|-
 +
| <code>(idVendor:$0421; idProduct:$0418;bInterfaceClass:USB_CLASS_CODE_COMMUNICATIONS_AND_CDC_CONTROL; bInterfaceSubClass:USB_SUBCLASS_CDC_ACM; bInterfaceProtocol:USB_PROTOCOL_CDC_ACM_VENDOR),</code>
 +
| Nokia E70
 +
|-
 +
| <code>(idVendor:$0421; idProduct:$0425;bInterfaceClass:USB_CLASS_CODE_COMMUNICATIONS_AND_CDC_CONTROL; bInterfaceSubClass:USB_SUBCLASS_CDC_ACM; bInterfaceProtocol:USB_PROTOCOL_CDC_ACM_VENDOR),</code>
 +
| Nokia N71
 +
|-
 +
| <code>(idVendor:$0421; idProduct:$0486;bInterfaceClass:USB_CLASS_CODE_COMMUNICATIONS_AND_CDC_CONTROL; bInterfaceSubClass:USB_SUBCLASS_CDC_ACM; bInterfaceProtocol:USB_PROTOCOL_CDC_ACM_VENDOR),</code>
 +
| Nokia N73
 +
|-
 +
| <code>(idVendor:$0421; idProduct:$04DF;bInterfaceClass:USB_CLASS_CODE_COMMUNICATIONS_AND_CDC_CONTROL; bInterfaceSubClass:USB_SUBCLASS_CDC_ACM; bInterfaceProtocol:USB_PROTOCOL_CDC_ACM_VENDOR),</code>
 +
| Nokia N75
 +
|-
 +
| <code>(idVendor:$0421; idProduct:$000e;bInterfaceClass:USB_CLASS_CODE_COMMUNICATIONS_AND_CDC_CONTROL; bInterfaceSubClass:USB_SUBCLASS_CDC_ACM; bInterfaceProtocol:USB_PROTOCOL_CDC_ACM_VENDOR),</code>
 +
| Nokia N77
 +
|-
 +
| <code>(idVendor:$0421; idProduct:$0445;bInterfaceClass:USB_CLASS_CODE_COMMUNICATIONS_AND_CDC_CONTROL; bInterfaceSubClass:USB_SUBCLASS_CDC_ACM; bInterfaceProtocol:USB_PROTOCOL_CDC_ACM_VENDOR),</code>
 +
| Nokia N80
 +
|-
 +
| <code>(idVendor:$0421; idProduct:$042F;bInterfaceClass:USB_CLASS_CODE_COMMUNICATIONS_AND_CDC_CONTROL; bInterfaceSubClass:USB_SUBCLASS_CDC_ACM; bInterfaceProtocol:USB_PROTOCOL_CDC_ACM_VENDOR),</code>
 +
| Nokia N91 & N91 8GB
 +
|-
 +
| <code>(idVendor:$0421; idProduct:$048E;bInterfaceClass:USB_CLASS_CODE_COMMUNICATIONS_AND_CDC_CONTROL; bInterfaceSubClass:USB_SUBCLASS_CDC_ACM; bInterfaceProtocol:USB_PROTOCOL_CDC_ACM_VENDOR),</code>
 +
| Nokia N92
 +
|-
 +
| <code>(idVendor:$0421; idProduct:$0420;bInterfaceClass:USB_CLASS_CODE_COMMUNICATIONS_AND_CDC_CONTROL; bInterfaceSubClass:USB_SUBCLASS_CDC_ACM; bInterfaceProtocol:USB_PROTOCOL_CDC_ACM_VENDOR),</code>
 +
| Nokia N93
 +
|-
 +
| <code>(idVendor:$0421; idProduct:$04E6;bInterfaceClass:USB_CLASS_CODE_COMMUNICATIONS_AND_CDC_CONTROL; bInterfaceSubClass:USB_SUBCLASS_CDC_ACM; bInterfaceProtocol:USB_PROTOCOL_CDC_ACM_VENDOR),</code>
 +
| Nokia N93i
 +
|-
 +
| <code>(idVendor:$0421; idProduct:$04B2;bInterfaceClass:USB_CLASS_CODE_COMMUNICATIONS_AND_CDC_CONTROL; bInterfaceSubClass:USB_SUBCLASS_CDC_ACM; bInterfaceProtocol:USB_PROTOCOL_CDC_ACM_VENDOR),</code>
 +
| Nokia 5700 XpressMusic
 +
|-
 +
| <code>(idVendor:$0421; idProduct:$0134;bInterfaceClass:USB_CLASS_CODE_COMMUNICATIONS_AND_CDC_CONTROL; bInterfaceSubClass:USB_SUBCLASS_CDC_ACM; bInterfaceProtocol:USB_PROTOCOL_CDC_ACM_VENDOR),</code>
 +
| Nokia 6110 Navigator (China)
 +
|-
 +
| <code>(idVendor:$0421; idProduct:$046E;bInterfaceClass:USB_CLASS_CODE_COMMUNICATIONS_AND_CDC_CONTROL; bInterfaceSubClass:USB_SUBCLASS_CDC_ACM; bInterfaceProtocol:USB_PROTOCOL_CDC_ACM_VENDOR),</code>
 +
| Nokia 6110 Navigator
 +
|-
 +
| <code>(idVendor:$0421; idProduct:$002f;bInterfaceClass:USB_CLASS_CODE_COMMUNICATIONS_AND_CDC_CONTROL; bInterfaceSubClass:USB_SUBCLASS_CDC_ACM; bInterfaceProtocol:USB_PROTOCOL_CDC_ACM_VENDOR),</code>
 +
| Nokia 6120 classic &
 +
|-
 +
| <code>(idVendor:$0421; idProduct:$0088;bInterfaceClass:USB_CLASS_CODE_COMMUNICATIONS_AND_CDC_CONTROL; bInterfaceSubClass:USB_SUBCLASS_CDC_ACM; bInterfaceProtocol:USB_PROTOCOL_CDC_ACM_VENDOR),</code>
 +
| Nokia 6121 classic
 +
|-
 +
| <code>(idVendor:$0421; idProduct:$00fc;bInterfaceClass:USB_CLASS_CODE_COMMUNICATIONS_AND_CDC_CONTROL; bInterfaceSubClass:USB_SUBCLASS_CDC_ACM; bInterfaceProtocol:USB_PROTOCOL_CDC_ACM_VENDOR),</code>
 +
| Nokia 6124 classic
 +
|-
 +
| <code>(idVendor:$0421; idProduct:$0042;bInterfaceClass:USB_CLASS_CODE_COMMUNICATIONS_AND_CDC_CONTROL; bInterfaceSubClass:USB_SUBCLASS_CDC_ACM; bInterfaceProtocol:USB_PROTOCOL_CDC_ACM_VENDOR),</code>
 +
| Nokia E51
 +
|-
 +
| <code>(idVendor:$0421; idProduct:$00b0;bInterfaceClass:USB_CLASS_CODE_COMMUNICATIONS_AND_CDC_CONTROL; bInterfaceSubClass:USB_SUBCLASS_CDC_ACM; bInterfaceProtocol:USB_PROTOCOL_CDC_ACM_VENDOR),</code>
 +
| Nokia E66
 +
|-
 +
| <code>(idVendor:$0421; idProduct:$00ab;bInterfaceClass:USB_CLASS_CODE_COMMUNICATIONS_AND_CDC_CONTROL; bInterfaceSubClass:USB_SUBCLASS_CDC_ACM; bInterfaceProtocol:USB_PROTOCOL_CDC_ACM_VENDOR),</code>
 +
| Nokia E71
 +
|-
 +
| <code>(idVendor:$0421; idProduct:$0481;bInterfaceClass:USB_CLASS_CODE_COMMUNICATIONS_AND_CDC_CONTROL; bInterfaceSubClass:USB_SUBCLASS_CDC_ACM; bInterfaceProtocol:USB_PROTOCOL_CDC_ACM_VENDOR),</code>
 +
| Nokia N76
 +
|-
 +
| <code>(idVendor:$0421; idProduct:$0007;bInterfaceClass:USB_CLASS_CODE_COMMUNICATIONS_AND_CDC_CONTROL; bInterfaceSubClass:USB_SUBCLASS_CDC_ACM; bInterfaceProtocol:USB_PROTOCOL_CDC_ACM_VENDOR),</code>
 +
| Nokia N81 & N81 8GB
 +
|-
 +
| <code>(idVendor:$0421; idProduct:$0071;bInterfaceClass:USB_CLASS_CODE_COMMUNICATIONS_AND_CDC_CONTROL; bInterfaceSubClass:USB_SUBCLASS_CDC_ACM; bInterfaceProtocol:USB_PROTOCOL_CDC_ACM_VENDOR),</code>
 +
| Nokia N82
 +
|-
 +
| <code>(idVendor:$0421; idProduct:$04F0;bInterfaceClass:USB_CLASS_CODE_COMMUNICATIONS_AND_CDC_CONTROL; bInterfaceSubClass:USB_SUBCLASS_CDC_ACM; bInterfaceProtocol:USB_PROTOCOL_CDC_ACM_VENDOR),</code>
 +
| Nokia N95 & N95-3 NAM
 +
|-
 +
| <code>(idVendor:$0421; idProduct:$0070;bInterfaceClass:USB_CLASS_CODE_COMMUNICATIONS_AND_CDC_CONTROL; bInterfaceSubClass:USB_SUBCLASS_CDC_ACM; bInterfaceProtocol:USB_PROTOCOL_CDC_ACM_VENDOR),</code>
 +
| Nokia N95 8GB
 +
|-
 +
| <code>(idVendor:$0421; idProduct:$00e9;bInterfaceClass:USB_CLASS_CODE_COMMUNICATIONS_AND_CDC_CONTROL; bInterfaceSubClass:USB_SUBCLASS_CDC_ACM; bInterfaceProtocol:USB_PROTOCOL_CDC_ACM_VENDOR),</code>
 +
| Nokia 5320 XpressMusic
 +
|-
 +
| <code>(idVendor:$0421; idProduct:$0099;bInterfaceClass:USB_CLASS_CODE_COMMUNICATIONS_AND_CDC_CONTROL; bInterfaceSubClass:USB_SUBCLASS_CDC_ACM; bInterfaceProtocol:USB_PROTOCOL_CDC_ACM_VENDOR),</code>
 +
| Nokia 6210 Navigator, RM-367
 +
|-
 +
| <code>(idVendor:$0421; idProduct:$0128;bInterfaceClass:USB_CLASS_CODE_COMMUNICATIONS_AND_CDC_CONTROL; bInterfaceSubClass:USB_SUBCLASS_CDC_ACM; bInterfaceProtocol:USB_PROTOCOL_CDC_ACM_VENDOR),</code>
 +
| Nokia 6210 Navigator, RM-419
 +
|-
 +
| <code>(idVendor:$0421; idProduct:$008f;bInterfaceClass:USB_CLASS_CODE_COMMUNICATIONS_AND_CDC_CONTROL; bInterfaceSubClass:USB_SUBCLASS_CDC_ACM; bInterfaceProtocol:USB_PROTOCOL_CDC_ACM_VENDOR),</code>
 +
| Nokia 6220 Classic
 +
|-
 +
| <code>(idVendor:$0421; idProduct:$00a0;bInterfaceClass:USB_CLASS_CODE_COMMUNICATIONS_AND_CDC_CONTROL; bInterfaceSubClass:USB_SUBCLASS_CDC_ACM; bInterfaceProtocol:USB_PROTOCOL_CDC_ACM_VENDOR),</code>
 +
| Nokia 6650
 +
|-
 +
| <code>(idVendor:$0421; idProduct:$007b;bInterfaceClass:USB_CLASS_CODE_COMMUNICATIONS_AND_CDC_CONTROL; bInterfaceSubClass:USB_SUBCLASS_CDC_ACM; bInterfaceProtocol:USB_PROTOCOL_CDC_ACM_VENDOR),</code>
 +
| Nokia N78
 +
|-
 +
| <code>(idVendor:$0421; idProduct:$0094;bInterfaceClass:USB_CLASS_CODE_COMMUNICATIONS_AND_CDC_CONTROL; bInterfaceSubClass:USB_SUBCLASS_CDC_ACM; bInterfaceProtocol:USB_PROTOCOL_CDC_ACM_VENDOR),</code>
 +
| Nokia N85
 +
|-
 +
| <code>(idVendor:$0421; idProduct:$003a;bInterfaceClass:USB_CLASS_CODE_COMMUNICATIONS_AND_CDC_CONTROL; bInterfaceSubClass:USB_SUBCLASS_CDC_ACM; bInterfaceProtocol:USB_PROTOCOL_CDC_ACM_VENDOR),</code>
 +
| Nokia N96 & N96-3
 +
|-
 +
| <code>(idVendor:$0421; idProduct:$00e9;bInterfaceClass:USB_CLASS_CODE_COMMUNICATIONS_AND_CDC_CONTROL; bInterfaceSubClass:USB_SUBCLASS_CDC_ACM; bInterfaceProtocol:USB_PROTOCOL_CDC_ACM_VENDOR),</code>
 +
| Nokia 5320 XpressMusic
 +
|-
 +
| <code>(idVendor:$0421; idProduct:$0108;bInterfaceClass:USB_CLASS_CODE_COMMUNICATIONS_AND_CDC_CONTROL; bInterfaceSubClass:USB_SUBCLASS_CDC_ACM; bInterfaceProtocol:USB_PROTOCOL_CDC_ACM_VENDOR),</code>
 +
| Nokia 5320 XpressMusic 2G
 +
|-
 +
| <code>(idVendor:$0421; idProduct:$01f5;bInterfaceClass:USB_CLASS_CODE_COMMUNICATIONS_AND_CDC_CONTROL; bInterfaceSubClass:USB_SUBCLASS_CDC_ACM; bInterfaceProtocol:USB_PROTOCOL_CDC_ACM_VENDOR),</code>
 +
| Nokia N97, RM-505
 +
|-
 +
| <code>(idVendor:$0421; idProduct:$02e3;bInterfaceClass:USB_CLASS_CODE_COMMUNICATIONS_AND_CDC_CONTROL; bInterfaceSubClass:USB_SUBCLASS_CDC_ACM; bInterfaceProtocol:USB_PROTOCOL_CDC_ACM_VENDOR),</code>
 +
| Nokia 5230, RM-588
 +
|-
 +
| <code>(idVendor:$0421; idProduct:$0178;bInterfaceClass:USB_CLASS_CODE_COMMUNICATIONS_AND_CDC_CONTROL; bInterfaceSubClass:USB_SUBCLASS_CDC_ACM; bInterfaceProtocol:USB_PROTOCOL_CDC_ACM_VENDOR),</code>
 +
| Nokia E63
 +
|-
 +
| <code>(idVendor:$0421; idProduct:$010e;bInterfaceClass:USB_CLASS_CODE_COMMUNICATIONS_AND_CDC_CONTROL; bInterfaceSubClass:USB_SUBCLASS_CDC_ACM; bInterfaceProtocol:USB_PROTOCOL_CDC_ACM_VENDOR),</code>
 +
| Nokia E75
 +
|-
 +
| <code>(idVendor:$0421; idProduct:$02d9;bInterfaceClass:USB_CLASS_CODE_COMMUNICATIONS_AND_CDC_CONTROL; bInterfaceSubClass:USB_SUBCLASS_CDC_ACM; bInterfaceProtocol:USB_PROTOCOL_CDC_ACM_VENDOR),</code>
 +
| Nokia 6760 Slide
 +
|-
 +
| <code>(idVendor:$0421; idProduct:$01d0;bInterfaceClass:USB_CLASS_CODE_COMMUNICATIONS_AND_CDC_CONTROL; bInterfaceSubClass:USB_SUBCLASS_CDC_ACM; bInterfaceProtocol:USB_PROTOCOL_CDC_ACM_VENDOR),</code>
 +
| Nokia E52
 +
|-
 +
| <code>(idVendor:$0421; idProduct:$0223;bInterfaceClass:USB_CLASS_CODE_COMMUNICATIONS_AND_CDC_CONTROL; bInterfaceSubClass:USB_SUBCLASS_CDC_ACM; bInterfaceProtocol:USB_PROTOCOL_CDC_ACM_VENDOR),</code>
 +
| Nokia E72
 +
|-
 +
| <code>(idVendor:$0421; idProduct:$0275;bInterfaceClass:USB_CLASS_CODE_COMMUNICATIONS_AND_CDC_CONTROL; bInterfaceSubClass:USB_SUBCLASS_CDC_ACM; bInterfaceProtocol:USB_PROTOCOL_CDC_ACM_VENDOR),</code>
 +
| Nokia X6
 +
|-
 +
| <code>(idVendor:$0421; idProduct:$026c;bInterfaceClass:USB_CLASS_CODE_COMMUNICATIONS_AND_CDC_CONTROL; bInterfaceSubClass:USB_SUBCLASS_CDC_ACM; bInterfaceProtocol:USB_PROTOCOL_CDC_ACM_VENDOR),</code>
 +
| Nokia N97 Mini
 +
|-
 +
| <code>(idVendor:$0421; idProduct:$0154;bInterfaceClass:USB_CLASS_CODE_COMMUNICATIONS_AND_CDC_CONTROL; bInterfaceSubClass:USB_SUBCLASS_CDC_ACM; bInterfaceProtocol:USB_PROTOCOL_CDC_ACM_VENDOR),</code>
 +
| Nokia 5800 XpressMusic
 +
|-
 +
| <code>(idVendor:$0421; idProduct:$04ce;bInterfaceClass:USB_CLASS_CODE_COMMUNICATIONS_AND_CDC_CONTROL; bInterfaceSubClass:USB_SUBCLASS_CDC_ACM; bInterfaceProtocol:USB_PROTOCOL_CDC_ACM_VENDOR),</code>
 +
| Nokia E90
 +
|-
 +
| <code>(idVendor:$0421; idProduct:$01d4;bInterfaceClass:USB_CLASS_CODE_COMMUNICATIONS_AND_CDC_CONTROL; bInterfaceSubClass:USB_SUBCLASS_CDC_ACM; bInterfaceProtocol:USB_PROTOCOL_CDC_ACM_VENDOR),</code>
 +
| Nokia E55
 +
|-
 +
| <code>(idVendor:$0421; idProduct:$0302;bInterfaceClass:USB_CLASS_CODE_COMMUNICATIONS_AND_CDC_CONTROL; bInterfaceSubClass:USB_SUBCLASS_CDC_ACM; bInterfaceProtocol:USB_PROTOCOL_CDC_ACM_VENDOR),</code>
 +
| Nokia N8
 +
|-
 +
| <code>(idVendor:$0421; idProduct:$0335;bInterfaceClass:USB_CLASS_CODE_COMMUNICATIONS_AND_CDC_CONTROL; bInterfaceSubClass:USB_SUBCLASS_CDC_ACM; bInterfaceProtocol:USB_PROTOCOL_CDC_ACM_VENDOR),</code>
 +
| Nokia E7
 +
|-
 +
| <code>(idVendor:$0421; idProduct:$03cd;bInterfaceClass:USB_CLASS_CODE_COMMUNICATIONS_AND_CDC_CONTROL; bInterfaceSubClass:USB_SUBCLASS_CDC_ACM; bInterfaceProtocol:USB_PROTOCOL_CDC_ACM_VENDOR),</code>
 +
| Nokia C7
 +
|-
 +
| <code>(idVendor:$04e7; idProduct:$6651;bInterfaceClass:USB_CLASS_CODE_COMMUNICATIONS_AND_CDC_CONTROL; bInterfaceSubClass:USB_SUBCLASS_CDC_ACM; bInterfaceProtocol:USB_PROTOCOL_CDC_ACM_VENDOR));</code>
 +
| Samsung GTi8510 (INNOV8)
 +
|-
 +
|}
 +
</div></div>
 +
<br />
  
 
=== Type definitions ===
 
=== Type definitions ===
 
----
 
----
  
''To be documented''
+
 
 +
'''CDC ACM device Id'''
 +
 
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;">
 +
<code>PCDCACMDeviceId = ^TCDCACMDeviceId;</code>
 +
 
 +
<code>TCDCACMDeviceId = record</code>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
| <code>idVendor:Word;</code>
 +
| style="width: 50%;"|&nbsp;
 +
|-
 +
| <code>idProduct:Word;</code>
 +
| &nbsp;
 +
|-
 +
| <code>Quirks:LongWord;</code>
 +
| &nbsp;
 +
|-
 +
|}
 +
</div></div>
 +
 
 +
'''CDC ACM device'''
 +
 
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;">
 +
<code>PCDCACMDevice = ^TCDCACMDevice;</code>
 +
 
 +
<code>TCDCACMDevice = record</code>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
|colspan="2"|''Serial Properties''
 +
|-
 +
| <code>Serial:TSerialDevice;</code>
 +
| &nbsp;
 +
|-
 +
|colspan="2"|''USB Properties''
 +
|-
 +
| <code>Quirks:LongWord;</code>
 +
| Unusual behaviours of specific chip versions
 +
|-
 +
| <code>ReceiveSize:LongWord;</code>
 +
| Maximum Receive size for Bulk IN Endpoint
 +
|-
 +
| <code>TransmitSize:LongWord;</code>
 +
| Maximum Transmit size for Bulk OUT Endpoint
 +
|-
 +
| <code>ReceiveActive:LongBool;</code>
 +
| True if a Receive request is currently in progress
 +
|-
 +
| <code>TransmitActive:LongBool;</code>
 +
| True if a Transmit request is currently in progress
 +
|-
 +
| <code>DataInterface:PUSBInterface;</code>
 +
| USB interface for data requests
 +
|-
 +
| <code>ControlInterface:PUSBInterface;</code>
 +
| USB interface for control requests
 +
|-
 +
| <code>ReceiveRequest:PUSBRequest;</code>
 +
| USB request Bulk IN Endpoint
 +
|-
 +
| <code>ReceiveEndpoint:PUSBEndpointDescriptor;</code>
 +
| CDC ACM Bulk IN Endpoint
 +
|-
 +
| <code>TransmitRequest:PUSBRequest;</code>
 +
| USB request for Bulk OUT Endpoint
 +
|-
 +
| <code>TransmitEndpoint:PUSBEndpointDescriptor;</code>
 +
| CDC ACM Bulk OUT Endpoint
 +
|-
 +
| <code>InterruptRequest:PUSBRequest;</code>
 +
| USB request for Interrupt IN Endpoint
 +
|-
 +
| <code>InterruptEndpoint:PUSBEndpointDescriptor;</code>
 +
| CDC ACM Interrupt IN Endpoint
 +
|-
 +
| <code>PendingCount:LongWord;</code>
 +
| Number of USB requests pending for this device
 +
|-
 +
| <code>WaiterThread:TThreadId;</code>
 +
| Thread waiting for pending requests to complete (for device detachment)
 +
|-
 +
|colspan="2"|''Statistics Properties''
 +
|-
 +
| <code>ReceiveComplete:LongWord;</code>
 +
| &nbsp;
 +
|-
 +
| <code>TransmitComplete:LongWord;</code>
 +
| &nbsp;
 +
|-
 +
| <code>InterruptComplete:LongWord;</code>
 +
| &nbsp;
 +
|-
 +
| <code>InterruptErrors:LongWord;</code>
 +
| &nbsp;
 +
|-
 +
|}
 +
</div></div> 
 +
<br />
  
 
=== Public variables ===
 
=== Public variables ===
 
----
 
----
  
''To be documented''
+
''None defined''
  
 
=== Function declarations ===
 
=== Function declarations ===
Line 38: Line 640:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
 
| None documented
 
| None documented
 
|-
 
|-
Line 45: Line 647:
 
<br />
 
<br />
  
 +
'''CDC ACM serial 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 CDCACMSerialDeviceOpen(Serial:PSerialDevice; BaudRate,DataBits,StopBits,Parity,FlowControl,ReceiveDepth,TransmitDepth:LongWord):LongWord;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Implementation of SerialDeviceOpen API for CDCACM Serial</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! Note
 +
| Not intended to be called directly by applications, use SerialDeviceOpen instead.
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<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 CDCACMSerialDeviceClose(Serial:PSerialDevice):LongWord;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Implementation of SerialDeviceClose API for CDCACM Serial</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! Note
 +
| Not intended to be called directly by applications, use SerialDeviceClose instead.
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<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 CDCACMSerialDeviceRead(Serial:PSerialDevice; Buffer:Pointer; Size,Flags:LongWord; var Count:LongWord):LongWord;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Implementation of SerialDeviceRead API for CDCACM Serial</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! Note
 +
| Not intended to be called directly by applications, use SerialDeviceRead instead.
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<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 CDCACMSerialDeviceWrite(Serial:PSerialDevice; Buffer:Pointer; Size,Flags:LongWord; var Count:LongWord):LongWord;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Implementation of SerialDeviceWrite API for CDCACM Serial</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! Note
 +
| Not intended to be called directly by applications, use SerialDeviceWrite instead.
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
 +
'''CDC ACM USB 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 CDCACMDriverBind(Device:PUSBDevice; Interrface:PUSBInterface):LongWord;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Bind the CDC ACM driver to a USB device if it is suitable</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 to attempt to bind to
 +
|-
 +
! Interrface
 +
| The USB interface to attempt to bind to (or nil for whole device)
 +
|-
 +
! Return
 +
| USB_STATUS_SUCCESS if completed, USB_STATUS_DEVICE_UNSUPPORTED if unsupported or another error code on failure.
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<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 CDCACMDriverUnbind(Device:PUSBDevice; Interrface:PUSBInterface):LongWord;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Unbind the CDC ACM driver from a USB device</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 to unbind from
 +
|-
 +
! Interrface
 +
| The USB interface to unbind from (or nil for whole device)
 +
|-
 +
! Return
 +
| USB_STATUS_SUCCESS if completed or another error code on failure
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<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;">procedure CDCACMReceiveStart(Request:PUSBRequest);</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Called to continue reception of data to the receive buffer</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! Request
 +
| The USB receive request to use
 +
|-
 +
! Note
 +
| Caller must hold the lock on the serial device
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<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;">procedure CDCACMReceiveWorker(Request:PUSBRequest);</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Called (by a Worker thread) to process a completed USB request from the CDC ACM bulk IN endpoint</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! Request
 +
| The USB request which has completed
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<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;">procedure CDCACMReceiveComplete(Request:PUSBRequest);</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Called when a USB request from the CDC ACM bulk IN endpoint completes</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! Request
 +
| The USB request which has completed
 +
|-
 +
! Note
 +
| Request is passed to worker thread for processing to prevent blocking the USB completion
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<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;">procedure CDCACMTransmitStart(Request:PUSBRequest);</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Called to continue transmission of data from the transmit buffer</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! Request
 +
| The USB transmit request to use
 +
|-
 +
! Note
 +
| Caller must hold the lock on the serial device
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<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;">procedure CDCACMTransmitWorker(Request:PUSBRequest);</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Called (by a Worker thread) to process a completed USB request to the CDC ACM bulk OUT endpoint</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! Request
 +
| The USB request which has completed
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<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;">procedure CDCACMTransmitComplete(Request:PUSBRequest);</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Called when a USB request to the CDC ACM bulk OUT endpoint completes</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! Request
 +
| The USB request which has completed
 +
|-
 +
! Note
 +
| Request is passed to worker thread for processing to prevent blocking the USB completion
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<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;">procedure CDCACMInterruptWorker(Request:PUSBRequest);</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Called (by a Worker thread) to process a completed USB request to the CDC ACM interrupt IN endpoint</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! Request
 +
| The USB request which has completed
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<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;">procedure CDCACMInterruptComplete(Request:PUSBRequest);</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Called when a USB request from the CDC ACM interrupt IN endpoint completes</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! Request
 +
| The USB request which has completed
 +
|-
 +
! Note
 +
| Request is passed to worker thread for processing to prevent blocking the USB completion
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
 +
'''CDC ACM 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 CDCACMCheckDevice(Device:PUSBDevice; var Quirks:LongWord):LongWord;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Check the Vendor and Device Id against the supported devices</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! Device
 +
| USB device to check
 +
|-
 +
! Quirks
 +
| Return value for any device specific quirks (eg CDCACM_QUIRK_NO_UNION_NORMAL)
 +
|-
 +
! Return
 +
| USB_STATUS_SUCCESS if completed or another error code on failure
 +
|-
 +
|}
 +
</div></div>
 +
<br /> 
 +
<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 CDCACMCheckInterface(Device:PUSBDevice; Interrface:PUSBInterface):LongWord;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Check the Interface against the supported devices</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! Device
 +
| USB device to check
 +
|-
 +
! Interrface
 +
| USB interface to check
 +
|-
 +
! Return
 +
| USB_STATUS_SUCCESS if completed or another error code on failure
 +
|-
 +
|}
 +
</div></div>
 +
<br />   
 +
<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 CDCACMCheckDeviceAndInterface(Device:PUSBDevice; Interrface:PUSBInterface):LongWord;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Check the Device and Interface against the supported devices</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! Device
 +
| USB device to check
 +
|-
 +
! Interrface
 +
| USB interface to check
 +
|-
 +
! Return
 +
| USB_STATUS_SUCCESS if completed or another error code on failure
 +
|-
 +
|}
 +
</div></div>
 +
<br />   
 +
<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 CDCACMFindInterfaces(Device:PUSBDevice; Interrface:PUSBInterface; var DataInterface,ControlInterface:PUSBInterface; Quirks:LongWord; var Capabilities:Byte):LongWord;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Locate the data and control interfaces from the functional descriptors</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! Device
 +
| USB device to check
 +
|-
 +
! Interrface
 +
| USB interface to check (Optional)
 +
|-
 +
! DataInterface
 +
| Return value for the located data interface
 +
|-
 +
! ControlInterface
 +
| Return value for the located control interface
 +
|-
 +
! Quirks
 +
| Any known quirks for this device from identification (eg CDCACM_QUIRK_NO_UNION_NORMAL)
 +
|-
 +
! Capabilities
 +
| Return value for ACM capabilities (eg USB_CDC_ACM_CAP_LINE)
 +
|-
 +
! Return
 +
| USB_STATUS_SUCCESS if completed or another error code on failure
 +
|-
 +
|}
 +
</div></div>
 +
<br /> 
 +
<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 CDCACMControlRequest(Serial:PCDCACMDevice; Request:Byte; Value:Word; Data:Pointer;Size:Word):LongWord;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! Note
 +
| None documented
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<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 CDCACMGetLineRequest(Serial:PCDCACMDevice; var LineCoding:TUSBCDCLineCoding):LongWord;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! Note
 +
| None documented
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<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 CDCACMSetLineRequest(Serial:PCDCACMDevice; const LineCoding:TUSBCDCLineCoding):LongWord;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! Note
 +
| None documented
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<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 CDCACMSetControlRequest(Serial:PCDCACMDevice; Control:Word):LongWord;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! Note
 +
| None documented
 +
|-
 +
|}
 +
</div></div>
 +
<br />
  
 
Return to [[Unit_Reference|Unit Reference]]
 
Return to [[Unit_Reference|Unit Reference]]

Latest revision as of 03:53, 10 May 2019

Return to Unit Reference


Description


USB CDC ACM Driver unit

The Abstract Control Model (ACM) is part of the USB Communications Device Class (CDC) standard which allows modem like devices to be supported by USB with a standardized protocol for data transfer and modem control.

A CDC ACM device is defined by information in the interface descriptors and is not specific to any product and vendor Id. There are numerous devices that support the CDC ACM protocol and some of the most important from Ultibo are the Arduino Mega 2560 R3 and the Arduino Due.

This driver presents any device recognized as a CDC ACM as a generic serial interface device that can be accessed using the API in the Serial unit. It should not be necessary to directly call any of the functions in this unit from application code.

Constants



CDC ACM specific constants CDCACM_*
CDCACM_DRIVER_NAME = 'USB CDC ACM Serial Driver'; Name of CDC ACM driver
 
CDCACM_SERIAL_DESCRIPTION = 'USB CDC ACM Serial'; Description of CDC ACM device
 
CDCACM_MIN_BAUD = 0; Minimum is device specific
CDCACM_MAX_BAUD = 0; Maximum is device specific
 
CDCACM_MIN_DATABITS = SERIAL_DATA_5BIT;  
CDCACM_MAX_DATABITS = SERIAL_DATA_8BIT;  
 
CDCACM_MIN_STOPBITS = SERIAL_STOP_1BIT;  
CDCACM_MAX_STOPBITS = SERIAL_STOP_1BIT5;  
 
CDCACM_MAX_PARITY = SERIAL_PARITY_SPACE;  
 
CDCACM_MAX_FLOW = SERIAL_FLOW_DSR_DTR;  


CDC ACM USB request CDCACM_USB_REQUEST_*
CDCACM_USB_REQUEST_TYPE = (USB_BMREQUESTTYPE_TYPE_CLASS or USB_BMREQUESTTYPE_RECIPIENT_INTERFACE);  


CDC ACM device quirk CDCACM_QUIRK_*
CDCACM_QUIRK_NONE = $00000000;  
CDCACM_QUIRK_NO_UNION_NORMAL = $00000001;  
CDCACM_QUIRK_SINGLE_RX_URB = $00000002;  
CDCACM_QUIRK_NO_CAP_LINE = $00000004;  
CDCACM_QUIRK_NO_DATA_INTERFACE = $00000008;  
CDCACM_QUIRK_IGNORE_DEVICE = $00000010;  
CDCACM_QUIRK_CONTROL_LINE_STATE = $00000020;  
CDCACM_QUIRK_CLEAR_HALT_CONDITIONS = $00000040;  
CDCACM_QUIRK_SEND_ZERO_PACKET = $00000080;  
CDCACM_QUIRK_DISABLE_ECHO = $00000100;  


CDC ACM device Id CDCACM_DEVICE_ID_*
CDCACM_DEVICE_ID_COUNT = 49; Number of supported Device IDs
 
CDCACM_DEVICE_ID:array[0..CDCACM_DEVICE_ID_COUNT - 1] of TCDCACMDeviceId = (
(idVendor:$076d;idProduct:$0006;Quirks:CDCACM_QUIRK_NO_UNION_NORMAL), Denso Cradle CU-321 (has no union descriptor)
(idVendor:$17ef;idProduct:$7000;Quirks:CDCACM_QUIRK_NO_UNION_NORMAL), Lenovo USB modem (has no union descriptor)
(idVendor:$0870;idProduct:$0001;Quirks:CDCACM_QUIRK_NO_UNION_NORMAL), Metricom GS Modem (has no union descriptor)
(idVendor:$0e8d;idProduct:$0003;Quirks:CDCACM_QUIRK_NO_UNION_NORMAL), FIREFLY, MediaTek Inc (has no union descriptor)
(idVendor:$0e8d;idProduct:$2000;Quirks:CDCACM_QUIRK_DISABLE_ECHO), MediaTek Inc Preloader
(idVendor:$0e8d;idProduct:$3329;Quirks:CDCACM_QUIRK_NO_UNION_NORMAL), MediaTek Inc GPS (has no union descriptor)
(idVendor:$0482;idProduct:$0203;Quirks:CDCACM_QUIRK_NO_UNION_NORMAL), KYOCERA AH-K3001V (has no union descriptor)
(idVendor:$079b;idProduct:$000f;Quirks:CDCACM_QUIRK_NO_UNION_NORMAL), BT On-Air USB MODEM (has no union descriptor)
(idVendor:$0ace;idProduct:$1602;Quirks:CDCACM_QUIRK_SINGLE_RX_URB), ZyDAS 56K USB MODEM
(idVendor:$0ace;idProduct:$1608;Quirks:CDCACM_QUIRK_SINGLE_RX_URB), ZyDAS 56K USB MODEM (firmware bug)
(idVendor:$0ace;idProduct:$1611;Quirks:CDCACM_QUIRK_SINGLE_RX_URB), ZyDAS 56K USB MODEM - new version (firmware bug)
(idVendor:$11ca;idProduct:$0201;Quirks:CDCACM_QUIRK_SINGLE_RX_URB), VeriFone Mx870 Gadget Serial
(idVendor:$1965;idProduct:$0018;Quirks:CDCACM_QUIRK_NO_UNION_NORMAL), Uniden UBC125XLT
(idVendor:$22b8;idProduct:$7000;Quirks:CDCACM_QUIRK_NO_UNION_NORMAL), Motorola Q Phone (has no union descriptor)
(idVendor:$0803;idProduct:$3095;Quirks:CDCACM_QUIRK_NO_UNION_NORMAL), Zoom Telephonics Model 3095F USB MODEM (has no union descriptor)
(idVendor:$0572;idProduct:$1321;Quirks:CDCACM_QUIRK_NO_UNION_NORMAL), Conexant USB MODEM CX93010 (has no union descriptor)
(idVendor:$0572;idProduct:$1324;Quirks:CDCACM_QUIRK_NO_UNION_NORMAL), Conexant USB MODEM RD02-D400 (has no union descriptor)
(idVendor:$0572;idProduct:$1328;Quirks:CDCACM_QUIRK_NO_UNION_NORMAL), Shiro/Aztech USB MODEM UM-3100 (has no union descriptor)
(idVendor:$0572;idProduct:$1349;Quirks:CDCACM_QUIRK_NO_UNION_NORMAL), Hiro (Conexant) USB MODEM H50228
(idVendor:$20df;idProduct:$0001;Quirks:CDCACM_QUIRK_CONTROL_LINE_STATE), Simtec Electronics Entropy Key
(idVendor:$2184;idProduct:$001c;Quirks:CDCACM_QUIRK_NONE), GW Instek AFG-2225
(idVendor:$2184;idProduct:$0036;Quirks:CDCACM_QUIRK_NONE), GW Instek AFG-125
(idVendor:$22b8;idProduct:$6425;Quirks:CDCACM_QUIRK_NONE), Motorola MOTOMAGX phones
Motorola H24 HSPA module
(idVendor:$22b8;idProduct:$2d91;Quirks:CDCACM_QUIRK_NONE), modem
(idVendor:$22b8;idProduct:$2d92;Quirks:CDCACM_QUIRK_NO_UNION_NORMAL), modem + diagnostics (handle only modem interface)
(idVendor:$22b8;idProduct:$2d93;Quirks:CDCACM_QUIRK_NO_UNION_NORMAL), modem + AT port (handle only modem interface)
(idVendor:$22b8;idProduct:$2d95;Quirks:CDCACM_QUIRK_NO_UNION_NORMAL), modem + AT port + diagnostics (handle only modem interface)
(idVendor:$22b8;idProduct:$2d96;Quirks:CDCACM_QUIRK_NO_UNION_NORMAL), modem + NMEA (handle only modem interface)
(idVendor:$22b8;idProduct:$2d97;Quirks:CDCACM_QUIRK_NO_UNION_NORMAL), modem + diagnostics + NMEA (handle only modem interface)
(idVendor:$22b8;idProduct:$2d99;Quirks:CDCACM_QUIRK_NO_UNION_NORMAL), modem + AT port + NMEA (handle only modem interface)
(idVendor:$22b8;idProduct:$2d9a;Quirks:CDCACM_QUIRK_NO_UNION_NORMAL), modem + AT port + diagnostics + NMEA (handle only modem interface)
(idVendor:$0572;idProduct:$1329;Quirks:CDCACM_QUIRK_NO_UNION_NORMAL), Hummingbird huc56s (Conexant) (union descriptor misplaced on data interface instead of communications interface)
(idVendor:$0572;idProduct:$1340;Quirks:CDCACM_QUIRK_NO_UNION_NORMAL), Conexant CX93010-2x UCMxx
(idVendor:$05f9;idProduct:$4002;Quirks:CDCACM_QUIRK_NO_UNION_NORMAL), PSC Scanning, Magellan 800i
(idVendor:$1bbb;idProduct:$0003;Quirks:CDCACM_QUIRK_NO_UNION_NORMAL), Alcatel OT-I650 (reports zero length descriptor)
(idVendor:$1576;idProduct:$03b1;Quirks:CDCACM_QUIRK_NO_UNION_NORMAL), Maretron USB100 (reports zero length descriptor)
(idVendor:$fff0;idProduct:$0100;Quirks:CDCACM_QUIRK_NO_UNION_NORMAL), DATECS FP-2000
(idVendor:$09d8;idProduct:$0320;Quirks:CDCACM_QUIRK_NO_UNION_NORMAL), Elatec GmbH TWN3
(idVendor:$0ca6;idProduct:$a050;Quirks:CDCACM_QUIRK_NO_UNION_NORMAL), Castles VEGA3000
(idVendor:$2912;idProduct:$0001;Quirks:CDCACM_QUIRK_CLEAR_HALT_CONDITIONS), ATOL FPrint
Support for Owen devices
(idVendor:$03eb;idProduct:$0030;Quirks:CDCACM_QUIRK_NONE), Owen SI30
Support for Droids MuIn LCD
(idVendor:$04d8;idProduct:$000b;Quirks:CDCACM_QUIRK_NO_DATA_INTERFACE),  
(idVendor:$04d8;idProduct:$0082;Quirks:CDCACM_QUIRK_IGNORE_DEVICE), Application mode
(idVendor:$04d8;idProduct:$0083;Quirks:CDCACM_QUIRK_IGNORE_DEVICE), Bootloader mode
Samsung phone in firmware update mode
(idVendor:$04e8;idProduct:$685d;Quirks:CDCACM_QUIRK_IGNORE_DEVICE),  
Exclude Infineon Flash Loader utility
(idVendor:$058b;idProduct:$0041;Quirks:CDCACM_QUIRK_IGNORE_DEVICE),  
(idVendor:$1bc7;idProduct:$0021;Quirks:CDCACM_QUIRK_SEND_ZERO_PACKET), Telit 3G ACM only composition
(idVendor:$1bc7;idProduct:$0023;Quirks:CDCACM_QUIRK_SEND_ZERO_PACKET), Telit 3G ACM + ECM composition
(idVendor:$1519;idProduct:$0452;Quirks:CDCACM_QUIRK_SEND_ZERO_PACKET)); Intel 7260 modem


CDC ACM interface Id CDCACM_INTERFACE_ID_*
CDCACM_INTERFACE_ID_COUNT = 7; Number of supported Interface Ids
 
CDCACM_INTERFACE_ID:array[0..CDCACM_INTERFACE_ID_COUNT - 1] of TUSBInterfaceId = ( Control interfaces with no protocol set
(bInterfaceClass:USB_CLASS_CODE_COMMUNICATIONS_AND_CDC_CONTROL; bInterfaceSubClass:USB_SUBCLASS_CDC_ACM; bInterfaceProtocol:USB_PROTOCOL_CDC_ACM_NONE), Control interfaces with AT-command sets
(bInterfaceClass:USB_CLASS_CODE_COMMUNICATIONS_AND_CDC_CONTROL; bInterfaceSubClass:USB_SUBCLASS_CDC_ACM; bInterfaceProtocol:USB_PROTOCOL_CDC_ACM_AT_V25TER),  
(bInterfaceClass:USB_CLASS_CODE_COMMUNICATIONS_AND_CDC_CONTROL; bInterfaceSubClass:USB_SUBCLASS_CDC_ACM; bInterfaceProtocol:USB_PROTOCOL_CDC_ACM_AT_PCCA101),  
(bInterfaceClass:USB_CLASS_CODE_COMMUNICATIONS_AND_CDC_CONTROL; bInterfaceSubClass:USB_SUBCLASS_CDC_ACM; bInterfaceProtocol:USB_PROTOCOL_CDC_ACM_AT_PCCA101_WAKE),  
(bInterfaceClass:USB_CLASS_CODE_COMMUNICATIONS_AND_CDC_CONTROL; bInterfaceSubClass:USB_SUBCLASS_CDC_ACM; bInterfaceProtocol:USB_PROTOCOL_CDC_ACM_AT_GSM),  
(bInterfaceClass:USB_CLASS_CODE_COMMUNICATIONS_AND_CDC_CONTROL; bInterfaceSubClass:USB_SUBCLASS_CDC_ACM; bInterfaceProtocol:USB_PROTOCOL_CDC_ACM_AT_3G),  
(bInterfaceClass:USB_CLASS_CODE_COMMUNICATIONS_AND_CDC_CONTROL; bInterfaceSubClass:USB_SUBCLASS_CDC_ACM; bInterfaceProtocol:USB_PROTOCOL_CDC_ACM_AT_CDMA));  


CDC ACM device and interface Id CDCACM_DEVICE_INTERFACE_ID_*
CDCACM_DEVICE_INTERFACE_ID_COUNT = 58; Number of supported Device and Interface IDs
 
CDCACM_DEVICE_INTERFACE_ID:array[0..CDCACM_DEVICE_INTERFACE_ID_COUNT - 1] of TUSBDeviceAndInterfaceId = (
Nokia S60 phones expose two ACM channels. The first is a modem and is picked up by the standard AT-command information below. The second is 'vendor-specific' but is treated as a serial device.
Other USB_CLASS_CODE_COMMUNICATIONS_AND_CDC_CONTROL/USB_SUBCLASS_CDC_ACM/USB_PROTOCOL_CDC_ACM_VENDOR devices are likely to be Microsoft RNDIS not a modem.
(idVendor:$0421; idProduct:$042D;bInterfaceClass:USB_CLASS_CODE_COMMUNICATIONS_AND_CDC_CONTROL; bInterfaceSubClass:USB_SUBCLASS_CDC_ACM; bInterfaceProtocol:USB_PROTOCOL_CDC_ACM_VENDOR), Nokia 3250
(idVendor:$0421; idProduct:$04D8;bInterfaceClass:USB_CLASS_CODE_COMMUNICATIONS_AND_CDC_CONTROL; bInterfaceSubClass:USB_SUBCLASS_CDC_ACM; bInterfaceProtocol:USB_PROTOCOL_CDC_ACM_VENDOR), Nokia 5500 Sport
(idVendor:$0421; idProduct:$04C9;bInterfaceClass:USB_CLASS_CODE_COMMUNICATIONS_AND_CDC_CONTROL; bInterfaceSubClass:USB_SUBCLASS_CDC_ACM; bInterfaceProtocol:USB_PROTOCOL_CDC_ACM_VENDOR), Nokia E50
(idVendor:$0421; idProduct:$0419;bInterfaceClass:USB_CLASS_CODE_COMMUNICATIONS_AND_CDC_CONTROL; bInterfaceSubClass:USB_SUBCLASS_CDC_ACM; bInterfaceProtocol:USB_PROTOCOL_CDC_ACM_VENDOR), Nokia E60
(idVendor:$0421; idProduct:$044D;bInterfaceClass:USB_CLASS_CODE_COMMUNICATIONS_AND_CDC_CONTROL; bInterfaceSubClass:USB_SUBCLASS_CDC_ACM; bInterfaceProtocol:USB_PROTOCOL_CDC_ACM_VENDOR), Nokia E61
(idVendor:$0421; idProduct:$0001;bInterfaceClass:USB_CLASS_CODE_COMMUNICATIONS_AND_CDC_CONTROL; bInterfaceSubClass:USB_SUBCLASS_CDC_ACM; bInterfaceProtocol:USB_PROTOCOL_CDC_ACM_VENDOR), Nokia E61i
(idVendor:$0421; idProduct:$0475;bInterfaceClass:USB_CLASS_CODE_COMMUNICATIONS_AND_CDC_CONTROL; bInterfaceSubClass:USB_SUBCLASS_CDC_ACM; bInterfaceProtocol:USB_PROTOCOL_CDC_ACM_VENDOR), Nokia E62
(idVendor:$0421; idProduct:$0508;bInterfaceClass:USB_CLASS_CODE_COMMUNICATIONS_AND_CDC_CONTROL; bInterfaceSubClass:USB_SUBCLASS_CDC_ACM; bInterfaceProtocol:USB_PROTOCOL_CDC_ACM_VENDOR), Nokia E65
(idVendor:$0421; idProduct:$0418;bInterfaceClass:USB_CLASS_CODE_COMMUNICATIONS_AND_CDC_CONTROL; bInterfaceSubClass:USB_SUBCLASS_CDC_ACM; bInterfaceProtocol:USB_PROTOCOL_CDC_ACM_VENDOR), Nokia E70
(idVendor:$0421; idProduct:$0425;bInterfaceClass:USB_CLASS_CODE_COMMUNICATIONS_AND_CDC_CONTROL; bInterfaceSubClass:USB_SUBCLASS_CDC_ACM; bInterfaceProtocol:USB_PROTOCOL_CDC_ACM_VENDOR), Nokia N71
(idVendor:$0421; idProduct:$0486;bInterfaceClass:USB_CLASS_CODE_COMMUNICATIONS_AND_CDC_CONTROL; bInterfaceSubClass:USB_SUBCLASS_CDC_ACM; bInterfaceProtocol:USB_PROTOCOL_CDC_ACM_VENDOR), Nokia N73
(idVendor:$0421; idProduct:$04DF;bInterfaceClass:USB_CLASS_CODE_COMMUNICATIONS_AND_CDC_CONTROL; bInterfaceSubClass:USB_SUBCLASS_CDC_ACM; bInterfaceProtocol:USB_PROTOCOL_CDC_ACM_VENDOR), Nokia N75
(idVendor:$0421; idProduct:$000e;bInterfaceClass:USB_CLASS_CODE_COMMUNICATIONS_AND_CDC_CONTROL; bInterfaceSubClass:USB_SUBCLASS_CDC_ACM; bInterfaceProtocol:USB_PROTOCOL_CDC_ACM_VENDOR), Nokia N77
(idVendor:$0421; idProduct:$0445;bInterfaceClass:USB_CLASS_CODE_COMMUNICATIONS_AND_CDC_CONTROL; bInterfaceSubClass:USB_SUBCLASS_CDC_ACM; bInterfaceProtocol:USB_PROTOCOL_CDC_ACM_VENDOR), Nokia N80
(idVendor:$0421; idProduct:$042F;bInterfaceClass:USB_CLASS_CODE_COMMUNICATIONS_AND_CDC_CONTROL; bInterfaceSubClass:USB_SUBCLASS_CDC_ACM; bInterfaceProtocol:USB_PROTOCOL_CDC_ACM_VENDOR), Nokia N91 & N91 8GB
(idVendor:$0421; idProduct:$048E;bInterfaceClass:USB_CLASS_CODE_COMMUNICATIONS_AND_CDC_CONTROL; bInterfaceSubClass:USB_SUBCLASS_CDC_ACM; bInterfaceProtocol:USB_PROTOCOL_CDC_ACM_VENDOR), Nokia N92
(idVendor:$0421; idProduct:$0420;bInterfaceClass:USB_CLASS_CODE_COMMUNICATIONS_AND_CDC_CONTROL; bInterfaceSubClass:USB_SUBCLASS_CDC_ACM; bInterfaceProtocol:USB_PROTOCOL_CDC_ACM_VENDOR), Nokia N93
(idVendor:$0421; idProduct:$04E6;bInterfaceClass:USB_CLASS_CODE_COMMUNICATIONS_AND_CDC_CONTROL; bInterfaceSubClass:USB_SUBCLASS_CDC_ACM; bInterfaceProtocol:USB_PROTOCOL_CDC_ACM_VENDOR), Nokia N93i
(idVendor:$0421; idProduct:$04B2;bInterfaceClass:USB_CLASS_CODE_COMMUNICATIONS_AND_CDC_CONTROL; bInterfaceSubClass:USB_SUBCLASS_CDC_ACM; bInterfaceProtocol:USB_PROTOCOL_CDC_ACM_VENDOR), Nokia 5700 XpressMusic
(idVendor:$0421; idProduct:$0134;bInterfaceClass:USB_CLASS_CODE_COMMUNICATIONS_AND_CDC_CONTROL; bInterfaceSubClass:USB_SUBCLASS_CDC_ACM; bInterfaceProtocol:USB_PROTOCOL_CDC_ACM_VENDOR), Nokia 6110 Navigator (China)
(idVendor:$0421; idProduct:$046E;bInterfaceClass:USB_CLASS_CODE_COMMUNICATIONS_AND_CDC_CONTROL; bInterfaceSubClass:USB_SUBCLASS_CDC_ACM; bInterfaceProtocol:USB_PROTOCOL_CDC_ACM_VENDOR), Nokia 6110 Navigator
(idVendor:$0421; idProduct:$002f;bInterfaceClass:USB_CLASS_CODE_COMMUNICATIONS_AND_CDC_CONTROL; bInterfaceSubClass:USB_SUBCLASS_CDC_ACM; bInterfaceProtocol:USB_PROTOCOL_CDC_ACM_VENDOR), Nokia 6120 classic &
(idVendor:$0421; idProduct:$0088;bInterfaceClass:USB_CLASS_CODE_COMMUNICATIONS_AND_CDC_CONTROL; bInterfaceSubClass:USB_SUBCLASS_CDC_ACM; bInterfaceProtocol:USB_PROTOCOL_CDC_ACM_VENDOR), Nokia 6121 classic
(idVendor:$0421; idProduct:$00fc;bInterfaceClass:USB_CLASS_CODE_COMMUNICATIONS_AND_CDC_CONTROL; bInterfaceSubClass:USB_SUBCLASS_CDC_ACM; bInterfaceProtocol:USB_PROTOCOL_CDC_ACM_VENDOR), Nokia 6124 classic
(idVendor:$0421; idProduct:$0042;bInterfaceClass:USB_CLASS_CODE_COMMUNICATIONS_AND_CDC_CONTROL; bInterfaceSubClass:USB_SUBCLASS_CDC_ACM; bInterfaceProtocol:USB_PROTOCOL_CDC_ACM_VENDOR), Nokia E51
(idVendor:$0421; idProduct:$00b0;bInterfaceClass:USB_CLASS_CODE_COMMUNICATIONS_AND_CDC_CONTROL; bInterfaceSubClass:USB_SUBCLASS_CDC_ACM; bInterfaceProtocol:USB_PROTOCOL_CDC_ACM_VENDOR), Nokia E66
(idVendor:$0421; idProduct:$00ab;bInterfaceClass:USB_CLASS_CODE_COMMUNICATIONS_AND_CDC_CONTROL; bInterfaceSubClass:USB_SUBCLASS_CDC_ACM; bInterfaceProtocol:USB_PROTOCOL_CDC_ACM_VENDOR), Nokia E71
(idVendor:$0421; idProduct:$0481;bInterfaceClass:USB_CLASS_CODE_COMMUNICATIONS_AND_CDC_CONTROL; bInterfaceSubClass:USB_SUBCLASS_CDC_ACM; bInterfaceProtocol:USB_PROTOCOL_CDC_ACM_VENDOR), Nokia N76
(idVendor:$0421; idProduct:$0007;bInterfaceClass:USB_CLASS_CODE_COMMUNICATIONS_AND_CDC_CONTROL; bInterfaceSubClass:USB_SUBCLASS_CDC_ACM; bInterfaceProtocol:USB_PROTOCOL_CDC_ACM_VENDOR), Nokia N81 & N81 8GB
(idVendor:$0421; idProduct:$0071;bInterfaceClass:USB_CLASS_CODE_COMMUNICATIONS_AND_CDC_CONTROL; bInterfaceSubClass:USB_SUBCLASS_CDC_ACM; bInterfaceProtocol:USB_PROTOCOL_CDC_ACM_VENDOR), Nokia N82
(idVendor:$0421; idProduct:$04F0;bInterfaceClass:USB_CLASS_CODE_COMMUNICATIONS_AND_CDC_CONTROL; bInterfaceSubClass:USB_SUBCLASS_CDC_ACM; bInterfaceProtocol:USB_PROTOCOL_CDC_ACM_VENDOR), Nokia N95 & N95-3 NAM
(idVendor:$0421; idProduct:$0070;bInterfaceClass:USB_CLASS_CODE_COMMUNICATIONS_AND_CDC_CONTROL; bInterfaceSubClass:USB_SUBCLASS_CDC_ACM; bInterfaceProtocol:USB_PROTOCOL_CDC_ACM_VENDOR), Nokia N95 8GB
(idVendor:$0421; idProduct:$00e9;bInterfaceClass:USB_CLASS_CODE_COMMUNICATIONS_AND_CDC_CONTROL; bInterfaceSubClass:USB_SUBCLASS_CDC_ACM; bInterfaceProtocol:USB_PROTOCOL_CDC_ACM_VENDOR), Nokia 5320 XpressMusic
(idVendor:$0421; idProduct:$0099;bInterfaceClass:USB_CLASS_CODE_COMMUNICATIONS_AND_CDC_CONTROL; bInterfaceSubClass:USB_SUBCLASS_CDC_ACM; bInterfaceProtocol:USB_PROTOCOL_CDC_ACM_VENDOR), Nokia 6210 Navigator, RM-367
(idVendor:$0421; idProduct:$0128;bInterfaceClass:USB_CLASS_CODE_COMMUNICATIONS_AND_CDC_CONTROL; bInterfaceSubClass:USB_SUBCLASS_CDC_ACM; bInterfaceProtocol:USB_PROTOCOL_CDC_ACM_VENDOR), Nokia 6210 Navigator, RM-419
(idVendor:$0421; idProduct:$008f;bInterfaceClass:USB_CLASS_CODE_COMMUNICATIONS_AND_CDC_CONTROL; bInterfaceSubClass:USB_SUBCLASS_CDC_ACM; bInterfaceProtocol:USB_PROTOCOL_CDC_ACM_VENDOR), Nokia 6220 Classic
(idVendor:$0421; idProduct:$00a0;bInterfaceClass:USB_CLASS_CODE_COMMUNICATIONS_AND_CDC_CONTROL; bInterfaceSubClass:USB_SUBCLASS_CDC_ACM; bInterfaceProtocol:USB_PROTOCOL_CDC_ACM_VENDOR), Nokia 6650
(idVendor:$0421; idProduct:$007b;bInterfaceClass:USB_CLASS_CODE_COMMUNICATIONS_AND_CDC_CONTROL; bInterfaceSubClass:USB_SUBCLASS_CDC_ACM; bInterfaceProtocol:USB_PROTOCOL_CDC_ACM_VENDOR), Nokia N78
(idVendor:$0421; idProduct:$0094;bInterfaceClass:USB_CLASS_CODE_COMMUNICATIONS_AND_CDC_CONTROL; bInterfaceSubClass:USB_SUBCLASS_CDC_ACM; bInterfaceProtocol:USB_PROTOCOL_CDC_ACM_VENDOR), Nokia N85
(idVendor:$0421; idProduct:$003a;bInterfaceClass:USB_CLASS_CODE_COMMUNICATIONS_AND_CDC_CONTROL; bInterfaceSubClass:USB_SUBCLASS_CDC_ACM; bInterfaceProtocol:USB_PROTOCOL_CDC_ACM_VENDOR), Nokia N96 & N96-3
(idVendor:$0421; idProduct:$00e9;bInterfaceClass:USB_CLASS_CODE_COMMUNICATIONS_AND_CDC_CONTROL; bInterfaceSubClass:USB_SUBCLASS_CDC_ACM; bInterfaceProtocol:USB_PROTOCOL_CDC_ACM_VENDOR), Nokia 5320 XpressMusic
(idVendor:$0421; idProduct:$0108;bInterfaceClass:USB_CLASS_CODE_COMMUNICATIONS_AND_CDC_CONTROL; bInterfaceSubClass:USB_SUBCLASS_CDC_ACM; bInterfaceProtocol:USB_PROTOCOL_CDC_ACM_VENDOR), Nokia 5320 XpressMusic 2G
(idVendor:$0421; idProduct:$01f5;bInterfaceClass:USB_CLASS_CODE_COMMUNICATIONS_AND_CDC_CONTROL; bInterfaceSubClass:USB_SUBCLASS_CDC_ACM; bInterfaceProtocol:USB_PROTOCOL_CDC_ACM_VENDOR), Nokia N97, RM-505
(idVendor:$0421; idProduct:$02e3;bInterfaceClass:USB_CLASS_CODE_COMMUNICATIONS_AND_CDC_CONTROL; bInterfaceSubClass:USB_SUBCLASS_CDC_ACM; bInterfaceProtocol:USB_PROTOCOL_CDC_ACM_VENDOR), Nokia 5230, RM-588
(idVendor:$0421; idProduct:$0178;bInterfaceClass:USB_CLASS_CODE_COMMUNICATIONS_AND_CDC_CONTROL; bInterfaceSubClass:USB_SUBCLASS_CDC_ACM; bInterfaceProtocol:USB_PROTOCOL_CDC_ACM_VENDOR), Nokia E63
(idVendor:$0421; idProduct:$010e;bInterfaceClass:USB_CLASS_CODE_COMMUNICATIONS_AND_CDC_CONTROL; bInterfaceSubClass:USB_SUBCLASS_CDC_ACM; bInterfaceProtocol:USB_PROTOCOL_CDC_ACM_VENDOR), Nokia E75
(idVendor:$0421; idProduct:$02d9;bInterfaceClass:USB_CLASS_CODE_COMMUNICATIONS_AND_CDC_CONTROL; bInterfaceSubClass:USB_SUBCLASS_CDC_ACM; bInterfaceProtocol:USB_PROTOCOL_CDC_ACM_VENDOR), Nokia 6760 Slide
(idVendor:$0421; idProduct:$01d0;bInterfaceClass:USB_CLASS_CODE_COMMUNICATIONS_AND_CDC_CONTROL; bInterfaceSubClass:USB_SUBCLASS_CDC_ACM; bInterfaceProtocol:USB_PROTOCOL_CDC_ACM_VENDOR), Nokia E52
(idVendor:$0421; idProduct:$0223;bInterfaceClass:USB_CLASS_CODE_COMMUNICATIONS_AND_CDC_CONTROL; bInterfaceSubClass:USB_SUBCLASS_CDC_ACM; bInterfaceProtocol:USB_PROTOCOL_CDC_ACM_VENDOR), Nokia E72
(idVendor:$0421; idProduct:$0275;bInterfaceClass:USB_CLASS_CODE_COMMUNICATIONS_AND_CDC_CONTROL; bInterfaceSubClass:USB_SUBCLASS_CDC_ACM; bInterfaceProtocol:USB_PROTOCOL_CDC_ACM_VENDOR), Nokia X6
(idVendor:$0421; idProduct:$026c;bInterfaceClass:USB_CLASS_CODE_COMMUNICATIONS_AND_CDC_CONTROL; bInterfaceSubClass:USB_SUBCLASS_CDC_ACM; bInterfaceProtocol:USB_PROTOCOL_CDC_ACM_VENDOR), Nokia N97 Mini
(idVendor:$0421; idProduct:$0154;bInterfaceClass:USB_CLASS_CODE_COMMUNICATIONS_AND_CDC_CONTROL; bInterfaceSubClass:USB_SUBCLASS_CDC_ACM; bInterfaceProtocol:USB_PROTOCOL_CDC_ACM_VENDOR), Nokia 5800 XpressMusic
(idVendor:$0421; idProduct:$04ce;bInterfaceClass:USB_CLASS_CODE_COMMUNICATIONS_AND_CDC_CONTROL; bInterfaceSubClass:USB_SUBCLASS_CDC_ACM; bInterfaceProtocol:USB_PROTOCOL_CDC_ACM_VENDOR), Nokia E90
(idVendor:$0421; idProduct:$01d4;bInterfaceClass:USB_CLASS_CODE_COMMUNICATIONS_AND_CDC_CONTROL; bInterfaceSubClass:USB_SUBCLASS_CDC_ACM; bInterfaceProtocol:USB_PROTOCOL_CDC_ACM_VENDOR), Nokia E55
(idVendor:$0421; idProduct:$0302;bInterfaceClass:USB_CLASS_CODE_COMMUNICATIONS_AND_CDC_CONTROL; bInterfaceSubClass:USB_SUBCLASS_CDC_ACM; bInterfaceProtocol:USB_PROTOCOL_CDC_ACM_VENDOR), Nokia N8
(idVendor:$0421; idProduct:$0335;bInterfaceClass:USB_CLASS_CODE_COMMUNICATIONS_AND_CDC_CONTROL; bInterfaceSubClass:USB_SUBCLASS_CDC_ACM; bInterfaceProtocol:USB_PROTOCOL_CDC_ACM_VENDOR), Nokia E7
(idVendor:$0421; idProduct:$03cd;bInterfaceClass:USB_CLASS_CODE_COMMUNICATIONS_AND_CDC_CONTROL; bInterfaceSubClass:USB_SUBCLASS_CDC_ACM; bInterfaceProtocol:USB_PROTOCOL_CDC_ACM_VENDOR), Nokia C7
(idVendor:$04e7; idProduct:$6651;bInterfaceClass:USB_CLASS_CODE_COMMUNICATIONS_AND_CDC_CONTROL; bInterfaceSubClass:USB_SUBCLASS_CDC_ACM; bInterfaceProtocol:USB_PROTOCOL_CDC_ACM_VENDOR)); Samsung GTi8510 (INNOV8)


Type definitions



CDC ACM device Id

PCDCACMDeviceId = ^TCDCACMDeviceId;

TCDCACMDeviceId = record

idVendor:Word;  
idProduct:Word;  
Quirks:LongWord;  

CDC ACM device

PCDCACMDevice = ^TCDCACMDevice;

TCDCACMDevice = record

Serial Properties
Serial:TSerialDevice;  
USB Properties
Quirks:LongWord; Unusual behaviours of specific chip versions
ReceiveSize:LongWord; Maximum Receive size for Bulk IN Endpoint
TransmitSize:LongWord; Maximum Transmit size for Bulk OUT Endpoint
ReceiveActive:LongBool; True if a Receive request is currently in progress
TransmitActive:LongBool; True if a Transmit request is currently in progress
DataInterface:PUSBInterface; USB interface for data requests
ControlInterface:PUSBInterface; USB interface for control requests
ReceiveRequest:PUSBRequest; USB request Bulk IN Endpoint
ReceiveEndpoint:PUSBEndpointDescriptor; CDC ACM Bulk IN Endpoint
TransmitRequest:PUSBRequest; USB request for Bulk OUT Endpoint
TransmitEndpoint:PUSBEndpointDescriptor; CDC ACM Bulk OUT Endpoint
InterruptRequest:PUSBRequest; USB request for Interrupt IN Endpoint
InterruptEndpoint:PUSBEndpointDescriptor; CDC ACM Interrupt IN Endpoint
PendingCount:LongWord; Number of USB requests pending for this device
WaiterThread:TThreadId; Thread waiting for pending requests to complete (for device detachment)
Statistics Properties
ReceiveComplete:LongWord;  
TransmitComplete:LongWord;  
InterruptComplete:LongWord;  
InterruptErrors:LongWord;  


Public variables


None defined

Function declarations



Initialization functions

procedure CDCACMInit;
Description: To be documented
Note None documented


CDC ACM serial functions

function CDCACMSerialDeviceOpen(Serial:PSerialDevice; BaudRate,DataBits,StopBits,Parity,FlowControl,ReceiveDepth,TransmitDepth:LongWord):LongWord;
Description: Implementation of SerialDeviceOpen API for CDCACM Serial
Note Not intended to be called directly by applications, use SerialDeviceOpen instead.


function CDCACMSerialDeviceClose(Serial:PSerialDevice):LongWord;
Description: Implementation of SerialDeviceClose API for CDCACM Serial
Note Not intended to be called directly by applications, use SerialDeviceClose instead.


function CDCACMSerialDeviceRead(Serial:PSerialDevice; Buffer:Pointer; Size,Flags:LongWord; var Count:LongWord):LongWord;
Description: Implementation of SerialDeviceRead API for CDCACM Serial
Note Not intended to be called directly by applications, use SerialDeviceRead instead.


function CDCACMSerialDeviceWrite(Serial:PSerialDevice; Buffer:Pointer; Size,Flags:LongWord; var Count:LongWord):LongWord;
Description: Implementation of SerialDeviceWrite API for CDCACM Serial
Note Not intended to be called directly by applications, use SerialDeviceWrite instead.


CDC ACM USB functions

function CDCACMDriverBind(Device:PUSBDevice; Interrface:PUSBInterface):LongWord;
Description: Bind the CDC ACM driver to a USB device if it is suitable
Device The USB device to attempt to bind to
Interrface The USB interface to attempt to bind to (or nil for whole device)
Return USB_STATUS_SUCCESS if completed, USB_STATUS_DEVICE_UNSUPPORTED if unsupported or another error code on failure.


function CDCACMDriverUnbind(Device:PUSBDevice; Interrface:PUSBInterface):LongWord;
Description: Unbind the CDC ACM driver from a USB device
Device The USB device to unbind from
Interrface The USB interface to unbind from (or nil for whole device)
Return USB_STATUS_SUCCESS if completed or another error code on failure


procedure CDCACMReceiveStart(Request:PUSBRequest);
Description: Called to continue reception of data to the receive buffer
Request The USB receive request to use
Note Caller must hold the lock on the serial device


procedure CDCACMReceiveWorker(Request:PUSBRequest);
Description: Called (by a Worker thread) to process a completed USB request from the CDC ACM bulk IN endpoint
Request The USB request which has completed


procedure CDCACMReceiveComplete(Request:PUSBRequest);
Description: Called when a USB request from the CDC ACM bulk IN endpoint completes
Request The USB request which has completed
Note Request is passed to worker thread for processing to prevent blocking the USB completion


procedure CDCACMTransmitStart(Request:PUSBRequest);
Description: Called to continue transmission of data from the transmit buffer
Request The USB transmit request to use
Note Caller must hold the lock on the serial device


procedure CDCACMTransmitWorker(Request:PUSBRequest);
Description: Called (by a Worker thread) to process a completed USB request to the CDC ACM bulk OUT endpoint
Request The USB request which has completed


procedure CDCACMTransmitComplete(Request:PUSBRequest);
Description: Called when a USB request to the CDC ACM bulk OUT endpoint completes
Request The USB request which has completed
Note Request is passed to worker thread for processing to prevent blocking the USB completion


procedure CDCACMInterruptWorker(Request:PUSBRequest);
Description: Called (by a Worker thread) to process a completed USB request to the CDC ACM interrupt IN endpoint
Request The USB request which has completed


procedure CDCACMInterruptComplete(Request:PUSBRequest);
Description: Called when a USB request from the CDC ACM interrupt IN endpoint completes
Request The USB request which has completed
Note Request is passed to worker thread for processing to prevent blocking the USB completion


CDC ACM helper functions

function CDCACMCheckDevice(Device:PUSBDevice; var Quirks:LongWord):LongWord;
Description: Check the Vendor and Device Id against the supported devices
Device USB device to check
Quirks Return value for any device specific quirks (eg CDCACM_QUIRK_NO_UNION_NORMAL)
Return USB_STATUS_SUCCESS if completed or another error code on failure


function CDCACMCheckInterface(Device:PUSBDevice; Interrface:PUSBInterface):LongWord;
Description: Check the Interface against the supported devices
Device USB device to check
Interrface USB interface to check
Return USB_STATUS_SUCCESS if completed or another error code on failure


function CDCACMCheckDeviceAndInterface(Device:PUSBDevice; Interrface:PUSBInterface):LongWord;
Description: Check the Device and Interface against the supported devices
Device USB device to check
Interrface USB interface to check
Return USB_STATUS_SUCCESS if completed or another error code on failure


function CDCACMFindInterfaces(Device:PUSBDevice; Interrface:PUSBInterface; var DataInterface,ControlInterface:PUSBInterface; Quirks:LongWord; var Capabilities:Byte):LongWord;
Description: Locate the data and control interfaces from the functional descriptors
Device USB device to check
Interrface USB interface to check (Optional)
DataInterface Return value for the located data interface
ControlInterface Return value for the located control interface
Quirks Any known quirks for this device from identification (eg CDCACM_QUIRK_NO_UNION_NORMAL)
Capabilities Return value for ACM capabilities (eg USB_CDC_ACM_CAP_LINE)
Return USB_STATUS_SUCCESS if completed or another error code on failure


function CDCACMControlRequest(Serial:PCDCACMDevice; Request:Byte; Value:Word; Data:Pointer;Size:Word):LongWord;
Description: To be documented
Note None documented


function CDCACMGetLineRequest(Serial:PCDCACMDevice; var LineCoding:TUSBCDCLineCoding):LongWord;
Description: To be documented
Note None documented


function CDCACMSetLineRequest(Serial:PCDCACMDevice; const LineCoding:TUSBCDCLineCoding):LongWord;
Description: To be documented
Note None documented


function CDCACMSetControlRequest(Serial:PCDCACMDevice; Control:Word):LongWord;
Description: To be documented
Note None documented


Return to Unit Reference