Difference between revisions of "Unit USBCDCACM"
Line 68: | Line 68: | ||
<br /> | <br /> | ||
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;"> | <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 | + | <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;"> | <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;" | ||
Line 79: | Line 79: | ||
<br /> | <br /> | ||
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;"> | <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 | + | <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;"> | <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;" | ||
Line 114: | Line 114: | ||
<br /> | <br /> | ||
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;"> | <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 | + | <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;"> | <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;" | ||
Line 256: | Line 256: | ||
<br /> | <br /> | ||
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;"> | <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 | + | <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;"> | <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;" | ||
Line 293: | Line 293: | ||
<br /> | <br /> | ||
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;"> | <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 | + | <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;"> | <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;" |
Revision as of 04:55, 27 March 2017
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 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