RTEMS
5.0.0
|
#include "chip.h"
Macros | |
#define | USE_SPI_DMA |
#define | DMA_SPI_LLI 2 |
Functions | |
uint32_t | SPID_Configure (Spid *pSpid, Spi *pSpiHw, uint8_t spiId, uint32_t spiMode, sXdmad *pXdmad) |
Initializes the Spid structure and the corresponding SPI & DMA hardware. select value. The driver will uses DMA channel 0 for RX and DMA channel 1 for TX. The DMA channels are freed automatically when no SPI command processing. More... | |
void | SPID_ConfigureCS (Spid *pSpid, uint32_t dwCS, uint32_t dwCsr) |
Configures the parameters for the device corresponding to the cs value. More... | |
uint32_t | SPID_SendCommand (Spid *pSpid, SpidCmd *pCommand) |
Starts a SPI master transfer. This is a non blocking function. It will return as soon as the transfer is started. More... | |
uint32_t | SPID_IsBusy (const Spid *pSpid) |
Check if the SPI driver is busy. More... | |
Implementation for the SPI Flash with xDMA driver.
#define DMA_SPI_LLI 2 |
xDMA Link List size for SPI transmission
#define USE_SPI_DMA |
xDMA support
uint32_t SPID_Configure | ( | Spid * | pSpid, |
Spi * | pSpiHw, | ||
uint8_t | spiId, | ||
uint32_t | spiMode, | ||
sXdmad * | pXdmad | ||
) |
Initializes the Spid structure and the corresponding SPI & DMA hardware. select value. The driver will uses DMA channel 0 for RX and DMA channel 1 for TX. The DMA channels are freed automatically when no SPI command processing.
pSpid | Pointer to a Spid instance. |
pSpiHw | Associated SPI peripheral. |
spiId | SPI peripheral identifier. |
pDmad | Pointer to a Dmad instance. |
void SPID_ConfigureCS | ( | Spid * | pSpid, |
uint32_t | dwCS, | ||
uint32_t | dwCsr | ||
) |
Configures the parameters for the device corresponding to the cs value.
pSpid | Pointer to a Spid instance. |
cs | number corresponding to the SPI chip select. |
csr | SPI_CSR value to setup. |
uint32_t SPID_IsBusy | ( | const Spid * | pSpid | ) |
Check if the SPI driver is busy.
pSpid | Pointer to a Spid instance. |
Starts a SPI master transfer. This is a non blocking function. It will return as soon as the transfer is started.
pSpid | Pointer to a Spid instance. |
pCommand | Pointer to the SPI command to execute. |