Component: SPI (Peripheral CAL)
Author | Matrix Ltd |
Version | 1.2 (Release) |
Category | Peripheral CAL |
Contents
SPI component
A low level implementation giving direct access to the CAL
Examples
Example template program for creating a new component using the CAL SPI. Contains all the code to allow the dynamic SPI channel population, re-mappable I/O functionality and Injector functionality. SPI CAL Demo
Downloadable macro reference
Slave_Uninit
Uninitialise the Slave
Parameters
- This macro has no parameters
Return value
- This call does not return a value
Slave_Init
Initialise the Slave
Parameters
- This macro has no parameters
Return value
- This call does not return a value
Master_Uninit
Uninitialise the Master
Parameters
- This macro has no parameters
Return value
- This call does not return a value
Master_Byte
Sends and receives a data byte
Parameters
- BYTE DataOut
Return value
Slave_TxByte
Sets the data to be transmitted
Parameters
- BYTE Data
Return value
- This call does not return a value
Slave_RxByte
Returns the data received
Parameters
- This macro has no parameters
Return value
SetPrescaler
Sets the prescaler value for the clock divider chain
Parameters
- BYTE Prescaler
Return value
- This call does not return a value
Master_Init
Initialise the Master
Parameters
- This macro has no parameters
Return value
- This call does not return a value
Simulation macro reference
ChangeMode
No additional information
Parameters
- This macro has no parameters
Return value
- This call does not return a value
GetValue
Reads Named property Value.
Parameters
- <- STRING Name
- This parameter may be returned back to the caller
Return value
GetConsoleHandle
Returns a handle to the console used by this component
Parameters
- This macro has no parameters
Return value
SetValue
Change Named property to new Value.
Parameters
- <- STRING Name
- This parameter may be returned back to the caller
- <- STRING Value
- This parameter may be returned back to the caller
Return value
- This call does not return a value
GetList
returns Named property list
Parameters
- <- STRING Name
- This parameter may be returned back to the caller
Return value
Property reference
Component Enable
This property is of type True or false and can be referenced with the variable name ENABLED.
No additional information
Channel
This property is of type Fixed list of ints and can be referenced with the variable name CHANNEL.
SPI Channel selector
MOSI
This property is of type Single digital pin and can be referenced with the variable name MOSI.
No additional information
MOSI Remap Pin
This property is of type Fixed list of ints and can be referenced with the variable name MOSIPins.
No additional information
MISO
This property is of type Single digital pin and can be referenced with the variable name MISO.
No additional information
MISO Remap Pin
This property is of type Fixed list of ints and can be referenced with the variable name MISOPins.
No additional information
CLK
This property is of type Single digital pin and can be referenced with the variable name CLK.
No additional information
Prescale
This property is of type Fixed list of ints and can be referenced with the variable name PR_SCALE.
Prescale option selector
Clock Polarity
This property is of type Fixed list of ints and can be referenced with the variable name CKP.
Clock Polarity setting, inactive (idle) state
Clock Phase
This property is of type Fixed list of ints and can be referenced with the variable name CKE.
Clock Phase (data change edge) selection
Sample Point
This property is of type Fixed list of ints and can be referenced with the variable name SMP.
Data bit read sample point
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