Difference between revisions of "Component: UART (Peripheral CAL)"

From Flowcode Help
Jump to navigationJump to search
(XML import)
 
(XML import BR)
 
(One intermediate revision by the same user not shown)
Line 7: Line 7:
 
|-
 
|-
 
| width="20%" style="color: gray;" | Version
 
| width="20%" style="color: gray;" | Version
| 1.1 (Release)
+
| 1.2 (Release)
 
|-
 
|-
 
| width="20%" style="color: gray;" | Category
 
| width="20%" style="color: gray;" | Category
Line 20: Line 20:
  
 
==Examples==
 
==Examples==
''<span style="color:red;">No additional examples</span>''
+
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.
 
+
{{Fcfile|UART_CAL_Demo.fcfx|UART CAL Demo}}
  
 
==Downloadable macro reference==
 
==Downloadable macro reference==
Line 179: Line 179:
  
 
Pin to be used for Transmit data
 
Pin to be used for Transmit data
 +
 +
<span style="font-weight: normal;"><u>TX Remap Pin</u></span>
 +
 +
This property is of type ''Fixed list of ints'' and can be referenced with the variable name ''OutputPins''.
 +
 +
''<span style="color:red;">No additional information</span>''
 +
 +
  
 
<span style="font-weight: normal;"><u>RX</u></span>
 
<span style="font-weight: normal;"><u>RX</u></span>
Line 185: Line 193:
  
 
Pin to be used for Receive data
 
Pin to be used for Receive data
 +
 +
<span style="font-weight: normal;"><u>RX Remap Pin</u></span>
 +
 +
This property is of type ''Fixed list of ints'' and can be referenced with the variable name ''InputPins''.
 +
 +
''<span style="color:red;">No additional information</span>''
 +
 +
  
 
<span style="font-weight: normal;"><u>Baud Options</u></span>
 
<span style="font-weight: normal;"><u>Baud Options</u></span>
Line 229: Line 245:
  
 
Flow Control (Handshake) enable or disable
 
Flow Control (Handshake) enable or disable
 
<span style="font-weight: normal;"><u>RTS</u></span>
 
 
This property is of type ''Single digital pin'' and can be referenced with the variable name ''RTS''.
 
 
Pin to be used for Request To Send handshake function
 
 
<span style="font-weight: normal;"><u>CTS</u></span>
 
 
This property is of type ''Single digital pin'' and can be referenced with the variable name ''CTS''.
 
 
Pin to be used for Clear To Send handshake function
 
  
 
<span style="font-weight: normal;"><u>Scope Traces</u></span>
 
<span style="font-weight: normal;"><u>Scope Traces</u></span>

Latest revision as of 15:45, 16 February 2017


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