Macros | Functions | Variables
fsl_edma.c File Reference
#include "fsl_edma.h"
Include dependency graph for fsl_edma.c:

Go to the source code of this file.

Macros

#define EDMA_TRANSFER_ENABLED_MASK   0x80U
 
#define FSL_COMPONENT_ID   "platform.drivers.edma"
 

Functions

void EDMA_AbortTransfer (edma_handle_t *handle)
 eDMA aborts transfer. More...
 
void EDMA_ClearChannelStatusFlags (DMA_Type *base, uint32_t channel, uint32_t mask)
 Clears the eDMA channel status flags. More...
 
void EDMA_CreateHandle (edma_handle_t *handle, DMA_Type *base, uint32_t channel)
 Creates the eDMA handle. More...
 
void EDMA_Deinit (DMA_Type *base)
 Deinitializes the eDMA peripheral. More...
 
void EDMA_DisableChannelInterrupts (DMA_Type *base, uint32_t channel, uint32_t mask)
 Disables the interrupt source for the eDMA transfer. More...
 
void EDMA_EnableChannelInterrupts (DMA_Type *base, uint32_t channel, uint32_t mask)
 Enables the interrupt source for the eDMA transfer. More...
 
uint32_t EDMA_GetChannelStatusFlags (DMA_Type *base, uint32_t channel)
 Gets the eDMA channel status flags. More...
 
void EDMA_GetDefaultConfig (edma_config_t *config)
 Gets the eDMA default configuration structure. More...
 
static uint32_t EDMA_GetInstance (DMA_Type *base)
 
static uint32_t EDMA_GetInstanceOffset (uint32_t instance)
 Get instance offset. More...
 
uint32_t EDMA_GetRemainingMajorLoopCount (DMA_Type *base, uint32_t channel)
 Gets the remaining major loop count from the eDMA current channel TCD. More...
 
void EDMA_HandleIRQ (edma_handle_t *handle)
 eDMA IRQ handler for the current major loop transfer completion. More...
 
void EDMA_Init (DMA_Type *base, const edma_config_t *config)
 Initializes the eDMA peripheral. More...
 
void EDMA_InstallTCD (DMA_Type *base, uint32_t channel, edma_tcd_t *tcd)
 Push content of TCD structure into hardware TCD register. More...
 
void EDMA_InstallTCDMemory (edma_handle_t *handle, edma_tcd_t *tcdPool, uint32_t tcdSize)
 Installs the TCDs memory pool into the eDMA handle. More...
 
void EDMA_PrepareTransfer (edma_transfer_config_t *config, void *srcAddr, uint32_t srcWidth, void *destAddr, uint32_t destWidth, uint32_t bytesEachRequest, uint32_t transferBytes, edma_transfer_type_t type)
 Prepares the eDMA transfer structure. More...
 
void EDMA_PrepareTransferConfig (edma_transfer_config_t *config, void *srcAddr, uint32_t srcWidth, int16_t srcOffset, void *destAddr, uint32_t destWidth, int16_t destOffset, uint32_t bytesEachRequest, uint32_t transferBytes)
 Prepares the eDMA transfer structure configurations. More...
 
void EDMA_ResetChannel (DMA_Type *base, uint32_t channel)
 Sets all TCD registers to default values. More...
 
void EDMA_SetBandWidth (DMA_Type *base, uint32_t channel, edma_bandwidth_t bandWidth)
 Sets the bandwidth for the eDMA transfer. More...
 
void EDMA_SetCallback (edma_handle_t *handle, edma_callback callback, void *userData)
 Installs a callback function for the eDMA transfer. More...
 
void EDMA_SetChannelLink (DMA_Type *base, uint32_t channel, edma_channel_link_type_t type, uint32_t linkedChannel)
 Sets the channel link for the eDMA transfer. More...
 
void EDMA_SetChannelPreemptionConfig (DMA_Type *base, uint32_t channel, const edma_channel_Preemption_config_t *config)
 Configures the eDMA channel preemption feature. More...
 
void EDMA_SetMinorOffsetConfig (DMA_Type *base, uint32_t channel, const edma_minor_offset_config_t *config)
 Configures the eDMA minor offset feature. More...
 
void EDMA_SetModulo (DMA_Type *base, uint32_t channel, edma_modulo_t srcModulo, edma_modulo_t destModulo)
 Sets the source modulo and the destination modulo for the eDMA transfer. More...
 
void EDMA_SetTransferConfig (DMA_Type *base, uint32_t channel, const edma_transfer_config_t *config, edma_tcd_t *nextTcd)
 Configures the eDMA transfer attribute. More...
 
