19.6.4.1.3 Function spi_attach_slave()

Attaches an SPI peripheral slave.

void spi_attach_slave( struct spi_slave_inst *const slave, const struct spi_slave_inst_config *const config)

This function will initialize the software SPI peripheral slave, based on the values of the config struct. The slave can then be selected and optionally addressed by the spi_select_slave function.

Table 19-11. Parameters
Data directionParameter nameDescription

[out]

slave

Pointer to the software slave instance struct

[in]

config

Pointer to the config struct