MCUXpresso SDK API Reference Manual  Rev. 0
NXP Semiconductors
 All Data Structures Functions Variables Typedefs Enumerations Enumerator Groups Pages

Overview

Typical use case

SSP Operation

Refer to the driver examples codes located at <SDK_ROOT>/boards/<BOARD>/driver_examples/ssp

Data Structures

struct  ssp_dmac_handle_t
 SSP DMAC transfer handle, users should not touch the content of the handle. More...
 

Typedefs

typedef void(* ssp_dmac_callback_t )(ssp_dmac_handle_t *handle, status_t transferStatus, void *userData)
 Define SSP DMAC callback.
 

Driver version

#define FSL_SSP_DMAC_DRIVER_VERSION   (MAKE_VERSION(2, 0, 0))
 Version 2.0.0.
 

DMAC Transactional

void SSP_TransferSendCreateHandleDMAC (SSP_Type *base, ssp_dmac_handle_t *handle, ssp_dmac_callback_t callback, void *userData, dmac_handle_t *dmacHandle)
 Initializes the SSP master DMAC handle. More...
 
void SSP_TransferReceiveCreateHandleDMAC (SSP_Type *base, ssp_dmac_handle_t *handle, ssp_dmac_callback_t callback, void *userData, dmac_handle_t *dmacHandle)
 Initializes the SSP receive DMAC handle. More...
 
status_t SSP_TransferSendDMAC (ssp_dmac_handle_t *handle, ssp_transfer_t *xfer)
 Performs a non-blocking SSP transfer using DMAC. More...
 
status_t SSP_TransferReceiveDMAC (ssp_dmac_handle_t *handle, ssp_transfer_t *xfer)
 Performs a non-blocking SSP transfer using DMAC. More...
 
void SSP_TransferAbortSendDMAC (ssp_dmac_handle_t *handle)
 Aborts a SSP transfer using DMAC. More...
 
void SSP_TransferAbortReceiveDMAC (ssp_dmac_handle_t *handle)
 Aborts a SSP transfer using DMAC. More...
 

Data Structure Documentation

struct _ssp_dmac_handle

A ssp_dmac_handle object can used to represent SSP TX or RX.

Data Fields

SSP_Type * base
 SSP base address.
 
dmac_handle_t * dmacHandle
 DMAC handler for SSP send.
 
uint32_t bitWidth
 bit width
 
dmac_channel_burst_length_t burstLength
 dmac channel burst length
 
uint32_t state
 SSP DMAC transfer internal state.
 
ssp_dmac_callback_t callback
 Callback for users while transfer finish or error occurred.
 
void * userData
 User callback parameter.
 

Function Documentation

void SSP_TransferSendCreateHandleDMAC ( SSP_Type *  base,
ssp_dmac_handle_t *  handle,
ssp_dmac_callback_t  callback,
void *  userData,
dmac_handle_t *  dmacHandle 
)

This function initializes the SSP master DMAC handle, which can be used for other SSP master transactional APIs. Usually, for a specified SSP instance, call this API once to get the initialized handle.

Parameters
baseSSP base pointer.
handleSSP DMAC handle pointer.
baseSSP peripheral base address.
callbackPointer to user callback function.
userDataUser parameter passed to the callback function.
dmacHandleDMAC handle pointer, this handle shall be static allocated by users.
void SSP_TransferReceiveCreateHandleDMAC ( SSP_Type *  base,
ssp_dmac_handle_t *  handle,
ssp_dmac_callback_t  callback,
void *  userData,
dmac_handle_t *  dmacHandle 
)

This function initializes the SSP receive DMAC handle, which can be used for other SSP master transactional APIs. Usually, for a specified SSP instance, call this API once to get the initialized handle.

Parameters
baseSSP base pointer.
handleSSP DMAC handle pointer.
baseSSP peripheral base address.
callbackPointer to user callback function.
userDataUser parameter passed to the callback function.
dmacHandleDMAC handle pointer, this handle shall be static allocated by users.
status_t SSP_TransferSendDMAC ( ssp_dmac_handle_t *  handle,
ssp_transfer_t xfer 
)
Note
This interface returns immediately after the transfer initiates.
Parameters
handleSSP DMAC handle pointer.
xferPointer to DMAC transfer structure.
Return values
kStatus_SuccessSuccessfully start the data receive.
kStatus_SSP_TxBusyPrevious receive still not finished.
kStatus_InvalidArgumentThe input parameter is invalid.
status_t SSP_TransferReceiveDMAC ( ssp_dmac_handle_t *  handle,
ssp_transfer_t xfer 
)
Note
This interface returns immediately after transfer initiates.
Parameters
handleSSP DMAC handle pointer.
xferPointer to DMAC transfer structure.
Return values
kStatus_SuccessSuccessfully start the data receive.
kStatus_SSP_RxBusyPrevious receive still not finished.
kStatus_InvalidArgumentThe input parameter is invalid.
void SSP_TransferAbortSendDMAC ( ssp_dmac_handle_t *  handle)
Parameters
handleSSP DMAC handle pointer.
void SSP_TransferAbortReceiveDMAC ( ssp_dmac_handle_t *  handle)
Parameters
handleSSP DMAC handle pointer.