Classes
fsl_edma.h File Reference
#include "fsl_common.h"
Include dependency graph for fsl_edma.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  _edma_channel_Preemption_config
 eDMA channel priority configuration More...
 
struct  _edma_config
 eDMA global configuration structure. More...
 
struct  _edma_handle
 eDMA transfer handle structure More...
 
struct  _edma_minor_offset_config
 eDMA minor offset configuration More...
 
struct  _edma_tcd
 eDMA TCD. More...
 
struct  _edma_transfer_config
 eDMA transfer configuration More...
 

Functions

eDMA initialization and de-initialization
void EDMA_Deinit (DMA_Type *base)
 Deinitializes the eDMA peripheral. More...
 
void EDMA_GetDefaultConfig (edma_config_t *config)
 Gets the eDMA default configuration structure. 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...
 
eDMA Channel Operation
void EDMA_DisableChannelInterrupts (DMA_Type *base, uint32_t channel, uint32_t mask)
 Disables the interrupt source for the eDMA transfer. More...
 
static void EDMA_EnableAutoStopRequest (DMA_Type *base, uint32_t channel, bool enable)
 Enables an auto stop request 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...
 
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_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...
 
eDMA TCD Operation
void EDMA_TcdDisableInterrupts (edma_tcd_t *tcd, uint32_t mask)
 Disables the interrupt source for the eDMA TCD. More...
 
static void EDMA_TcdEnableAutoStopRequest (edma_tcd_t *tcd, bool enable)
 Sets the auto stop request 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...
 
static void EDMA_TcdSetBandWidth (edma_tcd_t *tcd, edma_bandwidth_t bandWidth)
 Sets the bandwidth for the eDMA TCD. 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...
 
eDMA Channel Transfer Operation
static void EDMA_DisableChannelRequest (DMA_Type *base, uint32_t channel)
 Disables the eDMA hardware channel request. More...
 
static void EDMA_EnableChannelRequest (DMA_Type *base, uint32_t channel)
 Enables the eDMA hardware channel request. More...
 
static void EDMA_TriggerChannelStart (DMA_Type *base, uint32_t channel)
 Starts the eDMA transfer by using the software trigger. More...
 
eDMA Channel Status Operation
void EDMA_ClearChannelStatusFlags (DMA_Type *base, uint32_t channel, uint32_t mask)
 Clears the eDMA channel status flags. More...
 
uint32_t EDMA_GetChannelStatusFlags (DMA_Type *base, uint32_t channel)
 Gets the eDMA channel status flags. More...
 
static uint32_t EDMA_GetErrorStatusFlags (DMA_Type *base)
 Gets the eDMA channel error status flags. More...
 
uint32_t EDMA_GetRemainingMajorLoopCount (DMA_Type *base, uint32_t channel)
 Gets the remaining major loop count from the eDMA current channel TCD. More...
 
eDMA Transactional Operation
void EDMA_AbortTransfer (edma_handle_t *handle)
 eDMA aborts transfer. More...
 
void EDMA_CreateHandle (edma_handle_t *handle, DMA_Type *base, uint32_t channel)
 Creates the eDMA handle. More...
 
static uint32_t EDMA_GetNextTCDAddress (edma_handle_t *handle)
 Get the next tcd address. More...
 
static uint32_t EDMA_GetUnusedTCDNumber (edma_handle_t *handle)
 Get unused TCD slot number. More...
 
void EDMA_HandleIRQ (edma_handle_t *handle)
 eDMA IRQ handler for the current major loop transfer completion. 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_SetCallback (edma_handle_t *handle, edma_callback callback, void *userData)
 Installs a callback function for the eDMA transfer. 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...
 

Driver version

enum  { kEDMA_DoneFlag = 0x1U, kEDMA_ErrorFlag = 0x2U, kEDMA_InterruptFlag = 0x4U }
 _edma_channel_status_flags eDMA channel status flags. More...
 
enum  {
  kEDMA_DestinationBusErrorFlag = DMA_ES_DBE_MASK, kEDMA_SourceBusErrorFlag = DMA_ES_SBE_MASK, kEDMA_ScatterGatherErrorFlag = DMA_ES_SGE_MASK, kEDMA_NbytesErrorFlag = DMA_ES_NCE_MASK,
  kEDMA_DestinationOffsetErrorFlag = DMA_ES_DOE_MASK, kEDMA_DestinationAddressErrorFlag = DMA_ES_DAE_MASK, kEDMA_SourceOffsetErrorFlag = DMA_ES_SOE_MASK, kEDMA_SourceAddressErrorFlag = DMA_ES_SAE_MASK,
  kEDMA_ErrorChannelFlag = DMA_ES_ERRCHN_MASK, kEDMA_ChannelPriorityErrorFlag = DMA_ES_CPE_MASK, kEDMA_TransferCanceledFlag = DMA_ES_ECX_MASK, kEDMA_ValidFlag = (int)DMA_ES_VLD_MASK
}
 _edma_error_status_flags eDMA channel error status flags. More...
 
