Difference between revisions of "Unit PL2303"
From Ultibo.org
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 IN/OUT size | + | <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 217: | Line 217: | ||
<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 307: | ||
<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 ID | + | <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 684: | Line 684: | ||
<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 ID | + | <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;" |
Revision as of 03:05, 27 March 2017
Return to Unit Reference
Contents
[hide]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
[Expand]
PL2303 specific constants
PL2303_*
[Expand]
PL2303 device model
PL2303_TYPE_*
[Expand]
PL2303 bulk IN/OUT size
PL2303_BULK_*
[Expand]
PL2303 USB request
PL2303_*_REQUEST
[Expand]
PL2303 device quirk
PL2303_QUIRK_*
[Expand]
PL2303 supported baud rate
PL2303_SUPPORTED_BAUD_RATE_*
[Expand]
PL2303 vendor and product ID
PL2303_*_ID
[Expand]
PL2303 device ID
PL2303_DEVICE_ID_*
Type definitions
PL2303 specific types
Public variables
None defined
Function declarations
Initialization functions
PL2303 serial functions
[Expand]
function PL2303SerialDeviceOpen(Serial:PSerialDevice; BaudRate,DataBits,StopBits,Parity,FlowControl,ReceiveDepth,TransmitDepth:LongWord):LongWord;
Description: To be documented
[Expand]
function PL2303SerialDeviceClose(Serial:PSerialDevice):LongWord;
Description: To be documented
[Expand]
function PL2303SerialDeviceRead(Serial:PSerialDevice; Buffer:Pointer; Size,Flags:LongWord; var Count:LongWord):LongWord;
Description: To be documented
[Expand]
function PL2303SerialDeviceWrite(Serial:PSerialDevice; Buffer:Pointer; Size,Flags:LongWord; var Count:LongWord):LongWord;
Description: To be documented
PL2303 USB functions
[Expand]
function PL2303DriverBind(Device:PUSBDevice; Interrface:PUSBInterface):LongWord;
Description: Bind the PL2303 driver to a USB device if it is suitable
[Expand]
function PL2303DriverUnbind(Device:PUSBDevice; Interrface:PUSBInterface):LongWord;
Description: Unbind the PL2303 driver from a USB device
[Expand]
procedure PL2303ReceiveWorker(Request:PUSBRequest);
Description: Called (by a Worker thread) to process a completed USB request from the PL2303 bulk IN endpoint
[Expand]
procedure PL2303ReceiveComplete(Request:PUSBRequest);
Description: Called when a USB request from the PL2303 bulk IN endpoint completes
[Expand]
procedure PL2303TransmitStart(Request:PUSBRequest);
Description: Called to continue transmission of data from the transmit buffer
[Expand]
procedure PL2303TransmitWorker(Request:PUSBRequest);
Description: Called (by a Worker thread) to process a completed USB request to the PL2303 bulk OUT endpoint
[Expand]
procedure PL2303TransmitComplete(Request:PUSBRequest);
Description: Called when a USB request to the PL2303 bulk OUT endpoint completes
[Expand]
procedure PL2303InterruptWorker(Request:PUSBRequest);
Description: Called (by a Worker thread) to process a completed USB request to the PL2303 interrupt IN endpoint
[Expand]
procedure PL2303InterruptComplete(Request:PUSBRequest);
Description: Called when a USB request from the PL2303 interrupt IN endpoint completes
PL2303 helper functions
[Expand]
function PL2303CheckDevice(Device:PUSBDevice):LongWord;
Description: Check the Vendor and Device ID against the supported devices
[Expand]
function PL2303PatchDevice(Device:PUSBDevice; var Model,Quirks:LongWord):LongWord;
Description: Check the USB device for quirks and model information needed by the driver
[Expand]
function PL2303VendorRead(Device:PUSBDevice; Value:Word; Data:PByte):LongWord;
Description: Perform a vendor read request to a PL2303 device
[Expand]
function PL2303VendorWrite(Device:PUSBDevice; Value,Index:Word):LongWord;
Description: Perform a vendor write request to a PL2303 device
[Expand]
function PL2303GetLineRequest(Device:PUSBDevice; Data:PByte):LongWord;
Description: Perform a get line request to a PL2303 device
[Expand]
function PL2303SetLineRequest(Device:PUSBDevice; Data:PByte):LongWord;
Description: Perform a set line request to a PL2303 device
[Expand]
function PL2303SetControlRequest(Device:PUSBDevice; Value:Word):LongWord;
Description: Perform a set control request to a PL2303 device
[Expand]
function PL2303EncodeBaudRate(Device:PUSBDevice; BaudRate:LongWord; Data:PByte):LongWord;
Description: Encode a baud rate value into the Line Request buffer for a PL2303 device
Return to Unit Reference