Kinetis SDK v.2.0 API Reference Manual  Rev. 0
Freescale Semiconductor, Inc.
 All Data Structures Functions Variables Typedefs Enumerations Enumerator Groups Pages

Overview

Files

file  fsl_qspi_edma.h
 

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_tdmaHandle
 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
baseQSPI peripheral base address
handlePointer to qspi_edma_handle_t structure
callbackQSPI callback, NULL means no callback.
userDataUser callback function data.
rxDmaHandleUser 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
baseQSPI peripheral base address
handlePointer to qspi_edma_handle_t structure
callbackQSPI callback, NULL means no callback.
userDataUser callback function data.
rxDmaHandleUser 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
basePointer to QuadSPI Type.
handlePointer to qspi_edma_handle_t structure
xferQSPI 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
basePointer to QuadSPI Type.
handlePointer to qspi_edma_handle_t structure
xferQSPI transfer structure.
void QSPI_TransferAbortSendEDMA ( QuadSPI_Type *  base,
qspi_edma_handle_t *  handle 
)

This function aborts the sent data using eDMA.

Parameters
baseQSPI peripheral base address.
handlePointer 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
baseQSPI peripheral base address.
handlePointer to qspi_edma_handle_t structure
status_t QSPI_TransferGetSendCountEDMA ( QuadSPI_Type *  base,
qspi_edma_handle_t *  handle,
size_t *  count 
)
Parameters
basePointer to QuadSPI Type.
handlePointer to qspi_edma_handle_t structure.
countBytes sent.
Return values
kStatus_SuccessSucceed get the transfer count.
kStatus_NoTransferInProgressThere 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
basePointer to QuadSPI Type.
handlePointer to qspi_edma_handle_t structure
countBytes received.
Return values
kStatus_SuccessSucceed get the transfer count.
kStatus_NoTransferInProgressThere is not a non-blocking transaction currently in progress.