The public API for using the HIL SPI slave.
◆ spi_slave()
void spi_slave |
( |
const spi_slave_callback_group_t * |
spi_cbg, |
|
|
port_t |
p_sclk, |
|
|
port_t |
p_mosi, |
|
|
port_t |
p_miso, |
|
|
port_t |
p_cs, |
|
|
xclock_t |
clk, |
|
|
int |
cpol, |
|
|
int |
cpha |
|
) |
| |
Initializes a SPI slave.
- Note
- Verified at 25000 kbps, with a 2000ns CS assertion to first clock in all modes. The CS to first clock minimum delay will vary based on the duration of the slave_transaction_started callback.
- Parameters
-
spi_cbg | The spi_slave_callback_group_t context to use. |
p_sclk | The SPI slave's SCLK port. Must be a 1-bit port. |
p_mosi | The SPI slave's MOSI port. Must be a 1-bit port. |
p_miso | The SPI slave's MISO port. Must be a 1-bit port. |
p_cs | The SPI slave's CS port. Must be a 1-bit port. |
clock_block | The clock block to use for the SPI slave. |
cpol | The clock polarity to use. |
cpha | The clock phase to use. |