Difference between revisions of "Unit PL2303"
From Ultibo.org
(16 intermediate revisions by the same user not shown) | |||
Line 4: | Line 4: | ||
=== Description === | === Description === | ||
---- | ---- | ||
+ | |||
+ | '''Prolific PL2303 USB to Serial Driver unit''' | ||
The Prolific PL2303 is a USB to serial interface chip used by multiple vendors. | The Prolific PL2303 is a USB to serial interface chip used by multiple vendors. | ||
Line 12: | Line 14: | ||
---- | ---- | ||
− | '' | + | |
+ | <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 specific constants''' <code> PL2303_* </code></div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | | <code>PL2303_DRIVER_NAME = 'Prolific PL2303 USB to Serial Driver';</code> | ||
+ | | Name of PL2303 driver | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>PL2303_SERIAL_DESCRIPTION = 'Prolific PL2303 USB to Serial';</code> | ||
+ | | Description of PL2303 device | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>PL2303_MIN_BAUD = 75;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>PL2303_MAX_BAUD = 1228800;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>PL2303_MAX_BAUD_HX = 12000000;</code> | ||
+ | | | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>PL2303_MIN_DATABITS = SERIAL_DATA_5BIT;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>PL2303_MAX_DATABITS = SERIAL_DATA_8BIT;</code> | ||
+ | | | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>PL2303_MIN_STOPBITS = SERIAL_STOP_1BIT;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>PL2303_MAX_STOPBITS = SERIAL_STOP_1BIT5;</code> | ||
+ | | | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>PL2303_MAX_PARITY = SERIAL_PARITY_SPACE;</code> | ||
+ | | | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>PL2303_MAX_FLOW = SERIAL_FLOW_DSR_DTR;</code> | ||
+ | | | ||
+ | |- | ||
+ | |} | ||
+ | </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;">'''PL2303 device model''' <code> PL2303_TYPE_* </code></div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | | <code>PL2303_TYPE_01 = 0;</code> | ||
+ | | Type 0 and 1 (difference unknown) | ||
+ | |- | ||
+ | | <code>PL2303_TYPE_HX = 1;</code> | ||
+ | | HX version of the PL2303 chip | ||
+ | |- | ||
+ | |} | ||
+ | </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;">'''PL2303 bulk in/out size''' <code> PL2303_BULK_* </code></div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | | <code>PL2303_BULK_IN_SIZE = 256;</code> | ||
+ | | style="width: 50%;"| | ||
+ | |- | ||
+ | | <code>PL2303_BULK_OUT_SIZE = 256;</code> | ||
+ | | | ||
+ | |- | ||
+ | |} | ||
+ | </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;">'''PL2303 USB request''' <code> PL2303_*_REQUEST </code></div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | | <code>PL2303_SET_LINE_REQUEST_TYPE = $21;</code> | ||
+ | | style="width: 50%;"| | ||
+ | |- | ||
+ | | <code>PL2303_SET_LINE_REQUEST = $20;</code> | ||
+ | | | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>PL2303_SET_CONTROL_REQUEST_TYPE = $21;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>PL2303_SET_CONTROL_REQUEST = $22;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>PL2303_CONTROL_DTR = $01;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>PL2303_CONTROL_RTS = $02;</code> | ||
+ | | | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>PL2303_BREAK_REQUEST_TYPE = $21;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>PL2303_BREAK_REQUEST = $23;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>PL2303_BREAK_ON = $ffff;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>PL2303_BREAK_OFF = $0000;</code> | ||
+ | | | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>PL2303_GET_LINE_REQUEST_TYPE = $a1;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>PL2303_GET_LINE_REQUEST = $21;</code> | ||
+ | | | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>PL2303_VENDOR_WRITE_REQUEST_TYPE = $40;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>PL2303_VENDOR_WRITE_REQUEST = $01;</code> | ||
+ | | | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>PL2303_VENDOR_READ_REQUEST_TYPE = $c0;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>PL2303_VENDOR_READ_REQUEST = $01;</code> | ||
+ | | | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>PL2303_UART_STATE_INDEX = 8;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>PL2303_UART_DCD = $01;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>PL2303_UART_DSR = $02;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>PL2303_UART_BREAK_ERROR = $04;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>PL2303_UART_RING = $08;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>PL2303_UART_FRAME_ERROR = $10;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>PL2303_UART_PARITY_ERROR = $20;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>PL2303_UART_OVERRUN_ERROR = $40;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>PL2303_UART_CTS = $80;</code> | ||
+ | | | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>PL2303_UART_STATE_MSR_MASK = PL2303_UART_DCD or PL2303_UART_DSR or PL2303_UART_RING or PL2303_UART_CTS;</code> | ||
+ | | $8b | ||
+ | |- | ||
+ | | <code>PL2303_UART_STATE_TRANSIENT_MASK = PL2303_UART_BREAK_ERROR or PL2303_UART_FRAME_ERROR or PL2303_UART_PARITY_ERROR or PL2303_UART_OVERRUN_ERROR;</code> | ||
+ | | $74 | ||
+ | |- | ||
+ | |} | ||
+ | </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;">'''PL2303 device quirk''' <code> PL2303_QUIRK_* </code></div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | | <code>PL2303_QUIRK_NONE = $00000000;</code> | ||
+ | | style="width: 50%;"| | ||
+ | |- | ||
+ | | <code>PL2303_QUIRK_UART_STATE_IDX0 = $00000001;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>PL2303_QUIRK_LEGACY = $00000002;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>PL2303_QUIRK_ENDPOINT_HACK = $00000004;</code> | ||
+ | | | ||
+ | |- | ||
+ | |} | ||
+ | </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;">'''PL2303 supported baud rate''' <code> PL2303_SUPPORTED_BAUD_RATE_* </code></div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | | <code>PL2303_SUPPORTED_BAUD_RATE_COUNT = 25;</code> | ||
+ | | style="width: 50%;"| | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | |colspan="2"|<code>PL2303_SUPPORTED_BAUD_RATES:array[0..PL2303_SUPPORTED_BAUD_RATE_COUNT - 1] of LongWord = (</code> | ||
+ | |- | ||
+ | | <code>75,</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>150,</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>300,</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>600,</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>1200,</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>1800,</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>2400,</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>3600,</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>4800,</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>7200,</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>9600,</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>14400,</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>19200,</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>28800,</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>38400,</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>57600,</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>115200,</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>230400,</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>460800,</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>614400,</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>921600,</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>1228800,</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>2457600,</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>3000000,</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>6000000);</code> | ||
+ | | | ||
+ | |- | ||
+ | |} | ||
+ | </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;">'''PL2303 vendor and product Id''' <code> PL2303_*_ID </code></div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | | <code>PL2303_VENDOR_ID = $067b;</code> | ||
+ | | style="width: 50%;"| | ||
+ | |- | ||
+ | | <code>PL2303_PRODUCT_ID = $2303;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>PL2303_PRODUCT_ID_TB = $2304;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>PL2303_PRODUCT_ID_RSAQ2 = $04bb;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>PL2303_PRODUCT_ID_DCU11 = $1234;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>PL2303_PRODUCT_ID_PHAROS = $aaa0;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>PL2303_PRODUCT_ID_RSAQ3 = $aaa2;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>PL2303_PRODUCT_ID_CHILITAG = $aaa8;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>PL2303_PRODUCT_ID_ALDIGA = $0611;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>PL2303_PRODUCT_ID_MMX = $0612;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>PL2303_PRODUCT_ID_GPRS = $0609;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>PL2303_PRODUCT_ID_HCR331 = $331a;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>PL2303_PRODUCT_ID_MOTOROLA = $0307;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>PL2303_PRODUCT_ID_ZTEK = $e1f1;</code> | ||
+ | | | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>PL2303_ATEN_VENDOR_ID = $0557;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>PL2303_ATEN_VENDOR_ID2 = $0547;</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> | ||
+ | | | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>PL2303_BENQ_VENDOR_ID = $04a5;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>PL2303_BENQ_PRODUCT_ID_S81 = $4027;</code> | ||
+ | | | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>PL2303_IODATA_VENDOR_ID = $04bb;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>PL2303_IODATA_PRODUCT_ID = $0a03;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>PL2303_IODATA_PRODUCT_ID_RSAQ5 = $0a0e;</code> | ||
+ | | | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>PL2303_ELCOM_VENDOR_ID = $056e;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>PL2303_ELCOM_PRODUCT_ID = $5003;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>PL2303_ELCOM_PRODUCT_ID_UCSGT = $5004;</code> | ||
+ | | | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>PL2303_ITEGNO_VENDOR_ID = $0eba;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>PL2303_ITEGNO_PRODUCT_ID = $1080;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>PL2303_ITEGNO_PRODUCT_ID_2080 = $2080;</code> | ||
+ | | | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>PL2303_MA620_VENDOR_ID = $0df7;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>PL2303_MA620_PRODUCT_ID = $0620;</code> | ||
+ | | | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>PL2303_RATOC_VENDOR_ID = $0584;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>PL2303_RATOC_PRODUCT_ID = $b000;</code> | ||
+ | | | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>PL2303_TRIPP_VENDOR_ID = $2478;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>PL2303_TRIPP_PRODUCT_ID = $2008;</code> | ||
+ | | | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>PL2303_RADIOSHACK_VENDOR_ID = $1453;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>PL2303_RADIOSHACK_PRODUCT_ID = $4026;</code> | ||
+ | | | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>PL2303_DCU10_VENDOR_ID = $0731;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>PL2303_DCU10_PRODUCT_ID = $0528;</code> | ||
+ | | | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>PL2303_SITECOM_VENDOR_ID = $6189;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>PL2303_SITECOM_PRODUCT_ID = $2068;</code> | ||
+ | | | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | |colspan="2"|''Alcatel OT535/735 USB cable'' | ||
+ | |- | ||
+ | | <code>PL2303_ALCATEL_VENDOR_ID = $11f7;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>PL2303_ALCATEL_PRODUCT_ID = $02df;</code> | ||
+ | | | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>PL2303_SIEMENS_VENDOR_ID = $11f5;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>PL2303_SIEMENS_PRODUCT_ID_SX1 = $0001;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>PL2303_SIEMENS_PRODUCT_ID_X65 = $0003;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>PL2303_SIEMENS_PRODUCT_ID_X75 = $0004;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>PL2303_SIEMENS_PRODUCT_ID_EF81 = $0005;</code> | ||
+ | | | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>PL2303_SYNTECH_VENDOR_ID = $0745;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>PL2303_SYNTECH_PRODUCT_ID = $0001;</code> | ||
+ | | | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | |colspan="2"|''Nokia CA-42 Cable'' | ||
+ | |- | ||
+ | | <code>PL2303_NOKIA_CA42_VENDOR_ID = $078b;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>PL2303_NOKIA_CA42_PRODUCT_ID = $1234;</code> | ||
+ | | | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | |colspan="2"|''CA-42 CLONE Cable www.ca-42.com chipset: Prolific Technology Inc'' | ||
+ | |- | ||
+ | | <code>PL2303_CA_42_CA42_VENDOR_ID = $10b5;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>PL2303_CA_42_CA42_PRODUCT_ID = $ac70;</code> | ||
+ | | | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>PL2303_SAGEM_VENDOR_ID = $079b;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>PL2303_SAGEM_PRODUCT_ID = $0027;</code> | ||
+ | | | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | |colspan="2"|''Leadtek GPS 9531 (ID 0413:2101)'' | ||
+ | |- | ||
+ | | <code>PL2303_LEADTEK_VENDOR_ID = $0413;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>PL2303_LEADTEK_9531_PRODUCT_ID = $2101;</code> | ||
+ | | | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | |colspan="2"|''USB GSM cable from Speed Dragon Multimedia, Ltd'' | ||
+ | |- | ||
+ | | <code>PL2303_SPEEDDRAGON_VENDOR_ID = $0e55;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>PL2303_SPEEDDRAGON_PRODUCT_ID = $110b;</code> | ||
+ | | | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | |colspan="2"|''DATAPILOT Universal-2 Phone Cable'' | ||
+ | |- | ||
+ | | <code>PL2303_DATAPILOT_U2_VENDOR_ID = $0731;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>PL2303_DATAPILOT_U2_PRODUCT_ID = $2003;</code> | ||
+ | | | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | |colspan="2"|''Belkin "F5U257" Serial Adapter'' | ||
+ | |- | ||
+ | | <code>PL2303_BELKIN_VENDOR_ID = $050d;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>PL2303_BELKIN_PRODUCT_ID = $0257;</code> | ||
+ | | | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | |colspan="2"|''Alcor Micro Corp. USB 2.0 TO RS-232'' | ||
+ | |- | ||
+ | | <code>PL2303_ALCOR_VENDOR_ID = $058F;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>PL2303_ALCOR_PRODUCT_ID = $9720;</code> | ||
+ | | | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | |colspan="2"|''Willcom WS002IN Data Driver (by NetIndex Inc.) | ||
+ | |- | ||
+ | | <code>PL2303_WS002IN_VENDOR_ID = $11f6;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>PL2303_WS002IN_PRODUCT_ID = $2001;</code> | ||
+ | | | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | |colspan="2"|''Corega CG-USBRS232R Serial Adapter'' | ||
+ | |- | ||
+ | | <code>PL2303_COREGA_VENDOR_ID = $07aa;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>PL2303_COREGA_PRODUCT_ID = $002a;</code> | ||
+ | | | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | |colspan="2"|''Y.C. Cable U.S.A., Inc - USB to RS-232'' | ||
+ | |- | ||
+ | | <code>PL2303_YCCABLE_VENDOR_ID = $05ad;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>PL2303_YCCABLE_PRODUCT_ID = $0fba;</code> | ||
+ | | | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | |colspan="2"|''"Superial" USB - Serial'' | ||
+ | |- | ||
+ | | <code>PL2303_SUPERIAL_VENDOR_ID = $5372;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>PL2303_SUPERIAL_PRODUCT_ID = $2303;</code> | ||
+ | | | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | |colspan="2"|''Hewlett-Packard POS Pole Displays'' | ||
+ | |- | ||
+ | | <code>PL2303_HP_VENDOR_ID = $03f0;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>PL2303_HP_LM920_PRODUCT_ID = $026b;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>PL2303_HP_TD620_PRODUCT_ID = $0956;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>PL2303_HP_LD960_PRODUCT_ID = $0b39;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>PL2303_HP_LCM220_PRODUCT_ID = $3139;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>PL2303_HP_LCM960_PRODUCT_ID = $3239;</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> | ||
+ | | | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | |colspan="2"|''Cressi Edy (diving computer) PC interface'' | ||
+ | |- | ||
+ | | <code>PL2303_CRESSI_VENDOR_ID = $04b8;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>PL2303_CRESSI_EDY_PRODUCT_ID = $0521;</code> | ||
+ | | | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | |colspan="2"|''Zeagle dive computer interface'' | ||
+ | |- | ||
+ | | <code>PL2303_ZEAGLE_VENDOR_ID = $04b8;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>PL2303_ZEAGLE_N2ITION3_PRODUCT_ID = $0522;</code> | ||
+ | | | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | |colspan="2"|''Sony, USB data cable for CMD-Jxx mobile phones'' | ||
+ | |- | ||
+ | | <code>PL2303_SONY_VENDOR_ID = $054c;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>PL2303_SONY_QN3USB_PRODUCT_ID = $0437;</code> | ||
+ | | | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | |colspan="2"|''Sanwa KB-USB2 multimeter cable (ID: 11ad:0001)'' | ||
+ | |- | ||
+ | | <code>PL2303_SANWA_VENDOR_ID = $11ad;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>PL2303_SANWA_PRODUCT_ID = $0001;</code> | ||
+ | | | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | |colspan="2"|''ADLINK ND-6530 RS232,RS485 and RS422 adapter'' | ||
+ | |- | ||
+ | | <code>PL2303_ADLINK_VENDOR_ID = $0b63;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>PL2303_ADLINK_ND6530_PRODUCT_ID = $6530;</code> | ||
+ | | | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | |colspan="2"|''SMART USB Serial Adapter'' | ||
+ | |- | ||
+ | | <code>PL2303_SMART_VENDOR_ID = $0b8c;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>PL2303_SMART_PRODUCT_ID = $2303;</code> | ||
+ | | | ||
+ | |- | ||
+ | |} | ||
+ | </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;">'''PL2303 device Id''' <code> PL2303_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>PL2303_DEVICE_ID_COUNT = 64;</code> | ||
+ | | Number of supported Device IDs | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | |colspan="2"| <code>PL2303_DEVICE_ID:array[0..PL2303_DEVICE_ID_COUNT - 1] of TUSBDeviceId = (</code> | ||
+ | |- | ||
+ | | <code>(idVendor:PL2303_VENDOR_ID;idProduct:PL2303_PRODUCT_ID),</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>(idVendor:PL2303_VENDOR_ID;idProduct:PL2303_PRODUCT_ID_RSAQ2),</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>(idVendor:PL2303_VENDOR_ID;idProduct:PL2303_PRODUCT_ID_DCU11),</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>(idVendor:PL2303_VENDOR_ID;idProduct:PL2303_PRODUCT_ID_RSAQ3),</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>(idVendor:PL2303_VENDOR_ID;idProduct:PL2303_PRODUCT_ID_CHILITAG),</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>(idVendor:PL2303_VENDOR_ID;idProduct:PL2303_PRODUCT_ID_PHAROS),</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>(idVendor:PL2303_VENDOR_ID;idProduct:PL2303_PRODUCT_ID_ALDIGA),</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>(idVendor:PL2303_VENDOR_ID;idProduct:PL2303_PRODUCT_ID_MMX),</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>(idVendor:PL2303_VENDOR_ID;idProduct:PL2303_PRODUCT_ID_GPRS),</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>(idVendor:PL2303_VENDOR_ID;idProduct:PL2303_PRODUCT_ID_HCR331),</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>(idVendor:PL2303_VENDOR_ID;idProduct:PL2303_PRODUCT_ID_MOTOROLA),</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>(idVendor:PL2303_VENDOR_ID;idProduct:PL2303_PRODUCT_ID_ZTEK),</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>(idVendor:PL2303_VENDOR_ID;idProduct:PL2303_PRODUCT_ID_TB),</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>(idVendor:PL2303_IODATA_VENDOR_ID;idProduct:PL2303_IODATA_PRODUCT_ID),</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>(idVendor:PL2303_IODATA_VENDOR_ID;idProduct:PL2303_IODATA_PRODUCT_ID_RSAQ5),</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> | ||
+ | | | ||
+ | |- | ||
+ | | <code>(idVendor:PL2303_ATEN_VENDOR_ID2;idProduct:PL2303_ATEN_PRODUCT_ID),</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>(idVendor:PL2303_ELCOM_VENDOR_ID;idProduct:PL2303_ELCOM_PRODUCT_ID),</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>(idVendor:PL2303_ELCOM_VENDOR_ID;idProduct:PL2303_ELCOM_PRODUCT_ID_UCSGT),</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>(idVendor:PL2303_ITEGNO_VENDOR_ID;idProduct:PL2303_ITEGNO_PRODUCT_ID),</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>(idVendor:PL2303_ITEGNO_VENDOR_ID;idProduct:PL2303_ITEGNO_PRODUCT_ID_2080),</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>(idVendor:PL2303_MA620_VENDOR_ID;idProduct:PL2303_MA620_PRODUCT_ID),</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>(idVendor:PL2303_RATOC_VENDOR_ID;idProduct:PL2303_RATOC_PRODUCT_ID),</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>(idVendor:PL2303_TRIPP_VENDOR_ID;idProduct:PL2303_TRIPP_PRODUCT_ID),</code> | ||
+ | | | ||
+ | |- | ||
+ | |<code>(idVendor:PL2303_RADIOSHACK_VENDOR_ID;idProduct:PL2303_RADIOSHACK_PRODUCT_ID),</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>(idVendor:PL2303_DCU10_VENDOR_ID;idProduct:PL2303_DCU10_PRODUCT_ID),</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>(idVendor:PL2303_SITECOM_VENDOR_ID;idProduct:PL2303_SITECOM_PRODUCT_ID),</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>(idVendor:PL2303_ALCATEL_VENDOR_ID;idProduct:PL2303_ALCATEL_PRODUCT_ID),</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>(idVendor:PL2303_SIEMENS_VENDOR_ID;idProduct:PL2303_SIEMENS_PRODUCT_ID_SX1),</code> | ||
+ | | PL2303_QUIRK_UART_STATE_IDX0 | ||
+ | |- | ||
+ | | <code>(idVendor:PL2303_SIEMENS_VENDOR_ID;idProduct:PL2303_SIEMENS_PRODUCT_ID_X65),</code> | ||
+ | | PL2303_QUIRK_UART_STATE_IDX0 | ||
+ | |- | ||
+ | | <code>(idVendor:PL2303_SIEMENS_VENDOR_ID;idProduct:PL2303_SIEMENS_PRODUCT_ID_X75),</code> | ||
+ | | PL2303_QUIRK_UART_STATE_IDX0 | ||
+ | |- | ||
+ | | <code>(idVendor:PL2303_SIEMENS_VENDOR_ID;idProduct:PL2303_SIEMENS_PRODUCT_ID_EF81),</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>(idVendor:PL2303_BENQ_VENDOR_ID;idProduct:PL2303_BENQ_PRODUCT_ID_S81),</code> | ||
+ | | Benq/Siemens S81 | ||
+ | |- | ||
+ | | <code>(idVendor:PL2303_SYNTECH_VENDOR_ID;idProduct:PL2303_SYNTECH_PRODUCT_ID),</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>(idVendor:PL2303_NOKIA_CA42_VENDOR_ID;idProduct:PL2303_NOKIA_CA42_PRODUCT_ID),</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>(idVendor:PL2303_CA_42_CA42_VENDOR_ID;idProduct:PL2303_CA_42_CA42_PRODUCT_ID),</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>(idVendor:PL2303_SAGEM_VENDOR_ID;idProduct:PL2303_SAGEM_PRODUCT_ID),</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>(idVendor:PL2303_LEADTEK_VENDOR_ID;idProduct:PL2303_LEADTEK_9531_PRODUCT_ID),</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>(idVendor:PL2303_SPEEDDRAGON_VENDOR_ID;idProduct:PL2303_SPEEDDRAGON_PRODUCT_ID),</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>(idVendor:PL2303_DATAPILOT_U2_VENDOR_ID;idProduct:PL2303_DATAPILOT_U2_PRODUCT_ID),</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>(idVendor:PL2303_BELKIN_VENDOR_ID;idProduct:PL2303_BELKIN_PRODUCT_ID),</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>(idVendor:PL2303_ALCOR_VENDOR_ID;idProduct:PL2303_ALCOR_PRODUCT_ID),</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>(idVendor:PL2303_WS002IN_VENDOR_ID;idProduct:PL2303_WS002IN_PRODUCT_ID),</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>(idVendor:PL2303_COREGA_VENDOR_ID;idProduct:PL2303_COREGA_PRODUCT_ID),</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>(idVendor:PL2303_YCCABLE_VENDOR_ID;idProduct:PL2303_YCCABLE_PRODUCT_ID),</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>(idVendor:PL2303_SUPERIAL_VENDOR_ID;idProduct:PL2303_SUPERIAL_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_LD960TA_PRODUCT_ID),</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>(idVendor:PL2303_HP_VENDOR_ID;idProduct:PL2303_HP_LCM220_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> | ||
+ | | | ||
+ | |- | ||
+ | | <code>(idVendor:PL2303_CRESSI_VENDOR_ID;idProduct:PL2303_CRESSI_EDY_PRODUCT_ID),</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>(idVendor:PL2303_ZEAGLE_VENDOR_ID;idProduct:PL2303_ZEAGLE_N2ITION3_PRODUCT_ID),</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>(idVendor:PL2303_SONY_VENDOR_ID;idProduct:PL2303_SONY_QN3USB_PRODUCT_ID),</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>(idVendor:PL2303_SANWA_VENDOR_ID;idProduct:PL2303_SANWA_PRODUCT_ID),</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>(idVendor:PL2303_ADLINK_VENDOR_ID;idProduct:PL2303_ADLINK_ND6530_PRODUCT_ID),</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>(idVendor:PL2303_SMART_VENDOR_ID;idProduct:PL2303_SMART_PRODUCT_ID));</code> | ||
+ | | | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
=== Type definitions === | === Type definitions === | ||
---- | ---- | ||
− | '' | + | |
+ | '''PL2303 specific types''' | ||
+ | |||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;"> | ||
+ | <code>PPL2303SerialDevice = ^TPL2303SerialDevice;</code> | ||
+ | |||
+ | <code>TPL2303SerialDevice = 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> | ||
+ | | | ||
+ | |- | ||
+ | |colspan="2"|''USB Properties'' | ||
+ | |- | ||
+ | | <code>Model:LongWord;</code> | ||
+ | | Device model (eg PL2303_TYPE_01) | ||
+ | |- | ||
+ | | <code>Quirks:LongWord;</code> | ||
+ | | Unusual behaviours of specific chip versions | ||
+ | |- | ||
+ | | <code>Control:LongWord;</code> | ||
+ | | 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> | ||
+ | | True if a Transmit request is currently in progress | ||
+ | |- | ||
+ | | <code>ReceiveRequest:PUSBRequest;</code> | ||
+ | | USB request Bulk IN Endpoint | ||
+ | |- | ||
+ | | <code>ReceiveEndpoint:PUSBEndpointDescriptor;</code> | ||
+ | | PL2303 Bulk IN Endpoint | ||
+ | |- | ||
+ | | <code>TransmitRequest:PUSBRequest;</code> | ||
+ | | USB request for Bulk OUT Endpoint | ||
+ | |- | ||
+ | | <code>TransmitEndpoint:PUSBEndpointDescriptor;</code> | ||
+ | | PL2303 Bulk OUT Endpoint | ||
+ | |- | ||
+ | | <code>InterruptRequest:PUSBRequest;</code> | ||
+ | | USB request for Interrupt IN Endpoint | ||
+ | |- | ||
+ | | <code>InterruptEndpoint:PUSBEndpointDescriptor;</code> | ||
+ | | PL2303 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> | ||
+ | | | ||
+ | |- | ||
+ | | <code>TransmitComplete:LongWord;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>InterruptComplete:LongWord;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>InterruptErrors:LongWord;</code> | ||
+ | | | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
=== Public variables === | === Public variables === | ||
---- | ---- | ||
− | '' | + | ''None defined'' |
=== Function declarations === | === Function declarations === | ||
Line 36: | 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 47: | 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 59: | 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 71: | 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 83: | 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 102: | 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 120: | 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 138: | 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 150: | 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 165: | 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 180: | 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 192: | 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 207: | 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 219: | 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 | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | |||
+ | '''PL2303 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 PL2303CheckDevice(Device:PUSBDevice):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 | ||
+ | |- | ||
+ | ! 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 PL2303PatchDevice(Device:PUSBDevice; var Model,Quirks:LongWord):LongWord;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Check the USB device for quirks and model information needed by the driver</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 | ||
+ | |- | ||
+ | ! 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 PL2303VendorRead(Device:PUSBDevice; Value:Word; Data:PByte):LongWord;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Perform a vendor read request to a PL2303 device</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 PL2303VendorWrite(Device:PUSBDevice; Value,Index:Word):LongWord;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Perform a vendor write request to a PL2303 device</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 PL2303GetLineRequest(Device:PUSBDevice; Data:PByte):LongWord;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Perform a get line request to a PL2303 device</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 PL2303SetLineRequest(Device:PUSBDevice; Data:PByte):LongWord;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Perform a set line request to a PL2303 device</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 PL2303SetControlRequest(Device:PUSBDevice; Value:Word):LongWord;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Perform a set control request to a PL2303 device</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 PL2303EncodeBaudRate(Device:PUSBDevice; BaudRate:LongWord; Data:PByte):LongWord;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Encode a baud rate value into the Line Request buffer for a PL2303 device</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 PL2303GetSupportedRate(BaudRate:LongWord):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 | ||
|- | |- | ||
|} | |} |
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