Write to an SPI device, blocking Write \p len bytes from \p src to SPI, and discard any data received back Blocks until all data is transferred. No timeout, as SPI hardware always transfers at a known data rate.
Initialise SPI instances Puts the SPI into a known state, and enable it. Must be called before other functions.
Check whether a read can be done on SPI device
Check whether a write can be done on SPI device
Write/Read to/from an SPI device Write \p len bytes from \p src to SPI. Simultaneously read \p len bytes from SPI to \p dst. Blocks until all data is transferred. No timeout, as SPI hardware always transfers at a known data rate.
Read from an SPI device Read \p len bytes from SPI to \p dst. Blocks until all data is transferred. No timeout, as SPI hardware always transfers at a known data rate. \p repeated_tx_data is output repeatedly on TX as data is read in from RX. Generally this can be 0, but some devices require a specific value here, e.g. SD cards expect 0xff
Set SPI baudrate Set SPI frequency as close as possible to baudrate, and return the actual achieved rate.
Convert SPI instance to hardware instance number
Return the DREQ to use for pacing transfers to/from a particular SPI instance
Set SPI master/slave Configure the SPI for master- or slave-mode operation. By default, spi_init() sets master-mode.
Configure SPI Configure how the SPI serialises and deserialises data on the wire
Deinitialise SPI instances Puts the SPI into a disabled state. Init will need to be called to re-enable the device functions.
Get SPI baudrate Get SPI baudrate which was set by \see spi_set_baudrate
Write/Read half words to/from an SPI device Write \p len halfwords from \p src to SPI. Simultaneously read \p len halfwords from SPI to \p dst. Blocks until all data is transferred. No timeout, as SPI hardware always transfers at a known data rate.
Write to an SPI device Write \p len halfwords from \p src to SPI. Discard any data received back. Blocks until all data is transferred. No timeout, as SPI hardware always transfers at a known data rate.
Read from an SPI device Read \p len halfwords from SPI to \p dst. Blocks until all data is transferred. No timeout, as SPI hardware always transfers at a known data rate. \p repeated_tx_data is output repeatedly on TX as data is read in from RX. Generally this can be 0, but some devices require a specific value here, e.g. SD cards expect 0xff
Check whether SPI is busy