|
|
Line 91: |
Line 91: |
| ! '''Note''' | | ! '''Note''' |
| | None documented | | | None documented |
− | |-
| |
− | |}
| |
− | </div></div>
| |
− | <br />
| |
− |
| |
− | '''FTDI serial USB 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 FTDISerialDriverBind(Device:PUSBDevice; Interrface:PUSBInterface):LongWord;</pre>
| |
− | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Bind the FTDI Serial driver to a USB device if it is suitable</div>
| |
− | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
| |
− | {| class="wikitable" style="font-size: 14px; background: white;"
| |
− | |-
| |
− | ! '''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
| |
− | |-
| |
− | |}
| |
− | </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 FTDISerialDriverUnbind(Device:PUSBDevice; Interrface:PUSBInterface):LongWord;</pre>
| |
− | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Unbind the FTDI Serial driver ?rom a USB device</div>
| |
− | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
| |
− | {| class="wikitable" style="font-size: 14px; background: white;"
| |
− | |-
| |
− | ! '''Device'''
| |
− | | The USB device to unbind ?rom
| |
− | |-
| |
− | ! '''Interrface'''
| |
− | | The USB interface to unbind ?rom (or nil for whole device)
| |
− | |-
| |
− | ! '''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;">procedure FTDISerialReceiveWorker(Request:PUSBRequest);</pre>
| |
− | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Called (by a Worker thread) to process a completed USB request ?rom the FTDI Serial bulk IN endpoint</div>
| |
− | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
| |
− | {| class="wikitable" style="font-size: 14px; background: white;"
| |
− | |-
| |
− | ! '''Request'''
| |
− | | The USB request which has completed
| |
− | |-
| |
− | ! '''Note'''
| |
− | | The first two bytes of the received packet will be:
| |
− | Byte 0: Modem Status
| |
− | Bit0 Reserved - must be 1
| |
− | Bit1 Reserved - must be 0
| |
− | Bit2 Reserved - must be 0
| |
− | Bit3 Reserved - must be 0
| |
− | Bit4 Clear to Send (CTS)
| |
− | Bit5 Data Set Ready (DSR)
| |
− | Bit6 Ring Indicator (RI)
| |
− | Bit7 Receive Line Signal Detect (RLSD)
| |
− |
| |
− | Byte 1: Line Status
| |
− | Bit0 Data Ready (DR)
| |
− | Bit1 Overrun Error (OE)
| |
− | Bit2 Parity Error (PE)
| |
− | Bit3 Framing Error (FE)
| |
− | Bit4 Break Interrupt (BI)
| |
− | Bit5 Transmitter Holding Register (THRE)
| |
− | Bit6 Transmitter Empty (TEMT)
| |
− | Bit7 Error in RCVR FIFO}
| |
− | |-
| |
− | |}
| |
− | </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 FTDISerialReceiveComplete(Request:PUSBRequest);</pre>
| |
− | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Called when a USB request ?rom the FTDI Serial bulk IN endpoint completes</div>
| |
− | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
| |
− | {| class="wikitable" style="font-size: 14px; background: white;"
| |
− | |-
| |
− | ! '''Request'''
| |
− | | The USB request which has completed
| |
− | |-
| |
− | ! '''Note'''
| |
− | | Request is passed to worker thread for processing to prevent blocking the USB completion
| |
− | |-
| |
− | |}
| |
− | </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 FTDISerialTransmitStart(Request:PUSBRequest);</pre>
| |
− | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Called to continue transmission of data ?rom the transmit 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 transmit request to use
| |
− | |-
| |
− | ! '''Note'''
| |
− | | The FTDISERIAL_CHIP_SIO device requires the first byte to be:
| |
− | Bit0 1 Reserved must be 1
| |
− | Bit1 0 Reserved must be 0
| |
− | Bit2..7 Length of message (not including this byte)
| |
− | Caller must hold the lock on the serial device
| |
− | |-
| |
− | |}
| |
− | </div></div>
| |
− | <br />
| |
− | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
| |
− | <pre style="border: 0; padding-bottom:0px;">procedure FTDISerialTransmitWorker(Request:PUSBRequest);</pre>
| |
− | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Called (by a Worker thread) to process a completed USB request to the FTDI Serial bulk OUT endpoint</div>
| |
− | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
| |
− | {| class="wikitable" style="font-size: 14px; background: white;"
| |
− | |-
| |
− | ! '''Request'''
| |
− | | The USB request which has completed
| |
− | |-
| |
− | |}
| |
− | </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 FTDISerialTransmitComplete(Request:PUSBRequest);</pre>
| |
− | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Called when a USB request to the FTDI Serial bulk OUT endpoint completes</div>
| |
− | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
| |
− | {| class="wikitable" style="font-size: 14px; background: white;"
| |
− | |-
| |
− | ! '''Request'''
| |
− | | The USB request which has completed
| |
− | |-
| |
− | ! '''Note'''
| |
− | | Request is passed to worker thread for processing to prevent blocking the USB completion
| |
| |- | | |- |
| |} | | |} |