You may use more than one slave select pin, not just the `SS` pin. This is useful when you have multiple devices connected and need to communicate with them individually.
`SPI_SS_PIN` can be passed to `spi_start()` to refer to `SS`.
## ChibiOS/ARM Configuration
You'll need to determine which pins can be used for SPI -- as an example, STM32 parts generally have multiple SPI peripherals, labeled SPI1, SPI2, SPI3 etc.
|`0` |Leading edge rising |Sample on leading edge |
|`1` |Leading edge rising |Sample on trailing edge|
|`2` |Leading edge falling|Sample on leading edge |
|`3` |Leading edge falling|Sample on trailing edge|
-`uint16_t divisor`
The SPI clock divisor, will be rounded up to the nearest power of two. This number can be calculated by dividing the MCU's clock speed by the desired SPI clock speed. For example, an MCU running at 8 MHz wanting to talk to an SPI device at 4 MHz would set the divisor to `2`.
#### Return Value
`false` if the supplied parameters are invalid or the SPI peripheral is already in use, or `true`.
---
### `spi_status_t spi_write(uint8_t data)`
Write a byte to the selected SPI device.
#### Arguments
-`uint8_t data`
The byte to write.
#### Return Value
`SPI_STATUS_TIMEOUT` if the timeout period elapses, or `SPI_STATUS_SUCCESS`.
---
### `spi_status_t spi_read(void)`
Read a byte from the selected SPI device.
#### Return Value
`SPI_STATUS_TIMEOUT` if the timeout period elapses, or the byte read from the device.