User`s manual
RX62N Group, RX621 Group 4. Library Reference
5) R_SPI_Control
Synopsis
Control an SPI channel.
Prototype
bool R_SPI_Control(
uint8_t data1,
// Channel selection
uint8_t data2,
// Control options
uint32_t data3
// Extended timing control
);
Description
Modify the operation of the selected SPI channel.
[data1]
Select channel SPIn (where n = 0 to 1).
[data2]
Control the channel. If multiple selections are required, use "|" to separate each selection.
All items are optional. Specify PDL_NO_DATA if not required.
•
Channel control
PDL_SPI_DISABLE
Disable and partially initialise the SPI channel.
•
Loopback control
PDL_SPI_LOOPBACK_DISABLE or
PDL_SPI_LOOPBACK_DIRECT or
PDL_SPI_LOOPBACK_REVERSED
Disable or enable loopback in direct or reversed mode.
[data3]
Extended timing control (optional).
All items apply only to Master mode. Specify PDL_NO_DATA if not required.
If multiple selections are required, use "|" to separate each selection.
•
Extended clock delay
PDL_SPI_CLOCK_DELAY_1 or
PDL_SPI_CLOCK_DELAY_2 or
PDL_SPI_CLOCK_DELAY_3 or
PDL_SPI_CLOCK_DELAY_4 or
PDL_SPI_CLOCK_DELAY_5 or
PDL_SPI_CLOCK_DELAY_6 or
PDL_SPI_CLOCK_DELAY_7 or
PDL_SPI_CLOCK_DELAY_8
The number of bit clock periods between the assertion of
the SSL pin and the start of RSPCK oscillation.
Ignored in Slave mode.
•
Extended SSL negation delay
PDL_SPI_SSL_DELAY_1 or
PDL_SPI_SSL_DELAY_2 or
PDL_SPI_SSL_DELAY_3 or
PDL_SPI_SSL_DELAY_4 or
PDL_SPI_SSL_DELAY_5 or
PDL_SPI_SSL_DELAY_6 or
PDL_SPI_SSL_DELAY_7 or
PDL_SPI_SSL_DELAY_8
The number of bit clock periods between the end of RSPCK
oscillation and the negation of the active SSL pin.
Ignored in Slave mode.
•
Extended next-access delay
PDL_SPI_NEXT_DELAY_1 or
PDL_SPI_NEXT_DELAY_2 or
PDL_SPI_NEXT_DELAY_3 or
PDL_SPI_NEXT_DELAY_4 or
PDL_SPI_NEXT_DELAY_5 or
PDL_SPI_NEXT_DELAY_6 or
PDL_SPI_NEXT_DELAY_7 or
PDL_SPI_NEXT_DELAY_8
The number of bit clock periods (plus two cycles of the
peripheral clock) between the end of one frame and the
start of the next frame.
Ignored in Slave mode.
Return value
True if all parameters are valid; otherwise false.
R20UT0084EE0112 Rev.1.12 Page 4-212
July. 16, 2014