Difference between revisions of "Unit PL2303"
From Ultibo.org
(9 intermediate revisions by the same user not shown) | |||
Line 69: | Line 69: | ||
<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;">'''PL2303 device model | + | <div style="font-size: 14px; padding-left: 12px;">'''PL2303 device model''' <code> PL2303_TYPE_* </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 83: | Line 83: | ||
<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;">'''PL2303 bulk | + | <div style="font-size: 14px; padding-left: 12px;">'''PL2303 bulk in/out size''' <code> PL2303_BULK_* </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 97: | Line 97: | ||
<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;">'''PL2303 USB request | + | <div style="font-size: 14px; padding-left: 12px;">'''PL2303 USB request''' <code> PL2303_*_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 200: | Line 200: | ||
<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;">'''PL2303 device quirk | + | <div style="font-size: 14px; padding-left: 12px;">'''PL2303 device quirk''' <code> PL2303_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 211: | Line 211: | ||
|- | |- | ||
| <code>PL2303_QUIRK_LEGACY = $00000002;</code> | | <code>PL2303_QUIRK_LEGACY = $00000002;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>PL2303_QUIRK_ENDPOINT_HACK = $00000004;</code> | ||
| | | | ||
|- | |- | ||
Line 217: | Line 220: | ||
<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;">'''PL2303 supported baud rate | + | <div style="font-size: 14px; padding-left: 12px;">'''PL2303 supported baud rate''' <code> PL2303_SUPPORTED_BAUD_RATE_* </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 307: | Line 310: | ||
<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;">'''PL2303 vendor and product | + | <div style="font-size: 14px; padding-left: 12px;">'''PL2303 vendor and product Id''' <code> PL2303_*_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 315: | Line 318: | ||
|- | |- | ||
| <code>PL2303_PRODUCT_ID = $2303;</code> | | <code>PL2303_PRODUCT_ID = $2303;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>PL2303_PRODUCT_ID_TB = $2304;</code> | ||
| | | | ||
|- | |- | ||
Line 327: | Line 333: | ||
|- | |- | ||
| <code>PL2303_PRODUCT_ID_RSAQ3 = $aaa2;</code> | | <code>PL2303_PRODUCT_ID_RSAQ3 = $aaa2;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>PL2303_PRODUCT_ID_CHILITAG = $aaa8;</code> | ||
| | | | ||
|- | |- | ||
Line 356: | Line 365: | ||
|- | |- | ||
| <code>PL2303_ATEN_PRODUCT_ID = $2008;</code> | | <code>PL2303_ATEN_PRODUCT_ID = $2008;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>PL2303_ATEN_PRODUCT_UC485 = $2021;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>PL2303_ATEN_PRODUCT_UC232B = $2022;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>PL2303_ATEN_PRODUCT_ID2 = $2118;</code> | ||
| | | | ||
|- | |- | ||
Line 605: | Line 623: | ||
|- | |- | ||
| <code>PL2303_HP_VENDOR_ID = $03f0;</code> | | <code>PL2303_HP_VENDOR_ID = $03f0;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>PL2303_HP_LM920_PRODUCT_ID = $026b;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>PL2303_HP_TD620_PRODUCT_ID = $0956;</code> | ||
| | | | ||
|- | |- | ||
Line 617: | Line 641: | ||
|- | |- | ||
| <code>PL2303_HP_LD220_PRODUCT_ID = $3524;</code> | | <code>PL2303_HP_LD220_PRODUCT_ID = $3524;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>PL2303_HP_LD220TA_PRODUCT_ID = $4349;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>PL2303_HP_LD960TA_PRODUCT_ID = $4439;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>PL2303_HP_LM940_PRODUCT_ID = $5039;</code> | ||
| | | | ||
|- | |- | ||
Line 684: | Line 717: | ||
<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;">'''PL2303 device | + | <div style="font-size: 14px; padding-left: 12px;">'''PL2303 device Id''' <code> PL2303_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;" | ||
|- | |- | ||
− | | <code>PL2303_DEVICE_ID_COUNT = | + | | <code>PL2303_DEVICE_ID_COUNT = 64;</code> |
| Number of supported Device IDs | | Number of supported Device IDs | ||
|- | |- | ||
Line 705: | Line 738: | ||
|- | |- | ||
| <code>(idVendor:PL2303_VENDOR_ID;idProduct:PL2303_PRODUCT_ID_RSAQ3),</code> | | <code>(idVendor:PL2303_VENDOR_ID;idProduct:PL2303_PRODUCT_ID_RSAQ3),</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>(idVendor:PL2303_VENDOR_ID;idProduct:PL2303_PRODUCT_ID_CHILITAG),</code> | ||
| | | | ||
|- | |- | ||
Line 726: | Line 762: | ||
|- | |- | ||
| <code>(idVendor:PL2303_VENDOR_ID;idProduct:PL2303_PRODUCT_ID_ZTEK),</code> | | <code>(idVendor:PL2303_VENDOR_ID;idProduct:PL2303_PRODUCT_ID_ZTEK),</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>(idVendor:PL2303_VENDOR_ID;idProduct:PL2303_PRODUCT_ID_TB),</code> | ||
| | | | ||
|- | |- | ||
Line 735: | Line 774: | ||
|- | |- | ||
| <code>(idVendor:PL2303_ATEN_VENDOR_ID;idProduct:PL2303_ATEN_PRODUCT_ID),</code> | | <code>(idVendor:PL2303_ATEN_VENDOR_ID;idProduct:PL2303_ATEN_PRODUCT_ID),</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>(idVendor:PL2303_ATEN_VENDOR_ID;idProduct:PL2303_ATEN_PRODUCT_UC485),</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>(idVendor:PL2303_ATEN_VENDOR_ID;idProduct:PL2303_ATEN_PRODUCT_UC232B),</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>(idVendor:PL2303_ATEN_VENDOR_ID;idProduct:PL2303_ATEN_PRODUCT_ID2),</code> | ||
| | | | ||
|- | |- | ||
Line 828: | Line 876: | ||
|- | |- | ||
| <code>(idVendor:PL2303_HP_VENDOR_ID;idProduct:PL2303_HP_LD220_PRODUCT_ID),</code> | | <code>(idVendor:PL2303_HP_VENDOR_ID;idProduct:PL2303_HP_LD220_PRODUCT_ID),</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>(idVendor:PL2303_HP_VENDOR_ID;idProduct:PL2303_HP_LD220TA_PRODUCT_ID),</code> | ||
| | | | ||
|- | |- | ||
| <code>(idVendor:PL2303_HP_VENDOR_ID;idProduct:PL2303_HP_LD960_PRODUCT_ID),</code> | | <code>(idVendor:PL2303_HP_VENDOR_ID;idProduct:PL2303_HP_LD960_PRODUCT_ID),</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>(idVendor:PL2303_HP_VENDOR_ID;idProduct:PL2303_HP_LD960TA_PRODUCT_ID),</code> | ||
| | | | ||
|- | |- | ||
Line 837: | Line 891: | ||
|- | |- | ||
| <code>(idVendor:PL2303_HP_VENDOR_ID;idProduct:PL2303_HP_LCM960_PRODUCT_ID),</code> | | <code>(idVendor:PL2303_HP_VENDOR_ID;idProduct:PL2303_HP_LCM960_PRODUCT_ID),</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>(idVendor:PL2303_HP_VENDOR_ID;idProduct:PL2303_HP_LM920_PRODUCT_ID),</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>(idVendor:PL2303_HP_VENDOR_ID;idProduct:PL2303_HP_LM940_PRODUCT_ID),</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>(idVendor:PL2303_HP_VENDOR_ID;idProduct:PL2303_HP_TD620_PRODUCT_ID),</code> | ||
| | | | ||
|- | |- | ||
Line 889: | Line 952: | ||
| <code>Control:LongWord;</code> | | <code>Control:LongWord;</code> | ||
| Status of the control lines RTS and DTR | | Status of the control lines RTS and DTR | ||
+ | |- | ||
+ | | <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> | | <code>TransmitActive:LongBool;</code> | ||
Line 952: | Line 1,024: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Note |
| None documented | | None documented | ||
|- | |- | ||
Line 963: | Line 1,035: | ||
<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 PL2303SerialDeviceOpen(Serial:PSerialDevice; BaudRate,DataBits,StopBits,Parity,FlowControl,ReceiveDepth,TransmitDepth:LongWord):LongWord;</pre> | <pre style="border: 0; padding-bottom:0px;">function PL2303SerialDeviceOpen(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 PL2303 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 975: | Line 1,047: | ||
<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 PL2303SerialDeviceClose(Serial:PSerialDevice):LongWord;</pre> | <pre style="border: 0; padding-bottom:0px;">function PL2303SerialDeviceClose(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 PL2303 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 987: | Line 1,059: | ||
<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 PL2303SerialDeviceRead(Serial:PSerialDevice; Buffer:Pointer; Size,Flags:LongWord; var Count:LongWord):LongWord;</pre> | <pre style="border: 0; padding-bottom:0px;">function PL2303SerialDeviceRead(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 PL2303 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 999: | Line 1,071: | ||
<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 PL2303SerialDeviceWrite(Serial:PSerialDevice; Buffer:Pointer; Size,Flags:LongWord; var Count:LongWord):LongWord;</pre> | <pre style="border: 0; padding-bottom:0px;">function PL2303SerialDeviceWrite(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 Pl2303 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 1,018: | Line 1,090: | ||
{| 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 1,036: | Line 1,108: | ||
{| 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 | ||
+ | |- | ||
+ | |} | ||
+ | </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 PL2303ReceiveStart(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 | ||
|- | |- | ||
|} | |} | ||
Line 1,054: | Line 1,141: | ||
{| 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 1,066: | Line 1,153: | ||
{| 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 1,081: | Line 1,168: | ||
{| 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 1,096: | Line 1,183: | ||
{| 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 1,108: | Line 1,195: | ||
{| 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 1,123: | Line 1,210: | ||
{| 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 1,135: | Line 1,222: | ||
{| 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 1,153: | Line 1,240: | ||
{| 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 | ||
|- | |- | ||
− | ! | + | ! Return |
| USB_STATUS_SUCCESS if completed or another error code on failure | | USB_STATUS_SUCCESS if completed or another error code on failure | ||
|- | |- | ||
Line 1,168: | Line 1,255: | ||
{| 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 | ||
|- | |- | ||
− | ! | + | ! Return |
| USB_STATUS_SUCCESS if completed or another error code on failure | | USB_STATUS_SUCCESS if completed or another error code on failure | ||
|- | |- | ||
Line 1,183: | Line 1,270: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Note |
| None documented | | None documented | ||
|- | |- | ||
Line 1,195: | Line 1,282: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Note |
| None documented | | None documented | ||
|- | |- | ||
Line 1,207: | Line 1,294: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Note |
| None documented | | None documented | ||
|- | |- | ||
Line 1,219: | Line 1,306: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Note |
| None documented | | None documented | ||
|- | |- | ||
Line 1,231: | Line 1,318: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Note |
| None documented | | None documented | ||
|- | |- | ||
Line 1,243: | Line 1,330: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Note |
| None documented | | None documented | ||
|- | |- | ||
Line 1,255: | Line 1,342: | ||
{| 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 04:32, 9 May 2019
Return to Unit Reference
Description
Prolific PL2303 USB to Serial Driver unit
The Prolific PL2303 is a USB to serial interface chip used by multiple vendors.
It includes a single serial port with bulk IN and OUT plus interrupt IN endpoints.
Constants
PL2303 specific constants
PL2303_*
PL2303_DRIVER_NAME = 'Prolific PL2303 USB to Serial Driver';
|
Name of PL2303 driver |
PL2303_SERIAL_DESCRIPTION = 'Prolific PL2303 USB to Serial';
|
Description of PL2303 device |
PL2303_MIN_BAUD = 75;
|
|
PL2303_MAX_BAUD = 1228800;
|
|
PL2303_MAX_BAUD_HX = 12000000;
|
|
PL2303_MIN_DATABITS = SERIAL_DATA_5BIT;
|
|
PL2303_MAX_DATABITS = SERIAL_DATA_8BIT;
|
|
PL2303_MIN_STOPBITS = SERIAL_STOP_1BIT;
|
|
PL2303_MAX_STOPBITS = SERIAL_STOP_1BIT5;
|
|
PL2303_MAX_PARITY = SERIAL_PARITY_SPACE;
|
|
PL2303_MAX_FLOW = SERIAL_FLOW_DSR_DTR;
|
PL2303 device model
PL2303_TYPE_*
PL2303_TYPE_01 = 0;
|
Type 0 and 1 (difference unknown) |
PL2303_TYPE_HX = 1;
|
HX version of the PL2303 chip |
PL2303 bulk in/out size
PL2303_BULK_*
PL2303_BULK_IN_SIZE = 256;
|
|
PL2303_BULK_OUT_SIZE = 256;
|
PL2303 USB request
PL2303_*_REQUEST
PL2303_SET_LINE_REQUEST_TYPE = $21;
|
|
PL2303_SET_LINE_REQUEST = $20;
|
|
PL2303_SET_CONTROL_REQUEST_TYPE = $21;
|
|
PL2303_SET_CONTROL_REQUEST = $22;
|
|
PL2303_CONTROL_DTR = $01;
|
|
PL2303_CONTROL_RTS = $02;
|
|
PL2303_BREAK_REQUEST_TYPE = $21;
|
|
PL2303_BREAK_REQUEST = $23;
|
|
PL2303_BREAK_ON = $ffff;
|
|
PL2303_BREAK_OFF = $0000;
|
|
PL2303_GET_LINE_REQUEST_TYPE = $a1;
|
|
PL2303_GET_LINE_REQUEST = $21;
|
|
PL2303_VENDOR_WRITE_REQUEST_TYPE = $40;
|
|
PL2303_VENDOR_WRITE_REQUEST = $01;
|
|
PL2303_VENDOR_READ_REQUEST_TYPE = $c0;
|
|
PL2303_VENDOR_READ_REQUEST = $01;
|
|
PL2303_UART_STATE_INDEX = 8;
|
|
PL2303_UART_DCD = $01;
|
|
PL2303_UART_DSR = $02;
|
|
PL2303_UART_BREAK_ERROR = $04;
|
|
PL2303_UART_RING = $08;
|
|
PL2303_UART_FRAME_ERROR = $10;
|
|
PL2303_UART_PARITY_ERROR = $20;
|
|
PL2303_UART_OVERRUN_ERROR = $40;
|
|
PL2303_UART_CTS = $80;
|
|
PL2303_UART_STATE_MSR_MASK = PL2303_UART_DCD or PL2303_UART_DSR or PL2303_UART_RING or PL2303_UART_CTS;
|
$8b |
PL2303_UART_STATE_TRANSIENT_MASK = PL2303_UART_BREAK_ERROR or PL2303_UART_FRAME_ERROR or PL2303_UART_PARITY_ERROR or PL2303_UART_OVERRUN_ERROR;
|
$74 |
PL2303 device quirk
PL2303_QUIRK_*
PL2303_QUIRK_NONE = $00000000;
|
|
PL2303_QUIRK_UART_STATE_IDX0 = $00000001;
|
|
PL2303_QUIRK_LEGACY = $00000002;
|
|
PL2303_QUIRK_ENDPOINT_HACK = $00000004;
|
PL2303 supported baud rate
PL2303_SUPPORTED_BAUD_RATE_*
PL2303_SUPPORTED_BAUD_RATE_COUNT = 25;
|
|
PL2303_SUPPORTED_BAUD_RATES:array[0..PL2303_SUPPORTED_BAUD_RATE_COUNT - 1] of LongWord = (
| |
75,
|
|
150,
|
|
300,
|
|
600,
|
|
1200,
|
|
1800,
|
|
2400,
|
|
3600,
|
|
4800,
|
|
7200,
|
|
9600,
|
|
14400,
|
|
19200,
|
|
28800,
|
|
38400,
|
|
57600,
|
|
115200,
|
|
230400,
|
|
460800,
|
|
614400,
|
|
921600,
|
|
1228800,
|
|
2457600,
|
|
3000000,
|
|
6000000);
|
PL2303 vendor and product Id
PL2303_*_ID
PL2303_VENDOR_ID = $067b;
|
|
PL2303_PRODUCT_ID = $2303;
|
|
PL2303_PRODUCT_ID_TB = $2304;
|
|
PL2303_PRODUCT_ID_RSAQ2 = $04bb;
|
|
PL2303_PRODUCT_ID_DCU11 = $1234;
|
|
PL2303_PRODUCT_ID_PHAROS = $aaa0;
|
|
PL2303_PRODUCT_ID_RSAQ3 = $aaa2;
|
|
PL2303_PRODUCT_ID_CHILITAG = $aaa8;
|
|
PL2303_PRODUCT_ID_ALDIGA = $0611;
|
|
PL2303_PRODUCT_ID_MMX = $0612;
|
|
PL2303_PRODUCT_ID_GPRS = $0609;
|
|
PL2303_PRODUCT_ID_HCR331 = $331a;
|
|
PL2303_PRODUCT_ID_MOTOROLA = $0307;
|
|
PL2303_PRODUCT_ID_ZTEK = $e1f1;
|
|
PL2303_ATEN_VENDOR_ID = $0557;
|
|
PL2303_ATEN_VENDOR_ID2 = $0547;
|
|
PL2303_ATEN_PRODUCT_ID = $2008;
|
|
PL2303_ATEN_PRODUCT_UC485 = $2021;
|
|
PL2303_ATEN_PRODUCT_UC232B = $2022;
|
|
PL2303_ATEN_PRODUCT_ID2 = $2118;
|
|
PL2303_BENQ_VENDOR_ID = $04a5;
|
|
PL2303_BENQ_PRODUCT_ID_S81 = $4027;
|
|
PL2303_IODATA_VENDOR_ID = $04bb;
|
|
PL2303_IODATA_PRODUCT_ID = $0a03;
|
|
PL2303_IODATA_PRODUCT_ID_RSAQ5 = $0a0e;
|
|
PL2303_ELCOM_VENDOR_ID = $056e;
|
|
PL2303_ELCOM_PRODUCT_ID = $5003;
|
|
PL2303_ELCOM_PRODUCT_ID_UCSGT = $5004;
|
|
PL2303_ITEGNO_VENDOR_ID = $0eba;
|
|
PL2303_ITEGNO_PRODUCT_ID = $1080;
|
|
PL2303_ITEGNO_PRODUCT_ID_2080 = $2080;
|
|
PL2303_MA620_VENDOR_ID = $0df7;
|
|
PL2303_MA620_PRODUCT_ID = $0620;
|
|
PL2303_RATOC_VENDOR_ID = $0584;
|
|
PL2303_RATOC_PRODUCT_ID = $b000;
|
|
PL2303_TRIPP_VENDOR_ID = $2478;
|
|
PL2303_TRIPP_PRODUCT_ID = $2008;
|
|
PL2303_RADIOSHACK_VENDOR_ID = $1453;
|
|
PL2303_RADIOSHACK_PRODUCT_ID = $4026;
|
|
PL2303_DCU10_VENDOR_ID = $0731;
|
|
PL2303_DCU10_PRODUCT_ID = $0528;
|
|
PL2303_SITECOM_VENDOR_ID = $6189;
|
|
PL2303_SITECOM_PRODUCT_ID = $2068;
|
|
Alcatel OT535/735 USB cable | |
PL2303_ALCATEL_VENDOR_ID = $11f7;
|
|
PL2303_ALCATEL_PRODUCT_ID = $02df;
|
|
PL2303_SIEMENS_VENDOR_ID = $11f5;
|
|
PL2303_SIEMENS_PRODUCT_ID_SX1 = $0001;
|
|
PL2303_SIEMENS_PRODUCT_ID_X65 = $0003;
|
|
PL2303_SIEMENS_PRODUCT_ID_X75 = $0004;
|
|
PL2303_SIEMENS_PRODUCT_ID_EF81 = $0005;
|
|
PL2303_SYNTECH_VENDOR_ID = $0745;
|
|
PL2303_SYNTECH_PRODUCT_ID = $0001;
|
|
Nokia CA-42 Cable | |
PL2303_NOKIA_CA42_VENDOR_ID = $078b;
|
|
PL2303_NOKIA_CA42_PRODUCT_ID = $1234;
|
|
CA-42 CLONE Cable www.ca-42.com chipset: Prolific Technology Inc | |
PL2303_CA_42_CA42_VENDOR_ID = $10b5;
|
|
PL2303_CA_42_CA42_PRODUCT_ID = $ac70;
|
|
PL2303_SAGEM_VENDOR_ID = $079b;
|
|
PL2303_SAGEM_PRODUCT_ID = $0027;
|
|
Leadtek GPS 9531 (ID 0413:2101) | |
PL2303_LEADTEK_VENDOR_ID = $0413;
|
|
PL2303_LEADTEK_9531_PRODUCT_ID = $2101;
|
|
USB GSM cable from Speed Dragon Multimedia, Ltd | |
PL2303_SPEEDDRAGON_VENDOR_ID = $0e55;
|
|
PL2303_SPEEDDRAGON_PRODUCT_ID = $110b;
|
|
DATAPILOT Universal-2 Phone Cable | |
PL2303_DATAPILOT_U2_VENDOR_ID = $0731;
|
|
PL2303_DATAPILOT_U2_PRODUCT_ID = $2003;
|
|
Belkin "F5U257" Serial Adapter | |
PL2303_BELKIN_VENDOR_ID = $050d;
|
|
PL2303_BELKIN_PRODUCT_ID = $0257;
|
|
Alcor Micro Corp. USB 2.0 TO RS-232 | |
PL2303_ALCOR_VENDOR_ID = $058F;
|
|
PL2303_ALCOR_PRODUCT_ID = $9720;
|
|
Willcom WS002IN Data Driver (by NetIndex Inc.) | |
PL2303_WS002IN_VENDOR_ID = $11f6;
|
|
PL2303_WS002IN_PRODUCT_ID = $2001;
|
|
Corega CG-USBRS232R Serial Adapter | |
PL2303_COREGA_VENDOR_ID = $07aa;
|
|
PL2303_COREGA_PRODUCT_ID = $002a;
|
|
Y.C. Cable U.S.A., Inc - USB to RS-232 | |
PL2303_YCCABLE_VENDOR_ID = $05ad;
|
|
PL2303_YCCABLE_PRODUCT_ID = $0fba;
|
|
"Superial" USB - Serial | |
PL2303_SUPERIAL_VENDOR_ID = $5372;
|
|
PL2303_SUPERIAL_PRODUCT_ID = $2303;
|
|
Hewlett-Packard POS Pole Displays | |
PL2303_HP_VENDOR_ID = $03f0;
|
|
PL2303_HP_LM920_PRODUCT_ID = $026b;
|
|
PL2303_HP_TD620_PRODUCT_ID = $0956;
|
|
PL2303_HP_LD960_PRODUCT_ID = $0b39;
|
|
PL2303_HP_LCM220_PRODUCT_ID = $3139;
|
|
PL2303_HP_LCM960_PRODUCT_ID = $3239;
|
|
PL2303_HP_LD220_PRODUCT_ID = $3524;
|
|
PL2303_HP_LD220TA_PRODUCT_ID = $4349;
|
|
PL2303_HP_LD960TA_PRODUCT_ID = $4439;
|
|
PL2303_HP_LM940_PRODUCT_ID = $5039;
|
|
Cressi Edy (diving computer) PC interface | |
PL2303_CRESSI_VENDOR_ID = $04b8;
|
|
PL2303_CRESSI_EDY_PRODUCT_ID = $0521;
|
|
Zeagle dive computer interface | |
PL2303_ZEAGLE_VENDOR_ID = $04b8;
|
|
PL2303_ZEAGLE_N2ITION3_PRODUCT_ID = $0522;
|
|
Sony, USB data cable for CMD-Jxx mobile phones | |
PL2303_SONY_VENDOR_ID = $054c;
|
|
PL2303_SONY_QN3USB_PRODUCT_ID = $0437;
|
|
Sanwa KB-USB2 multimeter cable (ID: 11ad:0001) | |
PL2303_SANWA_VENDOR_ID = $11ad;
|
|
PL2303_SANWA_PRODUCT_ID = $0001;
|
|
ADLINK ND-6530 RS232,RS485 and RS422 adapter | |
PL2303_ADLINK_VENDOR_ID = $0b63;
|
|
PL2303_ADLINK_ND6530_PRODUCT_ID = $6530;
|
|
SMART USB Serial Adapter | |
PL2303_SMART_VENDOR_ID = $0b8c;
|
|
PL2303_SMART_PRODUCT_ID = $2303;
|
PL2303 device Id
PL2303_DEVICE_ID_*
PL2303_DEVICE_ID_COUNT = 64;
|
Number of supported Device IDs |
PL2303_DEVICE_ID:array[0..PL2303_DEVICE_ID_COUNT - 1] of TUSBDeviceId = (
| |
(idVendor:PL2303_VENDOR_ID;idProduct:PL2303_PRODUCT_ID),
|
|
(idVendor:PL2303_VENDOR_ID;idProduct:PL2303_PRODUCT_ID_RSAQ2),
|
|
(idVendor:PL2303_VENDOR_ID;idProduct:PL2303_PRODUCT_ID_DCU11),
|
|
(idVendor:PL2303_VENDOR_ID;idProduct:PL2303_PRODUCT_ID_RSAQ3),
|
|
(idVendor:PL2303_VENDOR_ID;idProduct:PL2303_PRODUCT_ID_CHILITAG),
|
|
(idVendor:PL2303_VENDOR_ID;idProduct:PL2303_PRODUCT_ID_PHAROS),
|
|
(idVendor:PL2303_VENDOR_ID;idProduct:PL2303_PRODUCT_ID_ALDIGA),
|
|
(idVendor:PL2303_VENDOR_ID;idProduct:PL2303_PRODUCT_ID_MMX),
|
|
(idVendor:PL2303_VENDOR_ID;idProduct:PL2303_PRODUCT_ID_GPRS),
|
|
(idVendor:PL2303_VENDOR_ID;idProduct:PL2303_PRODUCT_ID_HCR331),
|
|
(idVendor:PL2303_VENDOR_ID;idProduct:PL2303_PRODUCT_ID_MOTOROLA),
|
|
(idVendor:PL2303_VENDOR_ID;idProduct:PL2303_PRODUCT_ID_ZTEK),
|
|
(idVendor:PL2303_VENDOR_ID;idProduct:PL2303_PRODUCT_ID_TB),
|
|
(idVendor:PL2303_IODATA_VENDOR_ID;idProduct:PL2303_IODATA_PRODUCT_ID),
|
|
(idVendor:PL2303_IODATA_VENDOR_ID;idProduct:PL2303_IODATA_PRODUCT_ID_RSAQ5),
|
|
(idVendor:PL2303_ATEN_VENDOR_ID;idProduct:PL2303_ATEN_PRODUCT_ID),
|
|
(idVendor:PL2303_ATEN_VENDOR_ID;idProduct:PL2303_ATEN_PRODUCT_UC485),
|
|
(idVendor:PL2303_ATEN_VENDOR_ID;idProduct:PL2303_ATEN_PRODUCT_UC232B),
|
|
(idVendor:PL2303_ATEN_VENDOR_ID;idProduct:PL2303_ATEN_PRODUCT_ID2),
|
|
(idVendor:PL2303_ATEN_VENDOR_ID2;idProduct:PL2303_ATEN_PRODUCT_ID),
|
|
(idVendor:PL2303_ELCOM_VENDOR_ID;idProduct:PL2303_ELCOM_PRODUCT_ID),
|
|
(idVendor:PL2303_ELCOM_VENDOR_ID;idProduct:PL2303_ELCOM_PRODUCT_ID_UCSGT),
|
|
(idVendor:PL2303_ITEGNO_VENDOR_ID;idProduct:PL2303_ITEGNO_PRODUCT_ID),
|
|
(idVendor:PL2303_ITEGNO_VENDOR_ID;idProduct:PL2303_ITEGNO_PRODUCT_ID_2080),
|
|
(idVendor:PL2303_MA620_VENDOR_ID;idProduct:PL2303_MA620_PRODUCT_ID),
|
|
(idVendor:PL2303_RATOC_VENDOR_ID;idProduct:PL2303_RATOC_PRODUCT_ID),
|
|
(idVendor:PL2303_TRIPP_VENDOR_ID;idProduct:PL2303_TRIPP_PRODUCT_ID),
|
|
(idVendor:PL2303_RADIOSHACK_VENDOR_ID;idProduct:PL2303_RADIOSHACK_PRODUCT_ID),
|
|
(idVendor:PL2303_DCU10_VENDOR_ID;idProduct:PL2303_DCU10_PRODUCT_ID),
|
|
(idVendor:PL2303_SITECOM_VENDOR_ID;idProduct:PL2303_SITECOM_PRODUCT_ID),
|
|
(idVendor:PL2303_ALCATEL_VENDOR_ID;idProduct:PL2303_ALCATEL_PRODUCT_ID),
|
|
(idVendor:PL2303_SIEMENS_VENDOR_ID;idProduct:PL2303_SIEMENS_PRODUCT_ID_SX1),
|
PL2303_QUIRK_UART_STATE_IDX0 |
(idVendor:PL2303_SIEMENS_VENDOR_ID;idProduct:PL2303_SIEMENS_PRODUCT_ID_X65),
|
PL2303_QUIRK_UART_STATE_IDX0 |
(idVendor:PL2303_SIEMENS_VENDOR_ID;idProduct:PL2303_SIEMENS_PRODUCT_ID_X75),
|
PL2303_QUIRK_UART_STATE_IDX0 |
(idVendor:PL2303_SIEMENS_VENDOR_ID;idProduct:PL2303_SIEMENS_PRODUCT_ID_EF81),
|
|
(idVendor:PL2303_BENQ_VENDOR_ID;idProduct:PL2303_BENQ_PRODUCT_ID_S81),
|
Benq/Siemens S81 |
(idVendor:PL2303_SYNTECH_VENDOR_ID;idProduct:PL2303_SYNTECH_PRODUCT_ID),
|
|
(idVendor:PL2303_NOKIA_CA42_VENDOR_ID;idProduct:PL2303_NOKIA_CA42_PRODUCT_ID),
|
|
(idVendor:PL2303_CA_42_CA42_VENDOR_ID;idProduct:PL2303_CA_42_CA42_PRODUCT_ID),
|
|
(idVendor:PL2303_SAGEM_VENDOR_ID;idProduct:PL2303_SAGEM_PRODUCT_ID),
|
|
(idVendor:PL2303_LEADTEK_VENDOR_ID;idProduct:PL2303_LEADTEK_9531_PRODUCT_ID),
|
|
(idVendor:PL2303_SPEEDDRAGON_VENDOR_ID;idProduct:PL2303_SPEEDDRAGON_PRODUCT_ID),
|
|
(idVendor:PL2303_DATAPILOT_U2_VENDOR_ID;idProduct:PL2303_DATAPILOT_U2_PRODUCT_ID),
|
|
(idVendor:PL2303_BELKIN_VENDOR_ID;idProduct:PL2303_BELKIN_PRODUCT_ID),
|
|
(idVendor:PL2303_ALCOR_VENDOR_ID;idProduct:PL2303_ALCOR_PRODUCT_ID),
|
|
(idVendor:PL2303_WS002IN_VENDOR_ID;idProduct:PL2303_WS002IN_PRODUCT_ID),
|
|
(idVendor:PL2303_COREGA_VENDOR_ID;idProduct:PL2303_COREGA_PRODUCT_ID),
|
|
(idVendor:PL2303_YCCABLE_VENDOR_ID;idProduct:PL2303_YCCABLE_PRODUCT_ID),
|
|
(idVendor:PL2303_SUPERIAL_VENDOR_ID;idProduct:PL2303_SUPERIAL_PRODUCT_ID),
|
|
(idVendor:PL2303_HP_VENDOR_ID;idProduct:PL2303_HP_LD220_PRODUCT_ID),
|
|
(idVendor:PL2303_HP_VENDOR_ID;idProduct:PL2303_HP_LD220TA_PRODUCT_ID),
|
|
(idVendor:PL2303_HP_VENDOR_ID;idProduct:PL2303_HP_LD960_PRODUCT_ID),
|
|
(idVendor:PL2303_HP_VENDOR_ID;idProduct:PL2303_HP_LD960TA_PRODUCT_ID),
|
|
(idVendor:PL2303_HP_VENDOR_ID;idProduct:PL2303_HP_LCM220_PRODUCT_ID),
|
|
(idVendor:PL2303_HP_VENDOR_ID;idProduct:PL2303_HP_LCM960_PRODUCT_ID),
|
|
(idVendor:PL2303_HP_VENDOR_ID;idProduct:PL2303_HP_LM920_PRODUCT_ID),
|
|
(idVendor:PL2303_HP_VENDOR_ID;idProduct:PL2303_HP_LM940_PRODUCT_ID),
|
|
(idVendor:PL2303_HP_VENDOR_ID;idProduct:PL2303_HP_TD620_PRODUCT_ID),
|
|
(idVendor:PL2303_CRESSI_VENDOR_ID;idProduct:PL2303_CRESSI_EDY_PRODUCT_ID),
|
|
(idVendor:PL2303_ZEAGLE_VENDOR_ID;idProduct:PL2303_ZEAGLE_N2ITION3_PRODUCT_ID),
|
|
(idVendor:PL2303_SONY_VENDOR_ID;idProduct:PL2303_SONY_QN3USB_PRODUCT_ID),
|
|
(idVendor:PL2303_SANWA_VENDOR_ID;idProduct:PL2303_SANWA_PRODUCT_ID),
|
|
(idVendor:PL2303_ADLINK_VENDOR_ID;idProduct:PL2303_ADLINK_ND6530_PRODUCT_ID),
|
|
(idVendor:PL2303_SMART_VENDOR_ID;idProduct:PL2303_SMART_PRODUCT_ID));
|
Type definitions
PL2303 specific types
PPL2303SerialDevice = ^TPL2303SerialDevice;
TPL2303SerialDevice = record
Serial Properties | |
Serial:TSerialDevice;
|
|
USB Properties | |
Model:LongWord;
|
Device model (eg PL2303_TYPE_01) |
Quirks:LongWord;
|
Unusual behaviours of specific chip versions |
Control:LongWord;
|
Status of the control lines RTS and DTR |
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 |
ReceiveRequest:PUSBRequest;
|
USB request Bulk IN Endpoint |
ReceiveEndpoint:PUSBEndpointDescriptor;
|
PL2303 Bulk IN Endpoint |
TransmitRequest:PUSBRequest;
|
USB request for Bulk OUT Endpoint |
TransmitEndpoint:PUSBEndpointDescriptor;
|
PL2303 Bulk OUT Endpoint |
InterruptRequest:PUSBRequest;
|
USB request for Interrupt IN Endpoint |
InterruptEndpoint:PUSBEndpointDescriptor;
|
PL2303 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 PL2303Init;
Description: To be documented
Note | None documented |
---|
PL2303 serial functions
function PL2303SerialDeviceOpen(Serial:PSerialDevice; BaudRate,DataBits,StopBits,Parity,FlowControl,ReceiveDepth,TransmitDepth:LongWord):LongWord;
Description: Implementation of SerialDeviceOpen API for PL2303 Serial
Note | Not intended to be called directly by applications, use SerialDeviceOpen instead. |
---|
function PL2303SerialDeviceClose(Serial:PSerialDevice):LongWord;
Description: Implementation of SerialDeviceClose API for PL2303 Serial
Note | Not intended to be called directly by applications, use SerialDeviceClose instead. |
---|
function PL2303SerialDeviceRead(Serial:PSerialDevice; Buffer:Pointer; Size,Flags:LongWord; var Count:LongWord):LongWord;
Description: Implementation of SerialDeviceRead API for PL2303 Serial
Note | Not intended to be called directly by applications, use SerialDeviceRead instead. |
---|
function PL2303SerialDeviceWrite(Serial:PSerialDevice; Buffer:Pointer; Size,Flags:LongWord; var Count:LongWord):LongWord;
Description: Implementation of SerialDeviceWrite API for Pl2303 Serial
Note | Not intended to be called directly by applications, use SerialDeviceWrite instead. |
---|
PL2303 USB functions
function PL2303DriverBind(Device:PUSBDevice; Interrface:PUSBInterface):LongWord;
Description: Bind the PL2303 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 PL2303DriverUnbind(Device:PUSBDevice; Interrface:PUSBInterface):LongWord;
Description: Unbind the PL2303 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 PL2303ReceiveStart(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 PL2303ReceiveWorker(Request:PUSBRequest);
Description: Called (by a Worker thread) to process a completed USB request from the PL2303 bulk IN endpoint
Request | The USB request which has completed |
---|
procedure PL2303ReceiveComplete(Request:PUSBRequest);
Description: Called when a USB request from the PL2303 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 PL2303TransmitStart(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 PL2303TransmitWorker(Request:PUSBRequest);
Description: Called (by a Worker thread) to process a completed USB request to the PL2303 bulk OUT endpoint
Request | The USB request which has completed |
---|
procedure PL2303TransmitComplete(Request:PUSBRequest);
Description: Called when a USB request to the PL2303 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 PL2303InterruptWorker(Request:PUSBRequest);
Description: Called (by a Worker thread) to process a completed USB request to the PL2303 interrupt IN endpoint
Request | The USB request which has completed |
---|
procedure PL2303InterruptComplete(Request:PUSBRequest);
Description: Called when a USB request from the PL2303 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 |
PL2303 helper functions
function PL2303CheckDevice(Device:PUSBDevice):LongWord;
Description: Check the Vendor and Device ID against the supported devices
Device | USB device to check |
---|---|
Return | USB_STATUS_SUCCESS if completed or another error code on failure |
function PL2303PatchDevice(Device:PUSBDevice; var Model,Quirks:LongWord):LongWord;
Description: Check the USB device for quirks and model information needed by the driver
Device | USB device to check |
---|---|
Return | USB_STATUS_SUCCESS if completed or another error code on failure |
function PL2303VendorRead(Device:PUSBDevice; Value:Word; Data:PByte):LongWord;
Description: Perform a vendor read request to a PL2303 device
Note | None documented |
---|
function PL2303VendorWrite(Device:PUSBDevice; Value,Index:Word):LongWord;
Description: Perform a vendor write request to a PL2303 device
Note | None documented |
---|
function PL2303GetLineRequest(Device:PUSBDevice; Data:PByte):LongWord;
Description: Perform a get line request to a PL2303 device
Note | None documented |
---|
function PL2303SetLineRequest(Device:PUSBDevice; Data:PByte):LongWord;
Description: Perform a set line request to a PL2303 device
Note | None documented |
---|
function PL2303SetControlRequest(Device:PUSBDevice; Value:Word):LongWord;
Description: Perform a set control request to a PL2303 device
Note | None documented |
---|
function PL2303EncodeBaudRate(Device:PUSBDevice; BaudRate:LongWord; Data:PByte):LongWord;
Description: Encode a baud rate value into the Line Request buffer for a PL2303 device
Note | None documented |
---|
function PL2303GetSupportedRate(BaudRate:LongWord):LongWord;
Description: To be documented
Note | None documented |
---|
Return to Unit Reference