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

From Flowcode Help
Jump to navigationJump to search
Line 17: Line 17:
 
==Component Source Code==
 
==Component Source Code==
  
Please click here to download the component source project: [https://www.flowcode.co.uk/wiki/componentsource/FC_Comp_Source_UART_Free.fcfx FC_Comp_Source_UART_Free.fcfx]
+
Please click here to download the component source project: [https://www.flowcode.co.uk/wiki/componentsource/FC_Comp_Source_temp/UART_Free.fcfx FC_Comp_Source_temp/UART_Free.fcfx]
  
Please click here to view the component source code (Beta): [https://www.flowcode.co.uk/FlowchartView/?wfile=componentsource/FC_Comp_Source_UART_Free.fcfx FC_Comp_Source_UART_Free.fcfx]
+
Please click here to view the component source code (Beta): [https://www.flowcode.co.uk/FlowchartView/?wfile=componentsource/FC_Comp_Source_temp/UART_Free.fcfx FC_Comp_Source_temp/UART_Free.fcfx]
  
 
==Detailed description==
 
==Detailed description==
Line 78: Line 78:
  
 
Example showing how to build a component using a CAL component [[Using_CAL_Components|Using CAL Components]].
 
Example showing how to build a component using a CAL component [[Using_CAL_Components|Using CAL Components]].
 +
 +
  
  
Line 86: Line 88:
 
==Macro reference==
 
==Macro reference==
  
===UpdateBaud===
+
===Delay===
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
|-
 
|-
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''UpdateBaud'''
+
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Delay'''
 
|-
 
|-
| colspan="2" | Changes the UART Baud rate. 0 = 1200 / 1 = 2400 / 3 = 4800 / 3 = 9600 / 4 = 19200 / 5 = 38400 6 = 57600 / 7 = 115200 
+
| colspan="2" | Software UART Bit Delay 
|-
 
|-
 
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 
| width="90%" | new_baud
 
 
|-
 
|-
| colspan="2" | The new baud rate (0=1200, 7=115200) 
 
 
|-
 
|-
 
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
 
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
Line 105: Line 102:
  
  
===GetValue===
+
===GetConsoleHandle===
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
|-
 
|-
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''GetValue'''
+
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''GetConsoleHandle'''
 
|-
 
|-
| colspan="2" | Get Value of Named property 
+
| colspan="2" |  
 
|-
 
|-
 
|-
 
|-
| width="10%" align="center" | [[File:Fc9-string-icon.png]] - STRING
+
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-h32-icon.png]] - HANDLE
| width="90%" | Name
 
|-
 
| colspan="2" |  
 
|-
 
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-string-icon.png]] - STRING
 
 
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 
|}
 
|}
  
  
===Receive===
+
===GetList===
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
|-
 
|-
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Receive'''
+
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''GetList'''
 
|-
 
|-
| colspan="2" | Receive a Character 
+
| colspan="2" | Gets Named property List 
 
|-
 
|-
 
|-
 
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
+
| width="10%" align="center" | [[File:Fc9-string-icon.png]] - STRING
| width="90%" | Timeout
+
| width="90%" | Name
 
|-
 
|-
| colspan="2" | Period to wait for the character to be received 
+
| colspan="2" |  
 
|-
 
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-s16-icon.png]] - INT
+
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-string-icon.png]] - STRING
 
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 
|}
 
|}
  
  
===Send===
+
===GetValue===
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
|-
 
|-
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Send'''
+
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''GetValue'''
 
|-
 
|-
| colspan="2" | Send the Character  
+
| colspan="2" | Get Value of Named property 
 
|-
 
|-
 
|-
 
|-
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
+
| width="10%" align="center" | [[File:Fc9-string-icon.png]] - STRING
| width="90%" | Char
+
| width="90%" | Name
 
|-
 
|-
| colspan="2" | The Character to send 
+
| colspan="2" |  
 
|-
 
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
+
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-string-icon.png]] - STRING
 
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 
|}
 
|}
  
  
===GetConsoleHandle===
+
===Init===
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
|-
 
|-
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''GetConsoleHandle'''
+
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Init'''
 
|-
 
|-
| colspan="2" |  
+
| colspan="2" | Initialize the component with the specified properties 
 
|-
 
|-
 
|-
 
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-h32-icon.png]] - HANDLE
+
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
 
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 
|}
 
|}
  
  
===Init===
+
===Receive===
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
|-
 
|-
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Init'''
+
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Receive'''
 +
|-
 +
| colspan="2" | Receive a Character 
 +
|-
 
|-
 
|-
| colspan="2" | Initialize the component with the specified properties 
+
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 +
| width="90%" | Timeout
 
|-
 
|-
 +
| colspan="2" | Period to wait for the character to be received 
 
