Difference between revisions of "Unit USBCDCACM"
(3 intermediate revisions by the same user not shown) | |||
Line 108: | Line 108: | ||
|- | |- | ||
| <code>CDCACM_QUIRK_SEND_ZERO_PACKET = $00000080;</code> | | <code>CDCACM_QUIRK_SEND_ZERO_PACKET = $00000080;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>CDCACM_QUIRK_DISABLE_ECHO = $00000100;</code> | ||
| | | | ||
|- | |- | ||
Line 118: | Line 121: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | | <code>CDCACM_DEVICE_ID_COUNT = | + | | <code>CDCACM_DEVICE_ID_COUNT = 49;</code> |
| Number of supported Device IDs | | Number of supported Device IDs | ||
|- | |- | ||
Line 136: | Line 139: | ||
| <code>(idVendor:$0e8d;idProduct:$0003;Quirks:CDCACM_QUIRK_NO_UNION_NORMAL),</code> | | <code>(idVendor:$0e8d;idProduct:$0003;Quirks:CDCACM_QUIRK_NO_UNION_NORMAL),</code> | ||
| FIREFLY, MediaTek Inc (has no union descriptor) | | 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> | | <code>(idVendor:$0e8d;idProduct:$3329;Quirks:CDCACM_QUIRK_NO_UNION_NORMAL),</code> | ||
Line 154: | Line 160: | ||
| <code>(idVendor:$0ace;idProduct:$1611;Quirks:CDCACM_QUIRK_SINGLE_RX_URB),</code> | | <code>(idVendor:$0ace;idProduct:$1611;Quirks:CDCACM_QUIRK_SINGLE_RX_URB),</code> | ||
| ZyDAS 56K USB MODEM - new version (firmware bug) | | 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> | | <code>(idVendor:$22b8;idProduct:$7000;Quirks:CDCACM_QUIRK_NO_UNION_NORMAL),</code> | ||
Line 169: | Line 181: | ||
| <code>(idVendor:$0572;idProduct:$1328;Quirks:CDCACM_QUIRK_NO_UNION_NORMAL),</code> | | <code>(idVendor:$0572;idProduct:$1328;Quirks:CDCACM_QUIRK_NO_UNION_NORMAL),</code> | ||
| Shiro/Aztech USB MODEM UM-3100 (has no union descriptor) | | 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> | | <code>(idVendor:$20df;idProduct:$0001;Quirks:CDCACM_QUIRK_CONTROL_LINE_STATE),</code> | ||
Line 175: | Line 190: | ||
| <code>(idVendor:$2184;idProduct:$001c;Quirks:CDCACM_QUIRK_NONE),</code> | | <code>(idVendor:$2184;idProduct:$001c;Quirks:CDCACM_QUIRK_NONE),</code> | ||
| GW Instek AFG-2225 | | 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> | | <code>(idVendor:$22b8;idProduct:$6425;Quirks:CDCACM_QUIRK_NONE),</code> | ||
Line 219: | Line 237: | ||
| <code>(idVendor:$1576;idProduct:$03b1;Quirks:CDCACM_QUIRK_NO_UNION_NORMAL),</code> | | <code>(idVendor:$1576;idProduct:$03b1;Quirks:CDCACM_QUIRK_NO_UNION_NORMAL),</code> | ||
| Maretron USB100 (reports zero length descriptor) | | 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> | | <code>(idVendor:$2912;idProduct:$0001;Quirks:CDCACM_QUIRK_CLEAR_HALT_CONDITIONS),</code> | ||
Line 248: | Line 275: | ||
| <code>(idVendor:$058b;idProduct:$0041;Quirks:CDCACM_QUIRK_IGNORE_DEVICE),</code> | | <code>(idVendor:$058b;idProduct:$0041;Quirks:CDCACM_QUIRK_IGNORE_DEVICE),</code> | ||
| | | | ||
+ | |- | ||
+ | | <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> | | <code>(idVendor:$1519;idProduct:$0452;Quirks:CDCACM_QUIRK_SEND_ZERO_PACKET));</code> | ||
Line 535: | Line 568: | ||
| <code>TransmitSize:LongWord;</code> | | <code>TransmitSize:LongWord;</code> | ||
| Maximum Transmit size for Bulk OUT Endpoint | | Maximum Transmit size for Bulk OUT Endpoint | ||
+ | |- | ||
+ | | <code>ReceiveActive:LongBool;</code> | ||
+ | | True if a Receive request is currently in progress | ||
|- | |- | ||
| <code>TransmitActive:LongBool;</code> | | <code>TransmitActive:LongBool;</code> | ||
Line 604: | Line 640: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Note |
| None documented | | None documented | ||
|- | |- | ||
Line 615: | Line 651: | ||
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | <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> | <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:''' | + | <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;"> | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Note |
− | | | + | | Not intended to be called directly by applications, use SerialDeviceOpen instead. |
|- | |- | ||
|} | |} | ||
Line 627: | Line 663: | ||
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | <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> | <pre style="border: 0; padding-bottom:0px;">function CDCACMSerialDeviceClose(Serial:PSerialDevice):LongWord;</pre> | ||
− | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' | + | <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;"> | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Note |
− | | | + | | Not intended to be called directly by applications, use SerialDeviceClose instead. |
|- | |- | ||
|} | |} | ||
Line 639: | Line 675: | ||
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | <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> | <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:''' | + | <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;"> | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Note |
− | | | + | | Not intended to be called directly by applications, use SerialDeviceRead instead. |
|- | |- | ||
|} | |} | ||
Line 651: | Line 687: | ||
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | <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> | <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:''' | + | <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;"> | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Note |
− | | | + | | Not intended to be called directly by applications, use SerialDeviceWrite instead. |
|- | |- | ||
|} | |} | ||
Line 670: | Line 706: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Device |
| The USB device to attempt to bind to | | The USB device to attempt to bind to | ||
|- | |- | ||
− | ! | + | ! Interrface |
| The USB interface to attempt to bind to (or nil for whole device) | | 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 | + | | USB_STATUS_SUCCESS if completed, USB_STATUS_DEVICE_UNSUPPORTED if unsupported or another error code on failure. |
|- | |- | ||
|} | |} | ||
Line 688: | Line 724: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Device |
| The USB device to unbind from | | The USB device to unbind from | ||
|- | |- | ||
− | ! | + | ! Interrface |
| The USB interface to unbind from (or nil for whole device) | | The USB interface to unbind from (or nil for whole device) | ||
|- | |- | ||
− | ! | + | ! Return |
| USB_STATUS_SUCCESS if completed or another error code on failure | | USB_STATUS_SUCCESS if completed or another error code on failure | ||
|- | |- | ||
Line 700: | Line 736: | ||
</div></div> | </div></div> | ||
<br /> | <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;"> | <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> | <pre style="border: 0; padding-bottom:0px;">procedure CDCACMReceiveWorker(Request:PUSBRequest);</pre> | ||
Line 706: | Line 757: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Request |
| The USB request which has completed | | The USB request which has completed | ||
|- | |- | ||
Line 718: | Line 769: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Request |
| The USB request which has completed | | The USB request which has completed | ||
|- | |- | ||
− | ! | + | ! Note |
| Request is passed to worker thread for processing to prevent blocking the USB completion | | Request is passed to worker thread for processing to prevent blocking the USB completion | ||
|- | |- | ||
Line 733: | Line 784: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Request |
| The USB transmit request to use | | The USB transmit request to use | ||
|- | |- | ||
− | ! | + | ! Note |
| Caller must hold the lock on the serial device | | Caller must hold the lock on the serial device | ||
|- | |- | ||
Line 748: | Line 799: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Request |
| The USB request which has completed | | The USB request which has completed | ||
|- | |- | ||
Line 760: | Line 811: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Request |
| The USB request which has completed | | The USB request which has completed | ||
|- | |- | ||
− | ! | + | ! Note |
| Request is passed to worker thread for processing to prevent blocking the USB completion | | Request is passed to worker thread for processing to prevent blocking the USB completion | ||
|- | |- | ||
Line 775: | Line 826: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Request |
| The USB request which has completed | | The USB request which has completed | ||
|- | |- | ||
Line 787: | Line 838: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Request |
| The USB request which has completed | | The USB request which has completed | ||
|- | |- | ||
− | ! | + | ! Note |
| Request is passed to worker thread for processing to prevent blocking the USB completion | | Request is passed to worker thread for processing to prevent blocking the USB completion | ||
|- | |- | ||
Line 805: | Line 856: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Device |
| USB device to check | | USB device to check | ||
|- | |- | ||
− | ! | + | ! Quirks |
| Return value for any device specific quirks (eg CDCACM_QUIRK_NO_UNION_NORMAL) | | 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 | | USB_STATUS_SUCCESS if completed or another error code on failure | ||
|- | |- | ||
Line 823: | Line 874: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Device |
| USB device to check | | USB device to check | ||
|- | |- | ||
− | ! | + | ! Interrface |
| USB interface to check | | USB interface to check | ||
|- | |- | ||
− | ! | + | ! Return |
| USB_STATUS_SUCCESS if completed or another error code on failure | | USB_STATUS_SUCCESS if completed or another error code on failure | ||
|- | |- | ||
Line 841: | Line 892: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Device |
| USB device to check | | USB device to check | ||
|- | |- | ||
− | ! | + | ! Interrface |
| USB interface to check | | USB interface to check | ||
|- | |- | ||
− | ! | + | ! Return |
| USB_STATUS_SUCCESS if completed or another error code on failure | | USB_STATUS_SUCCESS if completed or another error code on failure | ||
|- | |- | ||
Line 859: | Line 910: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Device |
| USB device to check | | USB device to check | ||
|- | |- | ||
− | ! | + | ! Interrface |
| USB interface to check (Optional) | | USB interface to check (Optional) | ||
|- | |- | ||
− | ! | + | ! DataInterface |
| Return value for the located data interface | | Return value for the located data interface | ||
|- | |- | ||
− | ! | + | ! ControlInterface |
| Return value for the located control interface | | Return value for the located control interface | ||
|- | |- | ||
− | ! | + | ! Quirks |
| Any known quirks for this device from identification (eg CDCACM_QUIRK_NO_UNION_NORMAL) | | 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 value for ACM capabilities (eg USB_CDC_ACM_CAP_LINE) | ||
|- | |- | ||
− | ! | + | ! Return |
| USB_STATUS_SUCCESS if completed or another error code on failure | | USB_STATUS_SUCCESS if completed or another error code on failure | ||
|- | |- | ||
Line 889: | Line 940: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Note |
| None documented | | None documented | ||
|- | |- | ||
Line 901: | Line 952: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Note |
| None documented | | None documented | ||
|- | |- | ||
Line 913: | Line 964: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Note |
| None documented | | None documented | ||
|- | |- | ||
Line 925: | Line 976: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Note |
| None documented | | None documented | ||
|- | |- |
Latest revision as of 03:53, 10 May 2019
Return to Unit Reference
Contents
[hide]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
CDCACM_*
CDCACM_USB_REQUEST_*
CDCACM_QUIRK_*
CDCACM_DEVICE_ID_*
CDCACM_INTERFACE_ID_*
CDCACM_DEVICE_INTERFACE_ID_*
Type definitions
CDC ACM device Id
CDC ACM device
Public variables
None defined
Function declarations
Initialization functions
CDC ACM serial functions
function CDCACMSerialDeviceOpen(Serial:PSerialDevice; BaudRate,DataBits,StopBits,Parity,FlowControl,ReceiveDepth,TransmitDepth:LongWord):LongWord;
function CDCACMSerialDeviceClose(Serial:PSerialDevice):LongWord;
function CDCACMSerialDeviceRead(Serial:PSerialDevice; Buffer:Pointer; Size,Flags:LongWord; var Count:LongWord):LongWord;
function CDCACMSerialDeviceWrite(Serial:PSerialDevice; Buffer:Pointer; Size,Flags:LongWord; var Count:LongWord):LongWord;
CDC ACM USB functions
function CDCACMDriverBind(Device:PUSBDevice; Interrface:PUSBInterface):LongWord;
function CDCACMDriverUnbind(Device:PUSBDevice; Interrface:PUSBInterface):LongWord;
procedure CDCACMReceiveStart(Request:PUSBRequest);
procedure CDCACMReceiveWorker(Request:PUSBRequest);
procedure CDCACMReceiveComplete(Request:PUSBRequest);
procedure CDCACMTransmitStart(Request:PUSBRequest);
procedure CDCACMTransmitWorker(Request:PUSBRequest);
procedure CDCACMTransmitComplete(Request:PUSBRequest);
procedure CDCACMInterruptWorker(Request:PUSBRequest);
procedure CDCACMInterruptComplete(Request:PUSBRequest);
CDC ACM helper functions
function CDCACMCheckDevice(Device:PUSBDevice; var Quirks:LongWord):LongWord;
function CDCACMCheckInterface(Device:PUSBDevice; Interrface:PUSBInterface):LongWord;
function CDCACMCheckDeviceAndInterface(Device:PUSBDevice; Interrface:PUSBInterface):LongWord;
function CDCACMFindInterfaces(Device:PUSBDevice; Interrface:PUSBInterface; var DataInterface,ControlInterface:PUSBInterface; Quirks:LongWord; var Capabilities:Byte):LongWord;
function CDCACMControlRequest(Serial:PCDCACMDevice; Request:Byte; Value:Word; Data:Pointer;Size:Word):LongWord;
function CDCACMGetLineRequest(Serial:PCDCACMDevice; var LineCoding:TUSBCDCLineCoding):LongWord;
function CDCACMSetLineRequest(Serial:PCDCACMDevice; const LineCoding:TUSBCDCLineCoding):LongWord;
function CDCACMSetControlRequest(Serial:PCDCACMDevice; Control:Word):LongWord;
Return to Unit Reference