enum  { kStatus_EDMA_QueueFull = MAKE_STATUS(kStatusGroup_EDMA, 0), kStatus_EDMA_Busy = MAKE_STATUS(kStatusGroup_EDMA, 1) }
 _edma_transfer_status eDMA transfer status More...
 
enum  _edma_bandwidth { kEDMA_BandwidthStallNone = 0x0U, kEDMA_BandwidthStall4Cycle = 0x2U, kEDMA_BandwidthStall8Cycle = 0x3U }
 Bandwidth control. More...
 
enum  _edma_channel_link_type { kEDMA_LinkNone = 0x0U, kEDMA_MinorLink, kEDMA_MajorLink }
 Channel link type. More...
 
enum  _edma_interrupt_enable { kEDMA_ErrorInterruptEnable = 0x1U, kEDMA_MajorInterruptEnable = DMA_CSR_INTMAJOR_MASK, kEDMA_HalfInterruptEnable = DMA_CSR_INTHALF_MASK }
 eDMA interrupt source More...
 
enum  _edma_modulo {
  kEDMA_ModuloDisable = 0x0U, kEDMA_Modulo2bytes, kEDMA_Modulo4bytes, kEDMA_Modulo8bytes,
  kEDMA_Modulo16bytes, kEDMA_Modulo32bytes, kEDMA_Modulo64bytes, kEDMA_Modulo128bytes,
  kEDMA_Modulo256bytes, kEDMA_Modulo512bytes, kEDMA_Modulo1Kbytes, kEDMA_Modulo2Kbytes,
  kEDMA_Modulo4Kbytes, kEDMA_Modulo8Kbytes, kEDMA_Modulo16Kbytes, kEDMA_Modulo32Kbytes,
  kEDMA_Modulo64Kbytes, kEDMA_Modulo128Kbytes, kEDMA_Modulo256Kbytes, kEDMA_Modulo512Kbytes,
  kEDMA_Modulo1Mbytes, kEDMA_Modulo2Mbytes, kEDMA_Modulo4Mbytes, kEDMA_Modulo8Mbytes,
  kEDMA_Modulo16Mbytes, kEDMA_Modulo32Mbytes, kEDMA_Modulo64Mbytes, kEDMA_Modulo128Mbytes,
  kEDMA_Modulo256Mbytes, kEDMA_Modulo512Mbytes, kEDMA_Modulo1Gbytes, kEDMA_Modulo2Gbytes
}
 eDMA modulo configuration More...
 
enum  _edma_transfer_size {
  kEDMA_TransferSize1Bytes = 0x0U, kEDMA_TransferSize2Bytes = 0x1U, kEDMA_TransferSize4Bytes = 0x2U, kEDMA_TransferSize8Bytes = 0x3U,
  kEDMA_TransferSize16Bytes = 0x4U, kEDMA_TransferSize32Bytes = 0x5U
}
 eDMA transfer configuration More...
 
enum  _edma_transfer_type { kEDMA_MemoryToMemory = 0x0U, kEDMA_PeripheralToMemory, kEDMA_MemoryToPeripheral, kEDMA_PeripheralToPeripheral }
 eDMA transfer type More...
 
#define DMA_DCHPRI_INDEX(channel)   (((channel) & ~0x03U) | (3U - ((channel)&0x03U)))
 Compute the offset unit from DCHPRI3. More...
 
typedef enum _edma_bandwidth edma_bandwidth_t
 Bandwidth control. More...
 
typedef void(* edma_callback) (struct _edma_handle *handle, void *userData, bool transferDone, uint32_t tcds)
 Define callback function for eDMA. More...
 
typedef enum _edma_channel_link_type edma_channel_link_type_t
 Channel link type. More...
 
typedef struct _edma_channel_Preemption_config edma_channel_Preemption_config_t
 eDMA channel priority configuration More...
 
typedef struct _edma_config edma_config_t
 eDMA global configuration structure. More...
 
typedef struct _edma_handle edma_handle_t
 eDMA transfer handle structure More...
 
typedef enum _edma_interrupt_enable edma_interrupt_enable_t
 eDMA interrupt source More...
 
typedef struct _edma_minor_offset_config edma_minor_offset_config_t
 eDMA minor offset configuration More...
 
typedef enum _edma_modulo edma_modulo_t
 eDMA modulo configuration More...
 
typedef struct _edma_tcd edma_tcd_t
 eDMA TCD. More...
 
typedef struct _edma_transfer_config edma_transfer_config_t
 eDMA transfer configuration More...
 
typedef enum _edma_transfer_size edma_transfer_size_t
 eDMA transfer configuration More...
 
typedef enum _edma_transfer_type edma_transfer_type_t
 eDMA transfer type More...
 
#define FSL_EDMA_DRIVER_VERSION   (MAKE_VERSION(2, 3, 2))
 eDMA driver version More...
 


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