|-
 
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
+
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-s16-icon.png]] - INT
 
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 
|}
 
|}
  
  
===Delay===
+
===Send===
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
|-
 
|-
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Delay'''
+
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Send'''
 +
|-
 +
| colspan="2" | Send the Character  
 +
|-
 
|-
 
|-
| colspan="2" | Software UART Bit Delay 
+
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
 +
| width="90%" | Char
 
|-
 
|-
 +
| colspan="2" | The Character to send 
 
|-
 
|-
 
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
 
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
Line 242: Line 244:
  
  
===GetList===
+
===UpdateBaud===
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
|-
 
|-
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''GetList'''
+
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''UpdateBaud'''
 
|-
 
|-
| colspan="2" | Gets Named property List 
+
| colspan="2" | Changes the UART Baud rate. 0 = 1200 / 1 = 2400 / 3 = 4800 / 3 = 9600 / 4 = 19200 / 5 = 38400 6 = 57600 / 7 = 115200 
 
|-
 
|-
 
|-
 
|-
| width="10%" align="center" | [[File:Fc9-string-icon.png]] - STRING
+
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | Name
+
| width="90%" | new_baud
 
|-
 
|-
| colspan="2" |  
+
| colspan="2" | The new baud rate (0=1200, 7=115200) 
 
|-
 
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-string-icon.png]] - STRING
+
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
 
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 
|}
 
|}

Revision as of 12:03, 3 February 2023

Author Matrix Ltd
Version 1.3
Category Peripheral CAL


UART Free component

A low level implementation giving direct access to the CAL

Component Source Code

Please click here to download the component source project: FC_Comp_Source_temp/UART_Free.fcfx

Please click here to view the component source code (Beta): FC_Comp_Source_temp/UART_Free.fcfx

Detailed description

No detailed description exists yet for this component

Examples

Example showing how to build a component using a CAL component Using CAL Components.





Macro reference

Delay

Fc9-comp-macro.png Delay
Software UART Bit Delay 
Fc9-void-icon.png - VOID Return


GetConsoleHandle

Fc9-comp-macro.png GetConsoleHandle
 
Fc9-h32-icon.png - HANDLE Return


GetList

Fc9-comp-macro.png GetList
Gets Named property List 
Fc9-string-icon.png - STRING Name
 
Fc9-string-icon.png - STRING Return


GetValue

Fc9-comp-macro.png GetValue
Get Value of Named property 
Fc9-string-icon.png - STRING Name
 
Fc9-string-icon.png - STRING Return


Init

Fc9-comp-macro.png Init
Initialize the component with the specified properties 
Fc9-void-icon.png - VOID Return


Receive

Fc9-comp-macro.png Receive
Receive a Character 
Fc9-u8-icon.png - BYTE Timeout
Period to wait for the character to be received 
Fc9-s16-icon.png - INT Return


Send

Fc9-comp-macro.png Send
Send the Character  
Fc9-u16-icon.png - UINT Char
The Character to send 
Fc9-void-icon.png - VOID Return


SetValue

Fc9-comp-macro.png SetValue
set Value of Named property 
Fc9-string-icon.png - STRING Name
 
Fc9-string-icon.png - STRING Value
 
Fc9-void-icon.png - VOID Return


Uninit

Fc9-comp-macro.png Uninit
Un-initialize the UART and release the resources 
Fc9-void-icon.png - VOID Return


UpdateBaud

Fc9-comp-macro.png UpdateBaud
Changes the UART Baud rate. 0 = 1200 / 1 = 2400 / 3 = 4800 / 3 = 9600 / 4 = 19200 / 5 = 38400 6 = 57600 / 7 = 115200 
Fc9-u8-icon.png - BYTE new_baud
The new baud rate (0=1200, 7=115200) 
Fc9-void-icon.png - VOID Return



Property reference

Fc9-prop-icon.png Properties
Fc9-type-16-icon.png Channel
UART Channel selector 
Fc9-type-5-icon.png TX
Pin to be used for Transmit data 
Fc9-type-5-icon.png RX
Pin to be used for Receive data 
Fc9-type-16-icon.png Baud Options
Baud rate option selector 
Fc9-type-14-icon.png Baud Rate
 
Fc9-type-16-icon.png Data Bits
Number of data bits 
Fc9-type-16-icon.png Return
Return data width from Receive macro 
Fc9-type-16-icon.png Echo
Echo selection 
Fc9-type-16-icon.png Interrupt
Interrupt mode enable or disable 
Fc9-type-16-icon.png Flow Control
Flow Control (Handshake) enable or disable 
Fc9-conn-icon.png Simulation
Fc9-type-7-icon.png Scope Traces
Selects if the scope traces are automatically generated or not 
Fc9-type-7-icon.png Console Data
Selects if the console data is automatically generated or not