Jump to content

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

From Flowcode Help
No edit summary
No edit summary
Line 17: Line 17:
==Component Source Code==
==Component Source Code==


Please click here for the component source code: [https://www.flowcode.co.uk/wikicopy/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_SPI_Free.fcfx FC_Comp_Source_SPI_Free.fcfx]


==Detailed description==
==Detailed description==




Line 40: Line 42:


==Examples==
==Examples==




Line 63: Line 67:


==Macro reference==
==Macro reference==
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Slave_Uninit'''
|-
| colspan="2" | Uninitialise the Slave 
|-
|-
| 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''
|}
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''GetValue'''
|-
| colspan="2" | Reads Named property Value.   
|-
|-
| width="10%" align="center" | [[File:Fc9-string-icon.png]] - STRING
| 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''
|}
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Slave_Init'''
|-
| colspan="2" | Initialise the Slave 
|-
|-
| 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''
|}
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Master_Uninit'''
|-
| colspan="2" | Uninitialise the Master 
|-
|-
| 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''
|}
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Master_Byte'''
|-
| colspan="2" | Sends and receives a data byte 
|-
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | DataOut
|-
| colspan="2" |  
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" style="border-top: 2px solid #000;" | ''Return''
|}
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''GetConsoleHandle'''
|-
| colspan="2" | Returns a handle to the console used by this component 
|-
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-h32-icon.png]] - HANDLE
| width="90%" style="border-top: 2px solid #000;" | ''Return''
|}
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Slave_TxByte'''
|-
| colspan="2" | Sets the data to be transmitted 
|-
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | Data
|-
| colspan="2" |  
|-
| 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''
|}
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Slave_RxByte'''
|-
| colspan="2" | Returns the data received 
|-
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" style="border-top: 2px solid #000;" | ''Return''
|}
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetValue'''
|-
| colspan="2" | Change Named property to new Value.   
|-
|-
| width="10%" align="center" | [[File:Fc9-string-icon.png]] - STRING
| width="90%" | Name
|-
| colspan="2" |  
|-
| width="10%" align="center" | [[File:Fc9-string-icon.png]] - STRING
| width="90%" | Value
|-
| colspan="2" |  
|-
| 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''
|}
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetPrescaler'''
|-
| colspan="2" | Sets the prescaler value for the clock divider chain 
|-
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | Prescaler
|-
| colspan="2" |  
|-
| 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''
|}
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Master_Init'''
|-
| colspan="2" | Initialise the Master 
|-
|-
| 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''
|}
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''GetList'''
|-
| colspan="2" | returns Named property list 
|-
|-
| width="10%" align="center" | [[File:Fc9-string-icon.png]] - STRING
| 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''
|}
==Property reference==
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
|-
| width="10%" align="center" style="background-color:#D8C9D8;" | [[File:Fc9-prop-icon.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Properties'''
|-
|-
| width="10%" align="center" | [[File:Fc9-type-7-icon.png]]
| width="90%" | Component Enable
|-
| colspan="2" |  
|-
| width="10%" align="center" | [[File:Fc9-type-16-icon.png]]
| width="90%" | Channel
|-
| colspan="2" | SPI Channel selector 
|-
| width="10%" align="center" | [[File:Fc9-type-5-icon.png]]
| width="90%" | MOSI
|-
| colspan="2" |  
|-
| width="10%" align="center" | [[File:Fc9-type-16-icon.png]]
| width="90%" | MOSI Remap Pin
|-
| colspan="2" |  
|-
| width="10%" align="center" | [[File:Fc9-type-5-icon.png]]
| width="90%" | MISO
|-
| colspan="2" |  
|-
| width="10%" align="center" | [[File:Fc9-type-16-icon.png]]
| width="90%" | MISO Remap Pin
|-
| colspan="2" |  
|-
| width="10%" align="center" | [[File:Fc9-type-5-icon.png]]
| width="90%" | CLK
|-
| colspan="2" |  
|-
| width="10%" align="center" | [[File:Fc9-type-16-icon.png]]
| width="90%" | Prescale
|-
| colspan="2" | Prescale option selector 
|-
| width="10%" align="center" | [[File:Fc9-type-16-icon.png]]
| width="90%" | Clock Polarity
|-
| colspan="2" | Clock Polarity setting, inactive (idle) state 
|-
| width="10%" align="center" | [[File:Fc9-type-16-icon.png]]
| width="90%" | Clock Phase
|-
| colspan="2" | Clock Phase (data change edge) selection 
|-
| width="10%" align="center" | [[File:Fc9-type-16-icon.png]]
| width="90%" | Sample Point
|-
| colspan="2" | Data bit read sample point 
|-
| width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]]
| width="90%" style="background-color:#EAE1EA; color:#4B008D;" | Simulation
|-
|-
| width="10%" align="center" | [[File:Fc9-type-7-icon.png]]
| width="90%" | Scope Traces
|-
| colspan="2" | Selects if the scope traces are automatically generated or not 
|-
| width="10%" align="center" | [[File:Fc9-type-7-icon.png]]
| width="90%" | Console Data
|-
| colspan="2" | Selects if the console data is automatically generated or not 
|}==Macro reference==


{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"

Revision as of 15:16, 20 January 2023

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 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

Slave_Uninit
Uninitialise the Slave 
- VOID Return


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


Slave_Init
Initialise the Slave 
- VOID Return


Master_Uninit
Uninitialise the Master 
- VOID Return


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


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


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


Slave_RxByte
Returns the data received 
- BYTE Return


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


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


Master_Init
Initialise the Master 
- VOID Return


GetList
returns Named property list 
- STRING Name
 
- STRING 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 

==Macro reference==

Slave_Uninit
Uninitialise the Slave 
- VOID Return


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


Slave_Init
Initialise the Slave 
- VOID Return


Master_Uninit
Uninitialise the Master 
- VOID Return


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


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


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


Slave_RxByte
Returns the data received 
- BYTE Return


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


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


Master_Init
Initialise the Master 
- VOID Return


GetList
returns Named property list 
- STRING Name
 
- STRING 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