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 1. Parameters
Data direction Parameter name Description

[out]

slave

Pointer to the software slave instance struct

[in]

config

Pointer to the config struct