Difference between revisions of "Unit UART"
Line 538: | Line 538: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Note |
| Called only during system startup | | Called only during system startup | ||
|- | |- | ||
Line 553: | Line 553: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! UART |
| The UART device to open | | The UART device to open | ||
|- | |- | ||
− | ! | + | ! BaudRate |
− | | Baud rate for the connection (eg 9600, 57600, 115200 etc | + | | Baud rate for the connection (eg 9600, 57600, 115200 etc) |
|- | |- | ||
− | ! | + | ! DataBits |
| Size of the data (eg SERIAL_DATA_8BIT) | | Size of the data (eg SERIAL_DATA_8BIT) | ||
|- | |- | ||
− | ! | + | ! StopBits |
| Number of stop bits (eg SERIAL_STOP_1BIT) | | Number of stop bits (eg SERIAL_STOP_1BIT) | ||
|- | |- | ||
− | ! | + | ! Parity |
| Parity type for the data (eg SERIAL_PARITY_NONE) | | Parity type for the data (eg SERIAL_PARITY_NONE) | ||
|- | |- | ||
− | ! | + | ! FlowControl |
| Flow control for the connection (eg SERIAL_FLOW_NONE) | | Flow control for the connection (eg SERIAL_FLOW_NONE) | ||
|- | |- | ||
− | ! | + | ! Return |
| ERROR_SUCCESS if completed or another error code on failure | | ERROR_SUCCESS if completed or another error code on failure | ||
|- | |- | ||
Line 583: | Line 583: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! UART |
| The UART device to close | | The UART device to close | ||
|- | |- | ||
− | ! | + | ! Return |
| ERROR_SUCCESS if completed or another error code on failure | | ERROR_SUCCESS if completed or another error code on failure | ||
|- | |- | ||
Line 598: | Line 598: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! UART |
| The UART device to read from | | The UART device to read from | ||
|- | |- | ||
− | ! | + | ! Buffer |
| Pointer to a buffer to receive the data | | Pointer to a buffer to receive the data | ||
|- | |- | ||
− | ! | + | ! Size |
| The size of the buffer | | The size of the buffer | ||
|- | |- | ||
− | ! | + | ! Flags |
| The flags to control reading (eg UART_READ_NON_BLOCK) | | The flags to control reading (eg UART_READ_NON_BLOCK) | ||
|- | |- | ||
− | ! | + | ! Count |
| The number of bytes read on return | | The number of bytes read on return | ||
|- | |- | ||
− | ! | + | ! Return |
| ERROR_SUCCESS if completed or another error code on failure | | ERROR_SUCCESS if completed or another error code on failure | ||
|- | |- | ||
Line 625: | Line 625: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! UART |
| The UART device to write to | | The UART device to write to | ||
|- | |- | ||
− | ! | + | ! Buffer |
| Pointer to a buffer of data to transmit | | Pointer to a buffer of data to transmit | ||
|- | |- | ||
− | ! | + | ! Size |
| The size of the buffer | | The size of the buffer | ||
|- | |- | ||
− | ! | + | ! Flags |
| The flags to control writing (eg UART_WRITE_NON_BLOCK) | | The flags to control writing (eg UART_WRITE_NON_BLOCK) | ||
|- | |- | ||
− | ! | + | ! Count |
| The number of bytes written on return | | The number of bytes written on return | ||
|- | |- | ||
− | ! | + | ! Return |
| ERROR_SUCCESS if completed or another error code on failure | | ERROR_SUCCESS if completed or another error code on failure | ||
|- | |- | ||
Line 652: | Line 652: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! UART |
| The UART device to wait for | | The UART device to wait for | ||
|- | |- | ||
− | ! | + | ! Direction |
| The direction of data to wait for (eg UART_WAIT_RECEIVE) | | The direction of data to wait for (eg UART_WAIT_RECEIVE) | ||
|- | |- | ||
− | ! | + | ! Timeout |
| The number of milliseconds to wait for data (INFINITE to wait forever) | | The number of milliseconds to wait for data (INFINITE to wait forever) | ||
|- | |- | ||
− | ! | + | ! Return |
| ERROR_SUCCESS if completed or another error code on failure | | ERROR_SUCCESS if completed or another error code on failure | ||
|- | |- | ||
Line 673: | Line 673: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! UART |
| The UART device to get the status from | | The UART device to get the status from | ||
|- | |- | ||
− | ! | + | ! Return |
| A set of flags containing the device status (eg UART_STATUS_RTS) | | A set of flags containing the device status (eg UART_STATUS_RTS) | ||
|- | |- | ||
− | ! | + | ! Note |
| Replaced by UARTDeviceGetStatus for consistency | | Replaced by UARTDeviceGetStatus for consistency | ||
|- | |- | ||
Line 691: | Line 691: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! UART |
| The UART device to get the status from | | The UART device to get the status from | ||
|- | |- | ||
− | ! | + | ! Return |
| A set of flags containing the device status (eg UART_STATUS_RTS) | | A set of flags containing the device status (eg UART_STATUS_RTS) | ||
|- | |- | ||
Line 706: | Line 706: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! UART |
| The UART device to set the status for | | The UART device to set the status for | ||
|- | |- | ||
− | ! | + | ! Status |
| The device status flags to be set (eg UART_STATUS_RTS) | | The device status flags to be set (eg UART_STATUS_RTS) | ||
|- | |- | ||
− | ! | + | ! Return |
| ERROR_SUCCESS if completed or another error code on failure | | ERROR_SUCCESS if completed or another error code on failure | ||
|- | |- | ||
− | ! | + | ! Note |
− | | Not all UART_STATUS_* flags can be set, the device may ignore invalid values | + | | Not all UART_STATUS_* flags can be set, the device may ignore invalid values. |
− | Not all UART devices support set status, returns ERROR_CALL_NOT_IMPLEMENTED if not supported | + | Not all UART devices support set status, returns ERROR_CALL_NOT_IMPLEMENTED if not supported. |
|- | |- | ||
|} | |} | ||
Line 728: | Line 728: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! UART |
| The UART device to get properties from | | The UART device to get properties from | ||
|- | |- | ||
− | ! | + | ! Properties |
| Pointer to a PUARTProperties structure to fill in | | Pointer to a PUARTProperties structure to fill in | ||
|- | |- | ||
− | ! | + | ! Return |
| ERROR_SUCCESS if completed or another error code on failure | | ERROR_SUCCESS if completed or another error code on failure | ||
|- | |- | ||
− | ! | + | ! Note |
| Replaced by UARTDeviceGetProperties for consistency | | Replaced by UARTDeviceGetProperties for consistency | ||
|- | |- | ||
Line 749: | Line 749: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! UART |
| The UART device to get properties from | | The UART device to get properties from | ||
|- | |- | ||
− | ! | + | ! Properties |
| Pointer to a PUARTProperties structure to fill in | | Pointer to a PUARTProperties structure to fill in | ||
|- | |- | ||
− | ! | + | ! Return |
| ERROR_SUCCESS if completed or another error code on failure | | ERROR_SUCCESS if completed or another error code on failure | ||
|- | |- | ||
Line 767: | Line 767: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! UART |
| The UART device to set properties for | | The UART device to set properties for | ||
|- | |- | ||
− | ! | + | ! Properties |
| Pointer to a PUARTProperties structure to use | | Pointer to a PUARTProperties structure to use | ||
|- | |- | ||
− | ! | + | ! Return |
| ERROR_SUCCESS if completed or another error code on failure | | ERROR_SUCCESS if completed or another error code on failure | ||
|- | |- | ||
Line 785: | Line 785: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Return |
| Pointer to new UART entry or nil if UART could not be created | | Pointer to new UART entry or nil if UART could not be created | ||
|- | |- | ||
Line 797: | Line 797: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Size |
| Size in bytes to allocate for new UART (Including the UART entry) | | Size in bytes to allocate for new UART (Including the UART entry) | ||
|- | |- | ||
− | ! | + | ! Return |
| Pointer to new UART entry or nil if UART could not be created | | Pointer to new UART entry or nil if UART could not be created | ||
|- | |- | ||
Line 812: | Line 812: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! UART |
| The UART device to destroy | | The UART device to destroy | ||
|- | |- | ||
− | ! | + | ! Return |
| ERROR_SUCCESS if completed or another error code on failure | | ERROR_SUCCESS if completed or another error code on failure | ||
|- | |- | ||
Line 827: | Line 827: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! UART |
| The UART device to register | | The UART device to register | ||
|- | |- | ||
− | ! | + | ! Return |
| ERROR_SUCCESS if completed or another error code on failure | | ERROR_SUCCESS if completed or another error code on failure | ||
|- | |- | ||
Line 842: | Line 842: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! UART |
| The UART device to deregister | | The UART device to deregister | ||
|- | |- | ||
− | ! | + | ! Return |
| ERROR_SUCCESS if completed or another error code on failure | | ERROR_SUCCESS if completed or another error code on failure | ||
|- | |- | ||
Line 857: | Line 857: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! UARTId |
| The Id number of the UART to find | | The Id number of the UART to find | ||
|- | |- | ||
− | ! | + | ! Return |
| Pointer to UART device entry or nil if not found | | Pointer to UART device entry or nil if not found | ||
|- | |- | ||
Line 872: | Line 872: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Name |
| The name of the UART to find (eg UART0) | | The name of the UART to find (eg UART0) | ||
|- | |- | ||
− | ! | + | ! Return |
| Pointer to UART device entry or nil if not found | | Pointer to UART device entry or nil if not found | ||
|- | |- | ||
Line 887: | Line 887: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Description |
| The description of the UART to find (eg BCM2836 PL011 UART) | | The description of the UART to find (eg BCM2836 PL011 UART) | ||
|- | |- | ||
− | ! | + | ! Return |
| Pointer to UART device entry or nil if not found | | Pointer to UART device entry or nil if not found | ||
|- | |- | ||
Line 902: | Line 902: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Callback |
| The callback function to call for each UART in the table | | The callback function to call for each UART in the table | ||
|- | |- | ||
− | ! | + | ! Data |
| A private data pointer to pass to callback for each UART in the table | | A private data pointer to pass to callback for each UART in the table | ||
|- | |- | ||
− | ! | + | ! Return |
| ERROR_SUCCESS if completed or another error code on failure | | ERROR_SUCCESS if completed or another error code on failure | ||
|- | |- | ||
Line 920: | Line 920: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! UART |
| The UART device to notify changes for (Optional, pass nil for all UART devices) | | The UART device to notify changes for (Optional, pass nil for all UART devices) | ||
|- | |- | ||
− | ! | + | ! Callback |
| The function to call when a notification event occurs | | The function to call when a notification event occurs | ||
|- | |- | ||
− | ! | + | ! Data |
| A private data pointer to pass to callback when a notification event occurs | | A private data pointer to pass to callback when a notification event occurs | ||
|- | |- | ||
− | ! | + | ! Notification |
| The events to register for notification of (eg DEVICE_NOTIFICATION_REGISTER) | | The events to register for notification of (eg DEVICE_NOTIFICATION_REGISTER) | ||
|- | |- | ||
− | ! | + | ! Flags |
| The flags to control the notification (eg NOTIFIER_FLAG_WORKER) | | The flags to control the notification (eg NOTIFIER_FLAG_WORKER) | ||
|- | |- | ||
Line 947: | Line 947: | ||
{| 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 | + | | Not intended to be called directly by applications, use SerialDeviceOpen instead. |
|- | |- | ||
|} | |} | ||
Line 959: | Line 959: | ||
{| 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 | + | | Not intended to be called directly by applications, use SerialDeviceClose instead. |
|- | |- | ||
|} | |} | ||
Line 971: | Line 971: | ||
{| 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 | + | | Not intended to be called directly by applications, use SerialDeviceRead instead. |
|- | |- | ||
|} | |} | ||
Line 983: | Line 983: | ||
{| 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 | + | | Not intended to be called directly by applications, use SerialDeviceWrite instead. |
|- | |- | ||
|} | |} | ||
Line 995: | Line 995: | ||
{| 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 SerialDeviceWait instead | + | | Not intended to be called directly by applications, use SerialDeviceWait instead. |
|- | |- | ||
|} | |} | ||
Line 1,007: | Line 1,007: | ||
{| 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 SerialDeviceStatus instead | + | | Not intended to be called directly by applications, use SerialDeviceStatus instead. |
Replaced by UARTSerialDeviceGetStatus for consistency | Replaced by UARTSerialDeviceGetStatus for consistency | ||
|- | |- | ||
Line 1,020: | Line 1,020: | ||
{| 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 SerialDeviceGetStatus instead | + | | Not intended to be called directly by applications, use SerialDeviceGetStatus instead. |
|- | |- | ||
|} | |} | ||
Line 1,032: | Line 1,032: | ||
{| 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 SerialDeviceSetStatus instead | + | | Not intended to be called directly by applications, use SerialDeviceSetStatus instead. |
|- | |- | ||
|} | |} | ||
Line 1,044: | Line 1,044: | ||
{| 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 SerialDeviceGetProperties instead | + | | Not intended to be called directly by applications, use SerialDeviceGetProperties instead. |
|- | |- | ||
|} | |} | ||
Line 1,059: | Line 1,059: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Note |
| None documented | | None documented | ||
|- | |- | ||
Line 1,071: | Line 1,071: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Note |
| None documented | | None documented | ||
|- | |- | ||
Line 1,083: | Line 1,083: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Note |
| None documented | | None documented | ||
|- | |- | ||
Line 1,095: | Line 1,095: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Note |
| None documented | | None documented | ||
|- | |- | ||
Line 1,107: | Line 1,107: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Note |
| None documented | | None documented | ||
|- | |- | ||
Line 1,119: | Line 1,119: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Note |
| None documented | | None documented | ||
|- | |- | ||
Line 1,131: | Line 1,131: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Note |
| None documented | | None documented | ||
|- | |- | ||
Line 1,143: | Line 1,143: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Note |
| None documented | | None documented | ||
|- | |- | ||
Line 1,155: | Line 1,155: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Note |
| None documented | | None documented | ||
|- | |- | ||
Line 1,170: | Line 1,170: | ||
{| 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 | | Not intended to be called directly by applications | ||
|- | |- | ||
Line 1,182: | Line 1,182: | ||
{| 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 | | Not intended to be called directly by applications | ||
|- | |- |
Revision as of 06:19, 20 April 2018
Return to Unit Reference
Contents
[hide]Description
Ultibo UART interface unit
UART (Universal Asynchronous Receiver Transmitter) devices represent the industry standard serial communications devices that are available on almost every system.
This unit implements the framework for UART devices and provides a standardized API to allow driver specific implementation to be abstracted. All UART devices are also represented as a serial device and this unit handles the relationship between the two devices.
Each UART device returns a set of properties that describe the capabilities of the device and includes a set of flags that indicate what features are supported.
Reads and writes to UART devices are unbuffered and simply pass raw data to and from the caller unless the serial interface is used instead which includes buffering of transmitted and received data. Both reads and writes allow for non blocking so that a caller can avoid waiting for received data to be available or the device to be ready to transmit.
Constants
UART_*
UART_TYPE_*
UART_MODE_*
UART_STATE_*
UART_FLAG_*
UART_READ_*
UART_WRITE_*
UART_WAIT_*
UART_STATUS_*
UART_LOG_*
Type definitions
UART properties
UART enumeration callback
TUARTEnumerate = function(UART:PUARTDevice; Data:Pointer):LongWord;
|
UART notification callback
TUARTNotification = function(Device:PDevice; Data:Pointer; Notification:LongWord):LongWord;
|
UART device open
TUARTDeviceOpen = function(UART:PUARTDevice; BaudRate,DataBits,StopBits,Parity,FlowControl:LongWord):LongWord;
|
UART device close
TUARTDeviceClose = function(UART:PUARTDevice):LongWord;
|
UART device read
TUARTDeviceRead = function(UART:PUARTDevice; Buffer:Pointer; Size,Flags:LongWord; var Count:LongWord):LongWord;
|
UART device write
TUARTDeviceWrite = function(UART:PUARTDevice; Buffer:Pointer; Size,Flags:LongWord; var Count:LongWord):LongWord;
|
UART device wait
TUARTDeviceWait = function(UART:PUARTDevice; Direction,Timeout:LongWord):LongWord;
|
UART device get status
TUARTDeviceGetStatus = function(UART:PUARTDevice):LongWord;
|
UART device set status
TUARTDeviceSetStatus = function(UART:PUARTDevice; Status:LongWord):LongWord;
|
UART device get properties
TUARTDeviceGetProperties = function(UART:PUARTDevice; Properties:PUARTProperties):LongWord;
|
UART device set properties
TUARTDeviceSetProperties = function(UART:PUARTDevice; Properties:PUARTProperties):LongWord;
|
UART device
Public variables
UART logging
UART_DEFAULT_LOG_LEVEL:LongWord = UART_LOG_LEVEL_DEBUG;
|
Minimum level for UART messages. Only messages with level greater than or equal to this will be printed. |
UART_LOG_ENABLED:Boolean;
|
Function declarations
Initialization functions
UART functions
function UARTDeviceOpen(UART:PUARTDevice; BaudRate,DataBits,StopBits,Parity,FlowControl:LongWord):LongWord;
function UARTDeviceClose(UART:PUARTDevice):LongWord;
function UARTDeviceRead(UART:PUARTDevice; Buffer:Pointer; Size,Flags:LongWord;var Count:LongWord):LongWord;
function UARTDeviceWrite(UART:PUARTDevice; Buffer:Pointer; Size,Flags:LongWord;var Count:LongWord):LongWord;
function UARTDeviceWait(UART:PUARTDevice; Direction,Timeout:LongWord):LongWord;
function UARTDeviceStatus(UART:PUARTDevice):LongWord; inline;
function UARTDeviceGetStatus(UART:PUARTDevice):LongWord;
function UARTDeviceSetStatus(UART:PUARTDevice;Status:LongWord):LongWord;
function UARTDeviceProperties(UART:PUARTDevice; Properties:PUARTProperties):LongWord; inline;
function UARTDeviceGetProperties(UART:PUARTDevice;Properties:PUARTProperties):LongWord;
function UARTDeviceSetProperties(UART:PUARTDevice; Properties:PUARTProperties):LongWord;
function UARTDeviceCreateEx(Size:LongWord):PUARTDevice;
function UARTDeviceDestroy(UART:PUARTDevice):LongWord;
function UARTDeviceRegister(UART:PUARTDevice):LongWord;
function UARTDeviceDeregister(UART:PUARTDevice):LongWord;
function UARTDeviceFind(UARTId:LongWord):PUARTDevice;
function UARTDeviceFindByName(const Name:String):PUARTDevice; inline;
function UARTDeviceFindByDescription(const Description:String):PUARTDevice; inline;
function UARTDeviceEnumerate(Callback:TUARTEnumerate; Data:Pointer):LongWord;
function UARTDeviceNotification(UART:PUARTDevice; Callback:TUARTNotification; Data:Pointer; Notification,Flags:LongWord):LongWord;
UART serial functions
function UARTSerialDeviceOpen(Serial:PSerialDevice; BaudRate,DataBits,StopBits,Parity,FlowControl,ReceiveDepth,TransmitDepth:LongWord):LongWord;
function UARTSerialDeviceClose(Serial:PSerialDevice):LongWord;
function UARTSerialDeviceRead(Serial:PSerialDevice; Buffer:Pointer; Size,Flags:LongWord; var Count:LongWord):LongWord;
function UARTSerialDeviceWrite(Serial:PSerialDevice; Buffer:Pointer; Size,Flags:LongWord; var Count:LongWord):LongWord;
function UARTSerialDeviceWait(Serial:PSerialDevice; Direction,Timeout:LongWord; var Count:LongWord):LongWord;
function UARTSerialDeviceStatus(Serial:PSerialDevice):LongWord; inline;
function UARTSerialDeviceGetStatus(Serial:PSerialDevice):LongWord;
function UARTSerialDeviceSetStatus(Serial:PSerialDevice; Status:LongWord):LongWord;
function UARTSerialDeviceGetProperties(Serial:PSerialDevice;Properties:PSerialProperties):LongWord;
UART helper functions
function UARTDeviceGetDefault:PUARTDevice; inline;
function UARTDeviceSetDefault(UART:PUARTDevice):LongWord;
function UARTDeviceCheck(UART:PUARTDevice):PUARTDevice;
procedure UARTLog(Level:LongWord;UART:PUARTDevice; const AText:String);
procedure UARTLogInfo(UART:PUARTDevice; const AText:String); inline;
procedure UARTLogWarn(UART:PUARTDevice; const AText:String); inline;
procedure UARTLogError(UART:PUARTDevice; const AText:String); inline;
procedure UARTLogDebug(UART:PUARTDevice; const AText:String); inline;
UART serial helper functions
function UARTSerialDeviceReceive(UART:PUARTDevice):LongWord;
function UARTSerialDeviceTransmit(UART:PUARTDevice):LongWord;
Return to Unit Reference