spi
Default mainpageat91libperipheralsspi
Description Graph
spi
 
Purpose
Definitions for SPI peripheral usage.

Usage
  1. Enable the SPI pins required by the application (see pio.h).
  2. Configure the SPI using the SPI_Configure function. This enables the peripheral clock. The mode register is loaded with the given value.
  3. Configure all the necessary chip selects with SPI_ConfigureNPCS.
  4. Enable the SPI by calling SPI_Enable.
  5. Send/receive data using SPI_Write and SPI_Read. Note that SPI_Read must be called after SPI_Write to retrieve the last value read.
  6. Send/receive data using the PDC with the SPI_WriteBuffer and SPI_ReadBuffer functions.
  7. Disable the SPI by calling SPI_Disable.
 
Source
The documentation for this Directory was generated from the following files:
  • spi.h