Jump to content

Component: SPI Free (Peripheral CAL): Difference between revisions

From Flowcode Help
No edit summary
m Text replacement - "style="background-color:#EAE1EA;"" to "class="mtx-class-propfolder""
 
(6 intermediate revisions by 2 users not shown)
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_temp/SPI_Free.fcfx FC_Comp_Source_temp/SPI_Free.fcfx]
Please click here to download the component source project: [https://www.flowcode.co.uk/wiki/componentsource/FC_Comp_Source_SPI_Free.fcfx FC_Comp_Source_SPI_Free.fcfx]


Please click here to view the component source code (Beta): [https://www.flowcode.co.uk/FlowchartView/?wfile=componentsource/FC_Comp_Source_temp/SPI_Free.fcfx FC_Comp_Source_temp/SPI_Free.fcfx]
Please click here to view the component source code (Beta): [https://www.flowcode.co.uk/FlowchartView/?wfile=componentsource/FC_Comp_Source_SPI_Free.fcfx FC_Comp_Source_SPI_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 91: Line 93:


===GetConsoleHandle===
===GetConsoleHandle===
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
{| class="mtx-class-macrotable wikitable"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''GetConsoleHandle'''
| width="90%" class="mtx-class-macrohead" | '''GetConsoleHandle'''
|-
|-
| colspan="2" | Returns a handle to the console used by this component 
| colspan="2" | Returns a handle to the console used by this component 
Line 105: Line 107:


===GetList===
===GetList===
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
{| class="mtx-class-macrotable wikitable"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''GetList'''
| width="90%" class="mtx-class-macrohead" | '''GetList'''
|-
|-
| colspan="2" | returns Named property list 
| colspan="2" | returns Named property list 
Line 124: Line 126:


===GetValue===
===GetValue===
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
{| class="mtx-class-macrotable wikitable"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''GetValue'''
| width="90%" class="mtx-class-macrohead" | '''GetValue'''
|-
|-
| colspan="2" | Reads Named property Value.   
| colspan="2" | Reads Named property Value.   
Line 143: Line 145:


===Master_Byte===
===Master_Byte===
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
{| class="mtx-class-macrotable wikitable"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Master_Byte'''
| width="90%" class="mtx-class-macrohead" | '''Master_Byte'''
|-
|-
| colspan="2" | Sends and receives a data byte 
| colspan="2" | Sends and receives a data byte 
Line 162: Line 164:


===Master_Init===
===Master_Init===
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
{| class="mtx-class-macrotable wikitable"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Master_Init'''
| width="90%" class="mtx-class-macrohead" | '''Master_Init'''
|-
|-
| colspan="2" | Initialise the Master 
| colspan="2" | Initialise the Master 
Line 176: Line 178:


===Master_Uninit===
===Master_Uninit===
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
{| class="mtx-class-macrotable wikitable"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Master_Uninit'''
| width="90%" class="mtx-class-macrohead" | '''Master_Uninit'''
|-
|-
| colspan="2" | Uninitialise the Master 
| colspan="2" | Uninitialise the Master 
Line 190: Line 192:


===SetPrescaler===
===SetPrescaler===
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
{| class="mtx-class-macrotable wikitable"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetPrescaler'''
| width="90%" class="mtx-class-macrohead" | '''SetPrescaler'''
|-
|-
| colspan="2" | Sets the prescaler value for the clock divider chain 
| colspan="2" | Sets the prescaler value for the clock divider chain 
Line 209: Line 211:


===SetValue===
===SetValue===
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
{| class="mtx-class-macrotable wikitable"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetValue'''
| width="90%" class="mtx-class-macrohead" | '''SetValue'''
|-
|-
| colspan="2" | Change Named property to new Value.   
| colspan="2" | Change Named property to new Value.   
Line 233: Line 235:


===Slave_Init===
===Slave_Init===
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
{| class="mtx-class-macrotable wikitable"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Slave_Init'''
| width="90%" class="mtx-class-macrohead" | '''Slave_Init'''
|-
|-
| colspan="2" | Initialise the Slave 
| colspan="2" | Initialise the Slave 
Line 247: Line 249:


===Slave_RxByte===
===Slave_RxByte===
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
{| class="mtx-class-macrotable wikitable"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Slave_RxByte'''
| width="90%" class="mtx-class-macrohead" | '''Slave_RxByte'''
|-
|-
| colspan="2" | Returns the data received 
| colspan="2" | Returns the data received 
Line 261: Line 263:


===Slave_TxByte===
===Slave_TxByte===
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
{| class="mtx-class-macrotable wikitable"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Slave_TxByte'''
| width="90%" class="mtx-class-macrohead" | '''Slave_TxByte'''
|-
|-
| colspan="2" | Sets the data to be transmitted 
| colspan="2" | Sets the data to be transmitted 
Line 280: Line 282:


===Slave_Uninit===
===Slave_Uninit===
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
{| class="mtx-class-macrotable wikitable"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Slave_Uninit'''
| width="90%" class="mtx-class-macrohead" | '''Slave_Uninit'''
|-
|-
| colspan="2" | Uninitialise the Slave 
| colspan="2" | Uninitialise the Slave 
Line 295: Line 297:
==Property reference==
==Property reference==


{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
{| class="mtx-class-macrotable wikitable"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" | [[File:Fc9-prop-icon.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-prop-icon.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Properties'''  
| width="90%" class="mtx-class-macrohead" | '''Properties'''  
|-
|-
|-
|-
Line 356: Line 358:
| colspan="2" | Data bit read sample point 
| colspan="2" | Data bit read sample point 
|-
|-
| width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]]
| width="10%" align="center" class="mtx-class-propfolder" | [[File:Fc9-conn-icon.png]]
| width="90%" style="background-color:#EAE1EA; color:#4B008D;" | Simulation
| width="90%" class="mtx-class-propfolder" | Simulation
|-
|-
|-
|-

Latest revision as of 14:37, 13 July 2026

Author Matrix Ltd
Version 1.2
Category Peripheral CAL


SPI 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_SPI_Free.fcfx

Please click here to view the component source code (Beta): FC_Comp_Source_SPI_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

GetConsoleHandle

GetConsoleHandle
Returns a handle to the console used by this component 
- HANDLE Return


GetList

GetList
returns Named property list 
- STRING Name
 
- STRING Return


GetValue

GetValue
Reads Named property Value.  
- STRING Name
 
- STRING Return


Master_Byte

Master_Byte
Sends and receives a data byte 
- BYTE DataOut
 
- BYTE Return


Master_Init

Master_Init
Initialise the Master 
- VOID Return


Master_Uninit

Master_Uninit
Uninitialise the Master 
- VOID Return


SetPrescaler

SetPrescaler
Sets the prescaler value for the clock divider chain 
- BYTE Prescaler
 
- VOID Return


SetValue

SetValue
Change Named property to new Value.  
- STRING Name
 
- STRING Value
 
- VOID Return


Slave_Init

Slave_Init
Initialise the Slave 
- VOID Return


Slave_RxByte

Slave_RxByte
Returns the data received 
- BYTE Return


Slave_TxByte

Slave_TxByte
Sets the data to be transmitted 
- BYTE Data
 
- VOID Return


Slave_Uninit

Slave_Uninit
Uninitialise the Slave 
- VOID Return


Property reference

Properties
Component Enable
 
Channel
SPI Channel selector 
MOSI
 
MOSI Remap Pin
 
MISO
 
MISO Remap Pin
 
CLK
 
Prescale
Prescale option selector 
Clock Polarity
Clock Polarity setting, inactive (idle) state 
Clock Phase
Clock Phase (data change edge) selection 
Sample Point
Data bit read sample point 
Simulation
Scope Traces
Selects if the scope traces are automatically generated or not 
Console Data
Selects if the console data is automatically generated or not