#include "chip.h"
#include "../../../../utils/utility.h"
Go to the source code of this file.
Data Structures | |
struct | QspiDma_t |
Defines | |
#define | QSPID_ERROR 1 |
#define | QSPID_ERROR_LOCK 2 |
#define | QSPID_CH_NOT_ENABLED 0xFF |
Typedefs | |
typedef void(* | QspidCallback )(uint8_t, void *) |
Functions | |
uint32_t | QSPID_Configure (QspiDma_t *pQspidma, QspiMode_t Mode, uint32_t dwConfiguration, sXdmad *pXdmad) |
Initializes the pQspidma structure and the corresponding QSPI & DMA . hardware select value. | |
uint32_t | QSPID_EnableQspiRxChannel (QspiDma_t *pQspidma) |
Enables a QSPI Rx channel. This function will allocate a dma Rx channel for QSPI. | |
uint32_t | QSPID_EnableQspiTxChannel (QspiDma_t *pQspidma) |
Enables a QSPI Tx channel. This function will allocate a dma Tx channel for QSPI. | |
uint32_t | QSPID_DisableQspiRxChannel (QspiDma_t *pQspidma) |
Disables a QSPI Rx channel. This function will de-allocate previous allocated dma Rx channel for QSPI. | |
uint32_t | QSPID_DisableQspiTxChannel (QspiDma_t *pQspidma) |
Disables a QSPI Tx channel. This function will de-allocate previous allocated dma Tx channel for QSPI. | |
uint32_t | QSPID_DisableSpiChannel (QspiDma_t *pQspidma) |
Disables a QSPI SPI Rx and Tx channels. This function will de-allocate privious allocated dma Rx, Txchannel for QSPI in SPI mode. | |
uint32_t | QSPID_EnableSpiChannel (QspiDma_t *pQspidma) |
Enables a QSPI SPI Rx channel. This function will allocate a dma Rx channel for QSPI SPI mode. | |
uint32_t | QSPID_ReadWriteQSPI (QspiDma_t *pQspidma, Access_t const ReadWrite) |
Starts a QSPI read or write operation. | |
uint32_t | QSPID_ReadWriteSPI (QspiDma_t *pQspidma, Access_t const ReadWrite) |
Starts a SPI master transfer. This is a non blocking function. It will return as soon as the transfer is started. | |
uint32_t | QSPID_IsBusy (volatile uint8_t *QspiSemaphore) |
Check if the QSPI driver is busy. |
Implementation of SPI driver, transfer data through DMA.
Definition in file qspi_dma.h.
#define QSPID_ERROR 1 |
An unspecified error has occurred.
Definition at line 52 of file qspi_dma.h.
#define QSPID_ERROR_LOCK 2 |
SPI driver is currently in use.
Definition at line 55 of file qspi_dma.h.
typedef void(* QspidCallback)(uint8_t, void *) |
SPI transfer complete callback.
Definition at line 63 of file qspi_dma.h.
uint32_t QSPID_Configure | ( | QspiDma_t * | pQspidma, | |
QspiMode_t | Mode, | |||
uint32_t | dwConf, | |||
sXdmad * | pXdmad | |||
) |
Initializes the pQspidma structure and the corresponding QSPI & DMA . hardware select value.
pQspidma | Pointer to a QspiDma_t instance. | |
Mode | Associated SPI peripheral. | |
dwConf | QSPI peripheral configuration. | |
pXdmad | Pointer to a Xdmad instance. |
Definition at line 281 of file qspi_dma.c.
uint32_t QSPID_DisableQspiRxChannel | ( | QspiDma_t * | pQspidma | ) |
Disables a QSPI Rx channel. This function will de-allocate previous allocated dma Rx channel for QSPI.
pQspidma | Pointer to a Spid instance. |
Definition at line 451 of file qspi_dma.c.
uint32_t QSPID_DisableQspiTxChannel | ( | QspiDma_t * | pQspidma | ) |
Disables a QSPI Tx channel. This function will de-allocate previous allocated dma Tx channel for QSPI.
pQspidma | Pointer to a Spid instance. |
Definition at line 480 of file qspi_dma.c.
uint32_t QSPID_DisableSpiChannel | ( | QspiDma_t * | pQspidma | ) |
Disables a QSPI SPI Rx and Tx channels. This function will de-allocate privious allocated dma Rx, Txchannel for QSPI in SPI mode.
pQspidma | Pointer to a Spid instance. |
Definition at line 507 of file qspi_dma.c.
uint32_t QSPID_EnableQspiRxChannel | ( | QspiDma_t * | pQspidma | ) |
Enables a QSPI Rx channel. This function will allocate a dma Rx channel for QSPI.
pQspidma | Pointer to a Spid instance. |
Definition at line 320 of file qspi_dma.c.
uint32_t QSPID_EnableQspiTxChannel | ( | QspiDma_t * | pQspidma | ) |
Enables a QSPI Tx channel. This function will allocate a dma Tx channel for QSPI.
pQspidma | Pointer to a Spid instance. |
Definition at line 357 of file qspi_dma.c.
uint32_t QSPID_EnableSpiChannel | ( | QspiDma_t * | pQspidma | ) |
Enables a QSPI SPI Rx channel. This function will allocate a dma Rx channel for QSPI SPI mode.
pQspidma | Pointer to a Spid instance. |
Definition at line 394 of file qspi_dma.c.
uint32_t QSPID_IsBusy | ( | volatile uint8_t * | QspiSemaphore | ) |
Check if the QSPI driver is busy.
pSpid | Pointer to a Spid instance. |
Definition at line 617 of file qspi_dma.c.
Starts a QSPI read or write operation.
pQspidma | Pointer to a Qspid instance. | |
ReadWrite | Defines the memory access type |
Definition at line 538 of file qspi_dma.c.
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. |
Definition at line 580 of file qspi_dma.c.