The spi connector in the node can be added in the device tree of the KCH Control ARM VFP Linux.
Parameters
|
Parameter |
Description |
|---|---|
|
SPI Port |
Linux Device File Path of spidev port (see HW chapter) |
|
diMode |
Set optional SPI Mode (if <> 0, 0: Linux Device Tree File Values): SPI_MODE_CPHA : DINT := 16#01; // clock phase
|
|
diBitsPerWord |
Set optional bits per word (if <> 0, 0: Linux Device Tree File Values) |
|
diMaxSpeed |
Set optional max clock speed (if <> 0, 0: Linux Device Tree File Values) |
With the new spi master node there are read/write commands available.
spiMaster.transferExt (METH)
METHOD transferExt : BOOL
This method is used to transfer data via SPI
Parameters
|
Parameter |
Description |
|---|---|
|
pabyTxBuffer [in] |
pointer to send buffer |
|
pabyRxBuffer [in] |
pointer to receive buffer |
|
udiLen [in] |
length to transfer |
|
uiDelayus [in] |
delay in µs |
|
udiSpeedHz [in] |
send clock in Hz; if 0, _diMaxSpeed is used |
Return Values
|
Return Values |
Description |
|---|---|
|
transferExt |
TRUE if successful |
Hardware
The SPI functions can only used on own SOM Hardware with a specific Linux Device Tree File, where a spidev node is defined.