Component: UART (Peripheral CAL)

From Flowcode Help
Jump to navigationJump to search


Author Matrix Ltd
Version 1.2 (Release)
Category Peripheral CAL


Image UART component

A low level implementation giving direct access to the CAL


Examples

Example template program for creating a new component using the CAL UART. Contains all the code to allow the dynamic UART channel population, re-mappable I/O functionality and COM port / Injector functionality. FC6 Icon.png UART CAL Demo

Downloadable macro reference

UpdateBaud

Change the Baud Rate to new_baud

Parameters

BYTE new_baud
The new baud rate (0=1200, 7=115200)


Return value

This call does not return a value


Receive

Receive a Character

Parameters

BYTE Timeout
Period to wait for the character to be received


Return value

INT


Send

Send the Character

Parameters

UINT Char
The Character to send


Return value

This call does not return a value


Init

Initialize the component with the specified properties

Parameters

This macro has no parameters


Return value

This call does not return a value


Delay

Software UART Bit Delay

Parameters

This macro has no parameters


Return value

This call does not return a value


Uninit

Un-initialize the UART and release the resources

Parameters

This macro has no parameters


Return value

This call does not return a value


Simulation macro reference

GetValue

Get Value of Named property

Parameters

STRING Name


Return value

STRING


GetConsoleHandle

No additional information


Parameters

This macro has no parameters


Return value

HANDLE


SetValue

set Value of Named property

Parameters

STRING Name
STRING Value


Return value

This call does not return a value


GetList

Gets Named property List

Parameters

STRING Name


Return value

STRING



Property reference

Channel

This property is of type Fixed list of ints and can be referenced with the variable name CHANNEL.

UART Channel selector

TX

This property is of type Single digital pin and can be referenced with the variable name TX.

Pin to be used for Transmit data

TX Remap Pin

This property is of type Fixed list of ints and can be referenced with the variable name OutputPins.

No additional information


RX

This property is of type Single digital pin and can be referenced with the variable name RX.

Pin to be used for Receive data

RX Remap Pin

This property is of type Fixed list of ints and can be referenced with the variable name InputPins.

No additional information


Baud Options

This property is of type Fixed list of ints and can be referenced with the variable name BAUD_LIST.

Baud rate option selector

Baud Rate

This property is of type Signed integer and can be referenced with the variable name BAUD.

No additional information


Data Bits

This property is of type Fixed list of ints and can be referenced with the variable name DBITS.

Number of data bits

Return

This property is of type Fixed list of ints and can be referenced with the variable name RETURN.

Return data width from Receive macro

Echo

This property is of type Fixed list of ints and can be referenced with the variable name ECHO.

Echo selection

Interrupt

This property is of type Fixed list of ints and can be referenced with the variable name INT.

Interrupt mode enable or disable

Flow Control

This property is of type Fixed list of ints and can be referenced with the variable name FLOWEN.

Flow Control (Handshake) enable or disable

Scope Traces

This property is of type True or false and can be referenced with the variable name ScopeTraces.

Selects if the scope traces are automatically generated or not

Console Data

This property is of type True or false and can be referenced with the variable name ConsoleData.

Selects if the console data is automatically generated or not