Go to the source code of this file.
SPI driver implementation.
Implements the functions defined in spi.h for controlling SPI input/output and interrupts on the EfxSapphireSoC platform.
Definition in file spi.c.
Functions | |
| void | spi_setDataMode (spi_instance_t *inst, enum cfg_mode Mode) |
| Set SPI Data Mode (Full/Half Duplex, Dual/Quad Line). | |
| u32 | spi_cmdAvailability (spi_instance_t *inst) |
| Returns the availability of command buffer space in the SPI buffer. | |
| u32 | spi_rspOccupancy (spi_instance_t *inst) |
| Returns the occupancy of the response buffer in the SPI buffer. | |
| u32 | spi_read32 (spi_instance_t *inst) |
| Reads a 32-bit data value from the SPI read register. | |
| u32 | spi_writeRead32 (spi_instance_t *inst, u32 data) |
| Writes data to and reads data from the SPI data register. | |
| u8 | spi_read (spi_instance_t *inst) |
| Reads an 8-bit data value from the SPI read register. | |
| u8 | spi_writeRead (spi_instance_t *inst, u8 data) |
| Writes data to and reads data from the SPI data register. | |
| void | spi_applyConfig (spi_instance_t *inst) |
| Applies the current configuration settings stored in the spi_instance_t structure to the SPI hardware registers. | |
| void | spi_write (spi_instance_t *inst, u8 data) |
| Writes an 8-bit data value to the SPI data register. | |
| void | spi_write32 (spi_instance_t *inst, u32 data) |
| Writes a 32-bit data value to the SPI data register. | |
| void | spi_select (spi_instance_t *inst, u32 cs) |
| Selects the SPI slave by asserting the corresponding chip select (CS) line. | |
| void | spi_diselect (spi_instance_t *inst, u32 cs) |
| Deselects the SPI slave by deasserting the corresponding chip select (CS) line. | |
| u32 | spi_isBusy (spi_instance_t *inst) |
| Check SPI if it has any command waiting to be executed in queue. | |
| void | spi_waitUntilIdle (spi_instance_t *inst) |
| Waits for SPI if it has any command waiting to be executed in queue. | |