void EDMA_StartTransfer (edma_handle_t *handle)
 eDMA starts transfer. More...
 
void EDMA_StopTransfer (edma_handle_t *handle)
 eDMA stops transfer. More...
 
status_t EDMA_SubmitTransfer (edma_handle_t *handle, const edma_transfer_config_t *config)
 Submits the eDMA transfer request. More...
 
void EDMA_TcdDisableInterrupts (edma_tcd_t *tcd, uint32_t mask)
 Disables the interrupt source for the eDMA TCD. More...
 
void EDMA_TcdEnableInterrupts (edma_tcd_t *tcd, uint32_t mask)
 Enables the interrupt source for the eDMA TCD. More...
 
void EDMA_TcdReset (edma_tcd_t *tcd)
 Sets all fields to default values for the TCD structure. More...
 
void EDMA_TcdSetChannelLink (edma_tcd_t *tcd, edma_channel_link_type_t type, uint32_t linkedChannel)
 Sets the channel link for the eDMA TCD. More...
 
void EDMA_TcdSetMinorOffsetConfig (edma_tcd_t *tcd, const edma_minor_offset_config_t *config)
 Configures the eDMA TCD minor offset feature. More...
 
void EDMA_TcdSetModulo (edma_tcd_t *tcd, edma_modulo_t srcModulo, edma_modulo_t destModulo)
 Sets the source modulo and the destination modulo for the eDMA TCD. More...
 
void EDMA_TcdSetTransferConfig (edma_tcd_t *tcd, const edma_transfer_config_t *config, edma_tcd_t *nextTcd)
 Configures the eDMA TCD transfer attribute. More...
 
static edma_transfer_size_t EDMA_TransferWidthMapping (uint32_t width)
 Map transfer width. More...
 

Variables

static DMA_Type *const s_edmaBases [] = DMA_BASE_PTRS
 Array to map EDMA instance number to base pointer. More...
 
static const clock_ip_name_t s_edmaClockName [] = EDMA_CLOCKS
 Array to map EDMA instance number to clock name. More...
 
static edma_handle_ts_EDMAHandle [FSL_FEATURE_EDMA_MODULE_CHANNEL *FSL_FEATURE_SOC_EDMA_COUNT]
 Pointers to transfer handle for each EDMA channel. More...
 
static const IRQn_Type s_edmaIRQNumber [][FSL_FEATURE_EDMA_MODULE_CHANNEL] = DMA_CHN_IRQS
 Array to map EDMA instance number to IRQ number. More...
 

Macro Definition Documentation

◆ EDMA_TRANSFER_ENABLED_MASK

#define EDMA_TRANSFER_ENABLED_MASK   0x80U

Definition at line 20 of file fsl_edma.c.

◆ FSL_COMPONENT_ID

#define FSL_COMPONENT_ID   "platform.drivers.edma"

Definition at line 17 of file fsl_edma.c.

Function Documentation

◆ EDMA_GetInstance()

static uint32_t EDMA_GetInstance ( DMA_Type base)
static

Definition at line 61 of file fsl_edma.c.

◆ EDMA_GetInstanceOffset()

static uint32_t EDMA_GetInstanceOffset ( uint32_t  instance)
static

Get instance offset.

Parameters
instanceEDMA peripheral instance number.

Definition at line 760 of file fsl_edma.c.

◆ EDMA_TransferWidthMapping()

static edma_transfer_size_t EDMA_TransferWidthMapping ( uint32_t  width)
static

Map transfer width.

Parameters
widthtransfer width.

Definition at line 875 of file fsl_edma.c.

Variable Documentation

◆ s_edmaBases

DMA_Type* const s_edmaBases[] = DMA_BASE_PTRS
static

Array to map EDMA instance number to base pointer.

Definition at line 44 of file fsl_edma.c.

◆ s_edmaClockName

const clock_ip_name_t s_edmaClockName[] = EDMA_CLOCKS
static

Array to map EDMA instance number to clock name.

Definition at line 48 of file fsl_edma.c.

◆ s_EDMAHandle

Pointers to transfer handle for each EDMA channel.

Definition at line 55 of file fsl_edma.c.

◆ s_edmaIRQNumber

const IRQn_Type s_edmaIRQNumber[][FSL_FEATURE_EDMA_MODULE_CHANNEL] = DMA_CHN_IRQS
static

Array to map EDMA instance number to IRQ number.

Definition at line 52 of file fsl_edma.c.



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