All Data Structures Functions Variables Typedefs Enumerations Enumerator Groups Pages
QSPI eDMA Driver
QSPI: Quad Serial Peripheral Interface Driver

## Overview

## Data Structures

struct | qspi_edma_handle_t
| QSPI DMA transfer handle, users should not touch the content of the handle. More...

## Typedefs

typedef void(* | qspi_edma_callback_t )(QuadSPI_Type *base, qspi_edma_handle_t *handle, status_t status, void *userData)
| QSPI eDMA transfer callback function for finish and error.

## eDMA Transactional

void | QSPI_TransferTxCreateHandleEDMA (QuadSPI_Type *base, qspi_edma_handle_t *handle, qspi_edma_callback_t callback, void *userData, edma_handle_t *dmaHandle)
| Initializes the QSPI handle for send which is used in transactional functions and set the callback. More...
void | QSPI_TransferRxCreateHandleEDMA (QuadSPI_Type *base, qspi_edma_handle_t *handle, qspi_edma_callback_t callback, void *userData, edma_handle_t *dmaHandle)
| Initializes the QSPI handle for receive which is used in transactional functions and set the callback. More...
status_t | QSPI_TransferSendEDMA (QuadSPI_Type *base, qspi_edma_handle_t *handle, qspi_transfer_t *xfer)
| Transfers QSPI data using an eDMA non-blocking method. More...
status_t | QSPI_TransferReceiveEDMA (QuadSPI_Type *base, qspi_edma_handle_t *handle, qspi_transfer_t *xfer)
| Receives data using an eDMA non-blocking method. More...
void | QSPI_TransferAbortSendEDMA (QuadSPI_Type *base, qspi_edma_handle_t *handle)
| Aborts the sent data using eDMA. More...
void | QSPI_TransferAbortReceiveEDMA (QuadSPI_Type *base, qspi_edma_handle_t *handle)
| Aborts the receive data using eDMA. More...
status_t | QSPI_TransferGetSendCountEDMA (QuadSPI_Type *base, qspi_edma_handle_t *handle, size_t *count)
| Gets the transferred counts of send. More...
status_t | QSPI_TransferGetReceiveCountEDMA (QuadSPI_Type *base, qspi_edma_handle_t *handle, size_t *count)
| Gets the status of the receive transfer. More...

## Data Structure Documentation

struct _qspi_edma_handle

### Data Fields

edma_handle_t * | dmaHandle
| eDMA handler for QSPI send
size_t | transferSize
| Bytes need to transfer. More...
uint8_t | count
| The transfer data count in a DMA request.
uint32_t | state
| Internal state for QSPI eDMA transfer.
qspi_edma_callback_t | callback
| Callback for users while transfer finish or error occurred.
void * | userData
| User callback parameter.

#### Field Documentation

size_t qspi_edma_handle_t::transferSize

## Function Documentation

void QSPI_TransferTxCreateHandleEDMA | ( | QuadSPI_Type * | base,
|  | qspi_edma_handle_t * | handle,
|  | qspi_edma_callback_t | callback,
|  | void * | userData,
|  | edma_handle_t * | dmaHandle
| ) |  |

Parameters

  base | QSPI peripheral base address
  handle | Pointer to qspi_edma_handle_t structure
  callback | QSPI callback, NULL means no callback.
  userData | User callback function data.
  rxDmaHandle | User requested eDMA handle for eDMA transfer

void QSPI_TransferRxCreateHandleEDMA | ( | QuadSPI_Type * | base,
|  | qspi_edma_handle_t * | handle,
|  | qspi_edma_callback_t | callback,
|  | void * | userData,
|  | edma_handle_t * | dmaHandle
| ) |  |

Parameters

  base | QSPI peripheral base address
  handle | Pointer to qspi_edma_handle_t structure
  callback | QSPI callback, NULL means no callback.
  userData | User callback function data.
  rxDmaHandle | User requested eDMA handle for eDMA transfer

status_t QSPI_TransferSendEDMA | ( | QuadSPI_Type * | base,
|  | qspi_edma_handle_t * | handle,
|  | qspi_transfer_t * | xfer
| ) |  |

This function writes data to the QSPI transmit FIFO. This function is non-blocking.

Parameters

  base | Pointer to QuadSPI Type.
  handle | Pointer to qspi_edma_handle_t structure
  xfer | QSPI transfer structure.

status_t QSPI_TransferReceiveEDMA | ( | QuadSPI_Type * | base,
|  | qspi_edma_handle_t * | handle,
|  | qspi_transfer_t * | xfer
| ) |  |

This function receive data from the QSPI receive buffer/FIFO. This function is non-blocking.

Parameters

  base | Pointer to QuadSPI Type.
  handle | Pointer to qspi_edma_handle_t structure
  xfer | QSPI transfer structure.

void QSPI_TransferAbortSendEDMA | ( | QuadSPI_Type * | base,
|  | qspi_edma_handle_t * | handle
| ) |  |

This function aborts the sent data using eDMA.

Parameters

  base | QSPI peripheral base address.
  handle | Pointer to qspi_edma_handle_t structure

void QSPI_TransferAbortReceiveEDMA | ( | QuadSPI_Type * | base,
|  | qspi_edma_handle_t * | handle
| ) |  |

This function abort receive data which using eDMA.

Parameters

  base | QSPI peripheral base address.
  handle | Pointer to qspi_edma_handle_t structure

status_t QSPI_TransferGetSendCountEDMA | ( | QuadSPI_Type * | base,
|  | qspi_edma_handle_t * | handle,
|  | size_t * | count
| ) |  |

Parameters

  base | Pointer to QuadSPI Type.
  handle | Pointer to qspi_edma_handle_t structure.
  count | Bytes sent.

Return values

  kStatus_Success | Succeed get the transfer count.
  kStatus_NoTransferInProgress | There is not a non-blocking transaction currently in progress.

status_t QSPI_TransferGetReceiveCountEDMA | ( | QuadSPI_Type * | base,
|  | qspi_edma_handle_t * | handle,
|  | size_t * | count
| ) |  |

Parameters

  base | Pointer to QuadSPI Type.
  handle | Pointer to qspi_edma_handle_t structure
  count | Bytes received.

Return values

  kStatus_Success | Succeed get the transfer count.
  kStatus_NoTransferInProgress | There is not a non-blocking transaction currently in progress.