Classes | Macros | Typedefs | Enumerations | Functions | Variables
fsl_sai_edma.c File Reference
#include "fsl_sai_edma.h"
Include dependency graph for fsl_sai_edma.c:

Go to the source code of this file.

Classes

struct  sai_edma_private_handle
 

Macros

#define FSL_COMPONENT_ID   "platform.drivers.sai_edma"
 
#define STCD_ADDR(address)   (edma_tcd_t *)(((uint32_t)(address) + 32UL) & ~0x1FU)
 

Typedefs

typedef struct sai_edma_private_handle sai_edma_private_handle_t
 

Enumerations

enum  { kSAI_Busy = 0x0U, kSAI_Idle }
 sai_edma_transfer_state, sai edma transfer state. More...
 

Functions

static uint32_t SAI_GetInstance (I2S_Type *base)
 Get the instance number for SAI. More...
 
static void SAI_RxEDMACallback (edma_handle_t *handle, void *userData, bool done, uint32_t tcds)
 SAI EDMA callback for receive. More...
 
void SAI_TransferAbortReceiveEDMA (I2S_Type *base, sai_edma_handle_t *handle)
 Aborts a SAI receive using eDMA. More...
 
void SAI_TransferAbortSendEDMA (I2S_Type *base, sai_edma_handle_t *handle)
 Aborts a SAI transfer using eDMA. More...
 
status_t SAI_TransferGetReceiveCountEDMA (I2S_Type *base, sai_edma_handle_t *handle, size_t *count)
 Gets byte count received by SAI. More...
 
status_t SAI_TransferGetSendCountEDMA (I2S_Type *base, sai_edma_handle_t *handle, size_t *count)
 Gets byte count sent by SAI. More...
 
status_t SAI_TransferReceiveEDMA (I2S_Type *base, sai_edma_handle_t *handle, sai_transfer_t *xfer)
 Performs a non-blocking SAI receive using eDMA. More...
 
void SAI_TransferRxCreateHandleEDMA (I2S_Type *base, sai_edma_handle_t *handle, sai_edma_callback_t callback, void *userData, edma_handle_t *rxDmaHandle)
 Initializes the SAI Rx eDMA handle. More...
 
void SAI_TransferRxSetConfigEDMA (I2S_Type *base, sai_edma_handle_t *handle, sai_transceiver_t *saiConfig)
 Configures the SAI Rx. More...
 
void SAI_TransferRxSetFormatEDMA (I2S_Type *base, sai_edma_handle_t *handle, sai_transfer_format_t *format, uint32_t mclkSourceClockHz, uint32_t bclkSourceClockHz)
 Configures the SAI Rx audio format. More...
 
status_t SAI_TransferSendEDMA (I2S_Type *base, sai_edma_handle_t *handle, sai_transfer_t *xfer)
 Performs a non-blocking SAI transfer using DMA. More...
 
void SAI_TransferTerminateReceiveEDMA (I2S_Type *base, sai_edma_handle_t *handle)
 Terminate all SAI receive. More...
 
void SAI_TransferTerminateSendEDMA (I2S_Type *base, sai_edma_handle_t *handle)
 Terminate all SAI send. More...
 
void SAI_TransferTxCreateHandleEDMA (I2S_Type *base, sai_edma_handle_t *handle, sai_edma_callback_t callback, void *userData, edma_handle_t *txDmaHandle)
 Initializes the SAI eDMA handle. More...
 
void SAI_TransferTxSetConfigEDMA (I2S_Type *base, sai_edma_handle_t *handle, sai_transceiver_t *saiConfig)
 Configures the SAI Tx. More...
 
void SAI_TransferTxSetFormatEDMA (I2S_Type *base, sai_edma_handle_t *handle, sai_transfer_format_t *format, uint32_t mclkSourceClockHz, uint32_t bclkSourceClockHz)
 Configures the SAI Tx audio format. More...
 
static void SAI_TxEDMACallback (edma_handle_t *handle, void *userData, bool done, uint32_t tcds)
 SAI EDMA callback for send. More...
 

Variables

static sai_edma_private_handle_t s_edmaPrivateHandle [ARRAY_SIZE(s_saiBases)][2]
 
static I2S_Type *const s_saiBases [] = I2S_BASE_PTRS
 

Macro Definition Documentation

◆ FSL_COMPONENT_ID

#define FSL_COMPONENT_ID   "platform.drivers.sai_edma"

Definition at line 13 of file fsl_sai_edma.c.

◆ STCD_ADDR

#define STCD_ADDR (   address)    (edma_tcd_t *)(((uint32_t)(address) + 32UL) & ~0x1FU)

Definition at line 20 of file fsl_sai_edma.c.

Typedef Documentation

◆ sai_edma_private_handle_t

Enumeration Type Documentation

◆ anonymous enum

anonymous enum

sai_edma_transfer_state, sai edma transfer state.

Enumerator
kSAI_Busy 

SAI is busy

kSAI_Idle 

Transfer is done.

Definition at line 32 of file fsl_sai_edma.c.

Function Documentation

◆ SAI_GetInstance()

static uint32_t SAI_GetInstance ( I2S_Type base)
static

Get the instance number for SAI.

Parameters
baseSAI base pointer.

Definition at line 74 of file fsl_sai_edma.c.

◆ SAI_RxEDMACallback()

static void SAI_RxEDMACallback ( edma_handle_t handle,
void *  userData,
bool  done,
uint32_t  tcds 
)
static

SAI EDMA callback for receive.

Parameters
handlepointer to sai_edma_handle_t structure which stores the transfer state.
userDataParameter for user callback.
doneIf the DMA transfer finished.
tcdsThe TCD index.

Definition at line 114 of file fsl_sai_edma.c.

◆ SAI_TxEDMACallback()

static void SAI_TxEDMACallback ( edma_handle_t handle,
void *  userData,
bool  done,
uint32_t  tcds 
)
static

SAI EDMA callback for send.

Parameters
handlepointer to sai_edma_handle_t structure which stores the transfer state.
userDataParameter for user callback.
doneIf the DMA transfer finished.
tcdsThe TCD index.

Definition at line 92 of file fsl_sai_edma.c.

Variable Documentation

◆ s_edmaPrivateHandle

sai_edma_private_handle_t s_edmaPrivateHandle[ARRAY_SIZE(s_saiBases)][2]
static

Definition at line 39 of file fsl_sai_edma.c.

◆ s_saiBases

I2S_Type* const s_saiBases[] = I2S_BASE_PTRS
static

Definition at line 22 of file fsl_sai_edma.c.



picovoice_driver
Author(s):
autogenerated on Fri Apr 1 2022 02:14:57