Back to home page

LXR

 
 

    


File indexing completed on 2025-05-11 08:22:58

0001 /*
0002  * Copyright (c) 2015, Freescale Semiconductor, Inc.
0003  * Copyright 2016-2022 NXP
0004  * All rights reserved.
0005  *
0006  * SPDX-License-Identifier: BSD-3-Clause
0007  */
0008 
0009 #ifndef _FSL_EDMA_H_
0010 #define _FSL_EDMA_H_
0011 
0012 #include "fsl_common.h"
0013 
0014 /*!
0015  * @addtogroup edma
0016  * @{
0017  */
0018 
0019 /*******************************************************************************
0020  * Definitions
0021  ******************************************************************************/
0022 
0023 /*! @name Driver version */
0024 /*@{*/
0025 /*! @brief eDMA driver version */
0026 #define FSL_EDMA_DRIVER_VERSION (MAKE_VERSION(2, 4, 3)) /*!< Version 2.4.3. */
0027 /*@}*/
0028 
0029 /*! @brief Compute the offset unit from DCHPRI3 */
0030 #define DMA_DCHPRI_INDEX(channel) (((channel) & ~0x03U) | (3U - ((channel)&0x03U)))
0031 
0032 /*! @brief eDMA transfer configuration */
0033 typedef enum _edma_transfer_size
0034 {
0035     kEDMA_TransferSize1Bytes  = 0x0U, /*!< Source/Destination data transfer size is 1 byte every time */
0036     kEDMA_TransferSize2Bytes  = 0x1U, /*!< Source/Destination data transfer size is 2 bytes every time */
0037     kEDMA_TransferSize4Bytes  = 0x2U, /*!< Source/Destination data transfer size is 4 bytes every time */
0038     kEDMA_TransferSize8Bytes  = 0x3U, /*!< Source/Destination data transfer size is 8 bytes every time */
0039     kEDMA_TransferSize16Bytes = 0x4U, /*!< Source/Destination data transfer size is 16 bytes every time */
0040     kEDMA_TransferSize32Bytes = 0x5U, /*!< Source/Destination data transfer size is 32 bytes every time */
0041 } edma_transfer_size_t;
0042 
0043 /*! @brief eDMA modulo configuration */
0044 typedef enum _edma_modulo
0045 {
0046     kEDMA_ModuloDisable = 0x0U, /*!< Disable modulo */
0047     kEDMA_Modulo2bytes,         /*!< Circular buffer size is 2 bytes. */
0048     kEDMA_Modulo4bytes,         /*!< Circular buffer size is 4 bytes. */
0049     kEDMA_Modulo8bytes,         /*!< Circular buffer size is 8 bytes. */
0050     kEDMA_Modulo16bytes,        /*!< Circular buffer size is 16 bytes. */
0051     kEDMA_Modulo32bytes,        /*!< Circular buffer size is 32 bytes. */
0052     kEDMA_Modulo64bytes,        /*!< Circular buffer size is 64 bytes. */
0053     kEDMA_Modulo128bytes,       /*!< Circular buffer size is 128 bytes. */
0054     kEDMA_Modulo256bytes,       /*!< Circular buffer size is 256 bytes. */
0055     kEDMA_Modulo512bytes,       /*!< Circular buffer size is 512 bytes. */
0056     kEDMA_Modulo1Kbytes,        /*!< Circular buffer size is 1 K bytes. */
0057     kEDMA_Modulo2Kbytes,        /*!< Circular buffer size is 2 K bytes. */
0058     kEDMA_Modulo4Kbytes,        /*!< Circular buffer size is 4 K bytes. */
0059     kEDMA_Modulo8Kbytes,        /*!< Circular buffer size is 8 K bytes. */
0060     kEDMA_Modulo16Kbytes,       /*!< Circular buffer size is 16 K bytes. */
0061     kEDMA_Modulo32Kbytes,       /*!< Circular buffer size is 32 K bytes. */
0062     kEDMA_Modulo64Kbytes,       /*!< Circular buffer size is 64 K bytes. */
0063     kEDMA_Modulo128Kbytes,      /*!< Circular buffer size is 128 K bytes. */
0064     kEDMA_Modulo256Kbytes,      /*!< Circular buffer size is 256 K bytes. */
0065     kEDMA_Modulo512Kbytes,      /*!< Circular buffer size is 512 K bytes. */
0066     kEDMA_Modulo1Mbytes,        /*!< Circular buffer size is 1 M bytes. */
0067     kEDMA_Modulo2Mbytes,        /*!< Circular buffer size is 2 M bytes. */
0068     kEDMA_Modulo4Mbytes,        /*!< Circular buffer size is 4 M bytes. */
0069     kEDMA_Modulo8Mbytes,        /*!< Circular buffer size is 8 M bytes. */
0070     kEDMA_Modulo16Mbytes,       /*!< Circular buffer size is 16 M bytes. */
0071     kEDMA_Modulo32Mbytes,       /*!< Circular buffer size is 32 M bytes. */
0072     kEDMA_Modulo64Mbytes,       /*!< Circular buffer size is 64 M bytes. */
0073     kEDMA_Modulo128Mbytes,      /*!< Circular buffer size is 128 M bytes. */
0074     kEDMA_Modulo256Mbytes,      /*!< Circular buffer size is 256 M bytes. */
0075     kEDMA_Modulo512Mbytes,      /*!< Circular buffer size is 512 M bytes. */
0076     kEDMA_Modulo1Gbytes,        /*!< Circular buffer size is 1 G bytes. */
0077     kEDMA_Modulo2Gbytes,        /*!< Circular buffer size is 2 G bytes. */
0078 } edma_modulo_t;
0079 
0080 /*! @brief Bandwidth control */
0081 typedef enum _edma_bandwidth
0082 {
0083     kEDMA_BandwidthStallNone   = 0x0U, /*!< No eDMA engine stalls. */
0084     kEDMA_BandwidthStall4Cycle = 0x2U, /*!< eDMA engine stalls for 4 cycles after each read/write. */
0085     kEDMA_BandwidthStall8Cycle = 0x3U, /*!< eDMA engine stalls for 8 cycles after each read/write. */
0086 } edma_bandwidth_t;
0087 
0088 /*! @brief Channel link type */
0089 typedef enum _edma_channel_link_type
0090 {
0091     kEDMA_LinkNone = 0x0U, /*!< No channel link  */
0092     kEDMA_MinorLink,       /*!< Channel link after each minor loop */
0093     kEDMA_MajorLink,       /*!< Channel link while major loop count exhausted */
0094 } edma_channel_link_type_t;
0095 
0096 /*!@brief _edma_channel_status_flags eDMA channel status flags. */
0097 enum
0098 {
0099     kEDMA_DoneFlag      = 0x1U, /*!< DONE flag, set while transfer finished, CITER value exhausted*/
0100     kEDMA_ErrorFlag     = 0x2U, /*!< eDMA error flag, an error occurred in a transfer */
0101     kEDMA_InterruptFlag = 0x4U, /*!< eDMA interrupt flag, set while an interrupt occurred of this channel */
0102 };
0103 
0104 /*! @brief _edma_error_status_flags eDMA channel error status flags. */
0105 enum
0106 {
0107     kEDMA_DestinationBusErrorFlag    = DMA_ES_DBE_MASK, /*!< Bus error on destination address */
0108     kEDMA_SourceBusErrorFlag         = DMA_ES_SBE_MASK, /*!< Bus error on the source address */
0109     kEDMA_ScatterGatherErrorFlag     = DMA_ES_SGE_MASK, /*!< Error on the Scatter/Gather address, not 32byte aligned. */
0110     kEDMA_NbytesErrorFlag            = DMA_ES_NCE_MASK, /*!< NBYTES/CITER configuration error */
0111     kEDMA_DestinationOffsetErrorFlag = DMA_ES_DOE_MASK, /*!< Destination offset not aligned with destination size */
0112     kEDMA_DestinationAddressErrorFlag = DMA_ES_DAE_MASK, /*!< Destination address not aligned with destination size */
0113     kEDMA_SourceOffsetErrorFlag       = DMA_ES_SOE_MASK, /*!< Source offset not aligned with source size */
0114     kEDMA_SourceAddressErrorFlag      = DMA_ES_SAE_MASK, /*!< Source address not aligned with source size*/
0115     kEDMA_ErrorChannelFlag            = DMA_ES_ERRCHN_MASK, /*!< Error channel number of the cancelled channel number */
0116     kEDMA_ChannelPriorityErrorFlag    = DMA_ES_CPE_MASK,    /*!< Channel priority is not unique. */
0117     kEDMA_TransferCanceledFlag        = DMA_ES_ECX_MASK,    /*!< Transfer cancelled */
0118 #if defined(FSL_FEATURE_EDMA_CHANNEL_GROUP_COUNT) && (FSL_FEATURE_EDMA_CHANNEL_GROUP_COUNT > 1)
0119     kEDMA_GroupPriorityErrorFlag = DMA_ES_GPE_MASK, /*!< Group priority is not unique. */
0120 #endif
0121     kEDMA_ValidFlag = (int)DMA_ES_VLD_MASK, /*!< No error occurred, this bit is 0. Otherwise, it is 1. */
0122 };
0123 
0124 /*! @brief eDMA interrupt source */
0125 typedef enum _edma_interrupt_enable
0126 {
0127     kEDMA_ErrorInterruptEnable = 0x1U,                  /*!< Enable interrupt while channel error occurs. */
0128     kEDMA_MajorInterruptEnable = DMA_CSR_INTMAJOR_MASK, /*!< Enable interrupt while major count exhausted. */
0129     kEDMA_HalfInterruptEnable  = DMA_CSR_INTHALF_MASK,  /*!< Enable interrupt while major count to half value. */
0130 } edma_interrupt_enable_t;
0131 
0132 /*! @brief eDMA transfer type */
0133 typedef enum _edma_transfer_type
0134 {
0135     kEDMA_MemoryToMemory = 0x0U,  /*!< Transfer from memory to memory */
0136     kEDMA_PeripheralToMemory,     /*!< Transfer from peripheral to memory */
0137     kEDMA_MemoryToPeripheral,     /*!< Transfer from memory to peripheral */
0138     kEDMA_PeripheralToPeripheral, /*!< Transfer from Peripheral to peripheral */
0139 } edma_transfer_type_t;
0140 
0141 /*! @brief _edma_transfer_status eDMA transfer status */
0142 enum
0143 {
0144     kStatus_EDMA_QueueFull = MAKE_STATUS(kStatusGroup_EDMA, 0), /*!< TCD queue is full. */
0145     kStatus_EDMA_Busy      = MAKE_STATUS(kStatusGroup_EDMA, 1), /*!< Channel is busy and can't handle the
0146                                                                      transfer request. */
0147 };
0148 
0149 /*! @brief eDMA global configuration structure.*/
0150 typedef struct _edma_config
0151 {
0152     bool enableContinuousLinkMode;    /*!< Enable (true) continuous link mode. Upon minor loop completion, the channel
0153                                            activates again if that channel has a minor loop channel link enabled and
0154                                            the link channel is itself. */
0155     bool enableHaltOnError;           /*!< Enable (true) transfer halt on error. Any error causes the HALT bit to set.
0156                                            Subsequently, all service requests are ignored until the HALT bit is cleared.*/
0157     bool enableRoundRobinArbitration; /*!< Enable (true) round robin channel arbitration method or fixed priority
0158                                            arbitration is used for channel selection */
0159     bool enableDebugMode; /*!< Enable(true) eDMA debug mode. When in debug mode, the eDMA stalls the start of
0160                                a new channel. Executing channels are allowed to complete. */
0161 } edma_config_t;
0162 
0163 /*!
0164  * @brief eDMA transfer configuration
0165  *
0166  * This structure configures the source/destination transfer attribute.
0167  */
0168 typedef struct _edma_transfer_config
0169 {
0170     uint32_t srcAddr;                      /*!< Source data address. */
0171     uint32_t destAddr;                     /*!< Destination data address. */
0172     edma_transfer_size_t srcTransferSize;  /*!< Source data transfer size. */
0173     edma_transfer_size_t destTransferSize; /*!< Destination data transfer size. */
0174     int16_t srcOffset;                     /*!< Sign-extended offset applied to the current source address to
0175                                                 form the next-state value as each source read is completed. */
0176     int16_t destOffset;                    /*!< Sign-extended offset applied to the current destination address to
0177                                                 form the next-state value as each destination write is completed. */
0178     uint32_t minorLoopBytes;               /*!< Bytes to transfer in a minor loop*/
0179     uint32_t majorLoopCounts;              /*!< Major loop iteration count. */
0180 } edma_transfer_config_t;
0181 
0182 /*! @brief eDMA channel priority configuration */
0183 typedef struct _edma_channel_Preemption_config
0184 {
0185     bool enableChannelPreemption; /*!< If true: a channel can be suspended by other channel with higher priority */
0186     bool enablePreemptAbility;    /*!< If true: a channel can suspend other channel with low priority */
0187     uint8_t channelPriority;      /*!< Channel priority */
0188 } edma_channel_Preemption_config_t;
0189 
0190 /*! @brief eDMA minor offset configuration */
0191 typedef struct _edma_minor_offset_config
0192 {
0193     bool enableSrcMinorOffset;  /*!< Enable(true) or Disable(false) source minor loop offset. */
0194     bool enableDestMinorOffset; /*!< Enable(true) or Disable(false) destination minor loop offset. */
0195     uint32_t minorOffset;       /*!< Offset for a minor loop mapping. */
0196 } edma_minor_offset_config_t;
0197 
0198 /*!
0199  * @brief eDMA TCD.
0200  *
0201  * This structure is same as TCD register which is described in reference manual,
0202  * and is used to configure the scatter/gather feature as a next hardware TCD.
0203  */
0204 typedef struct _edma_tcd
0205 {
0206     __IO uint32_t SADDR;     /*!< SADDR register, used to save source address */
0207     __IO uint16_t SOFF;      /*!< SOFF register, save offset bytes every transfer */
0208     __IO uint16_t ATTR;      /*!< ATTR register, source/destination transfer size and modulo */
0209     __IO uint32_t NBYTES;    /*!< Nbytes register, minor loop length in bytes */
0210     __IO uint32_t SLAST;     /*!< SLAST register */
0211     __IO uint32_t DADDR;     /*!< DADDR register, used for destination address */
0212     __IO uint16_t DOFF;      /*!< DOFF register, used for destination offset */
0213     __IO uint16_t CITER;     /*!< CITER register, current minor loop numbers, for unfinished minor loop.*/
0214     __IO uint32_t DLAST_SGA; /*!< DLASTSGA register, next tcd address used in scatter-gather mode */
0215     __IO uint16_t CSR;       /*!< CSR register, for TCD control status */
0216     __IO uint16_t BITER;     /*!< BITER register, begin minor loop count. */
0217 } edma_tcd_t;
0218 
0219 /*! @brief Callback for eDMA */
0220 struct _edma_handle;
0221 
0222 /*! @brief Define callback function for eDMA.
0223  *
0224  * This callback function is called in the EDMA interrupt handle.
0225  * In normal mode, run into callback function means the transfer users need is done.
0226  * In scatter gather mode, run into callback function means a transfer control block (tcd) is finished. Not
0227  * all transfer finished, users can get the finished tcd numbers using interface EDMA_GetUnusedTCDNumber.
0228  *
0229  * @param handle EDMA handle pointer, users shall not touch the values inside.
0230  * @param userData The callback user parameter pointer. Users can use this parameter to involve things users need to
0231  *                 change in EDMA callback function.
0232  * @param transferDone If the current loaded transfer done. In normal mode it means if all transfer done. In scatter
0233  *                     gather mode, this parameter shows is the current transfer block in EDMA register is done. As the
0234  *                     load of core is different, it will be different if the new tcd loaded into EDMA registers while
0235  *                     this callback called. If true, it always means new tcd still not loaded into registers, while
0236  *                     false means new tcd already loaded into registers.
0237  * @param tcds How many tcds are done from the last callback. This parameter only used in scatter gather mode. It
0238  *             tells user how many tcds are finished between the last callback and this.
0239  */
0240 typedef void (*edma_callback)(struct _edma_handle *handle, void *userData, bool transferDone, uint32_t tcds);
0241 
0242 /*! @brief eDMA transfer handle structure */
0243 typedef struct _edma_handle
0244 {
0245     edma_callback callback; /*!< Callback function for major count exhausted. */
0246     void *userData;         /*!< Callback function parameter. */
0247     DMA_Type *base;         /*!< eDMA peripheral base address. */
0248     edma_tcd_t *tcdPool;    /*!< Pointer to memory stored TCDs. */
0249     uint8_t channel;        /*!< eDMA channel number. */
0250     volatile int8_t header; /*!< The first TCD index. Should point to the next TCD to be loaded into the eDMA engine. */
0251     volatile int8_t tail;   /*!< The last TCD index. Should point to the next TCD to be stored into the memory pool. */
0252     volatile int8_t tcdUsed; /*!< The number of used TCD slots. Should reflect the number of TCDs can be used/loaded in
0253                                 the memory. */
0254     volatile int8_t tcdSize; /*!< The total number of TCD slots in the queue. */
0255     uint8_t flags;           /*!< The status of the current channel. */
0256 } edma_handle_t;
0257 
0258 /*******************************************************************************
0259  * APIs
0260  ******************************************************************************/
0261 #if defined(__cplusplus)
0262 extern "C" {
0263 #endif /* __cplusplus */
0264 
0265 /*!
0266  * @name eDMA initialization and de-initialization
0267  * @{
0268  */
0269 
0270 /*!
0271  * @brief Initializes the eDMA peripheral.
0272  *
0273  * This function ungates the eDMA clock and configures the eDMA peripheral according
0274  * to the configuration structure.
0275  *
0276  * @param base eDMA peripheral base address.
0277  * @param config A pointer to the configuration structure, see "edma_config_t".
0278  * @note This function enables the minor loop map feature.
0279  */
0280 void EDMA_Init(DMA_Type *base, const edma_config_t *config);
0281 
0282 /*!
0283  * @brief Deinitializes the eDMA peripheral.
0284  *
0285  * This function gates the eDMA clock.
0286  *
0287  * @param base eDMA peripheral base address.
0288  */
0289 void EDMA_Deinit(DMA_Type *base);
0290 
0291 /*!
0292  * @brief Push content of TCD structure into hardware TCD register.
0293  *
0294  * @param base EDMA peripheral base address.
0295  * @param channel EDMA channel number.
0296  * @param tcd Point to TCD structure.
0297  */
0298 void EDMA_InstallTCD(DMA_Type *base, uint32_t channel, edma_tcd_t *tcd);
0299 
0300 /*!
0301  * @brief Gets the eDMA default configuration structure.
0302  *
0303  * This function sets the configuration structure to default values.
0304  * The default configuration is set to the following values.
0305  * @code
0306  *   config.enableContinuousLinkMode = false;
0307  *   config.enableHaltOnError = true;
0308  *   config.enableRoundRobinArbitration = false;
0309  *   config.enableDebugMode = false;
0310  * @endcode
0311  *
0312  * @param config A pointer to the eDMA configuration structure.
0313  */
0314 void EDMA_GetDefaultConfig(edma_config_t *config);
0315 
0316 /*!
0317  * @brief Enable/Disable continuous channel link mode.
0318  *
0319  * @note Do not use continuous link mode with a channel linking to itself if there is only one minor loop
0320  * iteration per service request, for example, if the channel's NBYTES value is the same as either
0321  * the source or destination size. The same data transfer profile can be achieved by simply
0322  * increasing the NBYTES value, which provides more efficient, faster processing.
0323  *
0324  * @param base EDMA peripheral base address.
0325  * @param enable true is enable, false is disable.
0326  */
0327 static inline void EDMA_EnableContinuousChannelLinkMode(DMA_Type *base, bool enable)
0328 {
0329     if (enable)
0330     {
0331         base->CR |= DMA_CR_CLM_MASK;
0332     }
0333     else
0334     {
0335         base->CR &= ~DMA_CR_CLM_MASK;
0336     }
0337 }
0338 
0339 /*!
0340  * @brief Enable/Disable minor loop mapping.
0341  *
0342  * The TCDn.word2 is redefined to include individual enable fields, an offset field, and the
0343  * NBYTES field.
0344  *
0345  * @param base EDMA peripheral base address.
0346  * @param enable true is enable, false is disable.
0347  */
0348 static inline void EDMA_EnableMinorLoopMapping(DMA_Type *base, bool enable)
0349 {
0350     if (enable)
0351     {
0352         base->CR |= DMA_CR_EMLM_MASK;
0353     }
0354     else
0355     {
0356         base->CR &= ~DMA_CR_EMLM_MASK;
0357     }
0358 }
0359 
0360 /* @} */
0361 /*!
0362  * @name eDMA Channel Operation
0363  * @{
0364  */
0365 
0366 /*!
0367  * @brief Sets all TCD registers to default values.
0368  *
0369  * This function sets TCD registers for this channel to default values.
0370  *
0371  * @param base eDMA peripheral base address.
0372  * @param channel eDMA channel number.
0373  * @note This function must not be called while the channel transfer is ongoing
0374  *       or it causes unpredictable results.
0375  * @note This function enables the auto stop request feature.
0376  */
0377 void EDMA_ResetChannel(DMA_Type *base, uint32_t channel);
0378 
0379 /*!
0380  * @brief Configures the eDMA transfer attribute.
0381  *
0382  * This function configures the transfer attribute, including source address, destination address,
0383  * transfer size, address offset, and so on. It also configures the scatter gather feature if the
0384  * user supplies the TCD address.
0385  * Example:
0386  * @code
0387  *  edma_transfer_t config;
0388  *  edma_tcd_t tcd;
0389  *  config.srcAddr = ..;
0390  *  config.destAddr = ..;
0391  *  ...
0392  *  EDMA_SetTransferConfig(DMA0, channel, &config, &stcd);
0393  * @endcode
0394  *
0395  * @param base eDMA peripheral base address.
0396  * @param channel eDMA channel number.
0397  * @param config Pointer to eDMA transfer configuration structure.
0398  * @param nextTcd Point to TCD structure. It can be NULL if users
0399  *                do not want to enable scatter/gather feature.
0400  * @note If nextTcd is not NULL, it means scatter gather feature is enabled
0401  *       and DREQ bit is cleared in the previous transfer configuration, which
0402  *       is set in the eDMA_ResetChannel.
0403  */
0404 void EDMA_SetTransferConfig(DMA_Type *base,
0405                             uint32_t channel,
0406                             const edma_transfer_config_t *config,
0407                             edma_tcd_t *nextTcd);
0408 
0409 /*!
0410  * @brief Configures the eDMA minor offset feature.
0411  *
0412  * The minor offset means that the signed-extended value is added to the source address or destination
0413  * address after each minor loop.
0414  *
0415  * @param base eDMA peripheral base address.
0416  * @param channel eDMA channel number.
0417  * @param config A pointer to the minor offset configuration structure.
0418  */
0419 void EDMA_SetMinorOffsetConfig(DMA_Type *base, uint32_t channel, const edma_minor_offset_config_t *config);
0420 
0421 /*!
0422  * @brief Configures the eDMA channel preemption feature.
0423  *
0424  * This function configures the channel preemption attribute and the priority of the channel.
0425  *
0426  * @param base eDMA peripheral base address.
0427  * @param channel eDMA channel number
0428  * @param config A pointer to the channel preemption configuration structure.
0429  */
0430 void EDMA_SetChannelPreemptionConfig(DMA_Type *base, uint32_t channel, const edma_channel_Preemption_config_t *config);
0431 
0432 /*!
0433  * @brief Sets the channel link for the eDMA transfer.
0434  *
0435  * This function configures either the minor link or the major link mode. The minor link means that the channel link is
0436  * triggered every time CITER decreases by 1. The major link means that the channel link is triggered when the CITER is
0437  * exhausted.
0438  *
0439  * @param base eDMA peripheral base address.
0440  * @param channel eDMA channel number.
0441  * @param linkType A channel link type, which can be one of the following:
0442  *   @arg kEDMA_LinkNone
0443  *   @arg kEDMA_MinorLink
0444  *   @arg kEDMA_MajorLink
0445  * @param linkedChannel The linked channel number.
0446  * @note Users should ensure that DONE flag is cleared before calling this interface, or the configuration is invalid.
0447  */
0448 void EDMA_SetChannelLink(DMA_Type *base, uint32_t channel, edma_channel_link_type_t linkType, uint32_t linkedChannel);
0449 
0450 /*!
0451  * @brief Sets the bandwidth for the eDMA transfer.
0452  *
0453  * Because the eDMA processes the minor loop, it continuously generates read/write sequences
0454  * until the minor count is exhausted. The bandwidth forces the eDMA to stall after the completion of
0455  * each read/write access to control the bus request bandwidth seen by the crossbar switch.
0456  *
0457  * @param base eDMA peripheral base address.
0458  * @param channel eDMA channel number.
0459  * @param bandWidth A bandwidth setting, which can be one of the following:
0460  *     @arg kEDMABandwidthStallNone
0461  *     @arg kEDMABandwidthStall4Cycle
0462  *     @arg kEDMABandwidthStall8Cycle
0463  */
0464 void EDMA_SetBandWidth(DMA_Type *base, uint32_t channel, edma_bandwidth_t bandWidth);
0465 
0466 /*!
0467  * @brief Sets the source modulo and the destination modulo for the eDMA transfer.
0468  *
0469  * This function defines a specific address range specified to be the value after (SADDR + SOFF)/(DADDR + DOFF)
0470  * calculation is performed or the original register value. It provides the ability to implement a circular data
0471  * queue easily.
0472  *
0473  * @param base eDMA peripheral base address.
0474  * @param channel eDMA channel number.
0475  * @param srcModulo A source modulo value.
0476  * @param destModulo A destination modulo value.
0477  */
0478 void EDMA_SetModulo(DMA_Type *base, uint32_t channel, edma_modulo_t srcModulo, edma_modulo_t destModulo);
0479 
0480 #if defined(FSL_FEATURE_EDMA_ASYNCHRO_REQUEST_CHANNEL_COUNT) && FSL_FEATURE_EDMA_ASYNCHRO_REQUEST_CHANNEL_COUNT
0481 /*!
0482  * @brief Enables an async request for the eDMA transfer.
0483  *
0484  * @param base eDMA peripheral base address.
0485  * @param channel eDMA channel number.
0486  * @param enable The command to enable (true) or disable (false).
0487  */
0488 static inline void EDMA_EnableAsyncRequest(DMA_Type *base, uint32_t channel, bool enable)
0489 {
0490     assert(channel < (uint32_t)FSL_FEATURE_DMAMUX_MODULE_CHANNEL);
0491 
0492     base->EARS &= ~((uint32_t)1U << channel);
0493     base->EARS |= ((uint32_t)(true == enable ? 1U : 0U) << channel);
0494 }
0495 #endif /* FSL_FEATURE_EDMA_ASYNCHRO_REQUEST_CHANNEL_COUNT */
0496 
0497 /*!
0498  * @brief Enables an auto stop request for the eDMA transfer.
0499  *
0500  * If enabling the auto stop request, the eDMA hardware automatically disables the hardware channel request.
0501  *
0502  * @param base eDMA peripheral base address.
0503  * @param channel eDMA channel number.
0504  * @param enable The command to enable (true) or disable (false).
0505  */
0506 static inline void EDMA_EnableAutoStopRequest(DMA_Type *base, uint32_t channel, bool enable)
0507 {
0508     assert(channel < (uint32_t)FSL_FEATURE_DMAMUX_MODULE_CHANNEL);
0509 
0510     base->TCD[channel].CSR =
0511         (uint16_t)((base->TCD[channel].CSR & (~DMA_CSR_DREQ_MASK)) | DMA_CSR_DREQ((true == enable ? 1U : 0U)));
0512 }
0513 
0514 /*!
0515  * @brief Enables the interrupt source for the eDMA transfer.
0516  *
0517  * @param base eDMA peripheral base address.
0518  * @param channel eDMA channel number.
0519  * @param mask The mask of interrupt source to be set. Users need to use
0520  *             the defined edma_interrupt_enable_t type.
0521  */
0522 void EDMA_EnableChannelInterrupts(DMA_Type *base, uint32_t channel, uint32_t mask);
0523 
0524 /*!
0525  * @brief Disables the interrupt source for the eDMA transfer.
0526  *
0527  * @param base eDMA peripheral base address.
0528  * @param channel eDMA channel number.
0529  * @param mask The mask of the interrupt source to be set. Use
0530  *             the defined edma_interrupt_enable_t type.
0531  */
0532 void EDMA_DisableChannelInterrupts(DMA_Type *base, uint32_t channel, uint32_t mask);
0533 
0534 /*!
0535  * @brief Configures the eDMA channel TCD major offset feature.
0536  *
0537  * Adjustment value added to the source address at the completion of the major iteration count
0538  *
0539  * @param base eDMA peripheral base address.
0540  * @param channel edma channel number.
0541  * @param sourceOffset source address offset will be applied to source address after major loop done.
0542  * @param destOffset destination address offset will be applied to source address after major loop done.
0543  */
0544 void EDMA_SetMajorOffsetConfig(DMA_Type *base, uint32_t channel, int32_t sourceOffset, int32_t destOffset);
0545 
0546 /* @} */
0547 /*!
0548  * @name eDMA TCD Operation
0549  * @{
0550  */
0551 
0552 /*!
0553  * @brief Sets all fields to default values for the TCD structure.
0554  *
0555  * This function sets all fields for this TCD structure to default value.
0556  *
0557  * @param tcd Pointer to the TCD structure.
0558  * @note This function enables the auto stop request feature.
0559  */
0560 void EDMA_TcdReset(edma_tcd_t *tcd);
0561 
0562 /*!
0563  * @brief Configures the eDMA TCD transfer attribute.
0564  *
0565  * The TCD is a transfer control descriptor. The content of the TCD is the same as the hardware TCD registers.
0566  * The TCD is used in the scatter-gather mode.
0567  * This function configures the TCD transfer attribute, including source address, destination address,
0568  * transfer size, address offset, and so on. It also configures the scatter gather feature if the
0569  * user supplies the next TCD address.
0570  * Example:
0571  * @code
0572  *   edma_transfer_t config = {
0573  *   ...
0574  *   }
0575  *   edma_tcd_t tcd __aligned(32);
0576  *   edma_tcd_t nextTcd __aligned(32);
0577  *   EDMA_TcdSetTransferConfig(&tcd, &config, &nextTcd);
0578  * @endcode
0579  *
0580  * @param tcd Pointer to the TCD structure.
0581  * @param config Pointer to eDMA transfer configuration structure.
0582  * @param nextTcd Pointer to the next TCD structure. It can be NULL if users
0583  *                do not want to enable scatter/gather feature.
0584  * @note TCD address should be 32 bytes aligned or it causes an eDMA error.
0585  * @note If the nextTcd is not NULL, the scatter gather feature is enabled
0586  *       and DREQ bit is cleared in the previous transfer configuration, which
0587  *       is set in the EDMA_TcdReset.
0588  */
0589 void EDMA_TcdSetTransferConfig(edma_tcd_t *tcd, const edma_transfer_config_t *config, edma_tcd_t *nextTcd);
0590 
0591 /*!
0592  * @brief Configures the eDMA TCD minor offset feature.
0593  *
0594  * A minor offset is a signed-extended value added to the source address or a destination
0595  * address after each minor loop.
0596  *
0597  * @param tcd A point to the TCD structure.
0598  * @param config A pointer to the minor offset configuration structure.
0599  */
0600 void EDMA_TcdSetMinorOffsetConfig(edma_tcd_t *tcd, const edma_minor_offset_config_t *config);
0601 
0602 /*!
0603  * @brief Sets the channel link for the eDMA TCD.
0604  *
0605  * This function configures either a minor link or a major link. The minor link means the channel link is
0606  * triggered every time CITER decreases by 1. The major link means that the channel link  is triggered when the CITER is
0607  * exhausted.
0608  *
0609  * @note Users should ensure that DONE flag is cleared before calling this interface, or the configuration is invalid.
0610  * @param tcd Point to the TCD structure.
0611  * @param linkType Channel link type, it can be one of:
0612  *   @arg kEDMA_LinkNone
0613  *   @arg kEDMA_MinorLink
0614  *   @arg kEDMA_MajorLink
0615  * @param linkedChannel The linked channel number.
0616  */
0617 void EDMA_TcdSetChannelLink(edma_tcd_t *tcd, edma_channel_link_type_t linkType, uint32_t linkedChannel);
0618 
0619 /*!
0620  * @brief Sets the bandwidth for the eDMA TCD.
0621  *
0622  * Because the eDMA processes the minor loop, it continuously generates read/write sequences
0623  * until the minor count is exhausted. The bandwidth forces the eDMA to stall after the completion of
0624  * each read/write access to control the bus request bandwidth seen by the crossbar switch.
0625  * @param tcd A pointer to the TCD structure.
0626  * @param bandWidth A bandwidth setting, which can be one of the following:
0627  *     @arg kEDMABandwidthStallNone
0628  *     @arg kEDMABandwidthStall4Cycle
0629  *     @arg kEDMABandwidthStall8Cycle
0630  */
0631 static inline void EDMA_TcdSetBandWidth(edma_tcd_t *tcd, edma_bandwidth_t bandWidth)
0632 {
0633     assert(tcd != NULL);
0634     assert(((uint32_t)tcd & 0x1FU) == 0U);
0635 
0636     tcd->CSR = (uint16_t)((tcd->CSR & (~DMA_CSR_BWC_MASK)) | DMA_CSR_BWC(bandWidth));
0637 }
0638 
0639 /*!
0640  * @brief Sets the source modulo and the destination modulo for the eDMA TCD.
0641  *
0642  * This function defines a specific address range specified to be the value after (SADDR + SOFF)/(DADDR + DOFF)
0643  * calculation is performed or the original register value. It provides the ability to implement a circular data
0644  * queue easily.
0645  *
0646  * @param tcd A pointer to the TCD structure.
0647  * @param srcModulo A source modulo value.
0648  * @param destModulo A destination modulo value.
0649  */
0650 void EDMA_TcdSetModulo(edma_tcd_t *tcd, edma_modulo_t srcModulo, edma_modulo_t destModulo);
0651 
0652 /*!
0653  * @brief Sets the auto stop request for the eDMA TCD.
0654  *
0655  * If enabling the auto stop request, the eDMA hardware automatically disables the hardware channel request.
0656  *
0657  * @param tcd A pointer to the TCD structure.
0658  * @param enable The command to enable (true) or disable (false).
0659  */
0660 static inline void EDMA_TcdEnableAutoStopRequest(edma_tcd_t *tcd, bool enable)
0661 {
0662     assert(tcd != NULL);
0663     assert(((uint32_t)tcd & 0x1FU) == 0U);
0664 
0665     tcd->CSR = (uint16_t)((tcd->CSR & (~DMA_CSR_DREQ_MASK)) | DMA_CSR_DREQ((true == enable ? 1U : 0U)));
0666 }
0667 
0668 /*!
0669  * @brief Enables the interrupt source for the eDMA TCD.
0670  *
0671  * @param tcd Point to the TCD structure.
0672  * @param mask The mask of interrupt source to be set. Users need to use
0673  *             the defined edma_interrupt_enable_t type.
0674  */
0675 void EDMA_TcdEnableInterrupts(edma_tcd_t *tcd, uint32_t mask);
0676 
0677 /*!
0678  * @brief Disables the interrupt source for the eDMA TCD.
0679  *
0680  * @param tcd Point to the TCD structure.
0681  * @param mask The mask of interrupt source to be set. Users need to use
0682  *             the defined edma_interrupt_enable_t type.
0683  */
0684 void EDMA_TcdDisableInterrupts(edma_tcd_t *tcd, uint32_t mask);
0685 
0686 /*!
0687  * @brief Configures the eDMA TCD major offset feature.
0688  *
0689  * Adjustment value added to the source address at the completion of the major iteration count
0690  *
0691  * @param tcd A point to the TCD structure.
0692  * @param sourceOffset source address offset wiil be applied to source address after major loop done.
0693  * @param destOffset destination address offset will be applied to source address after major loop done.
0694  */
0695 void EDMA_TcdSetMajorOffsetConfig(edma_tcd_t *tcd, int32_t sourceOffset, int32_t destOffset);
0696 
0697 /*! @} */
0698 /*!
0699  * @name eDMA Channel Transfer Operation
0700  * @{
0701  */
0702 
0703 /*!
0704  * @brief Enables the eDMA hardware channel request.
0705  *
0706  * This function enables the hardware channel request.
0707  *
0708  * @param base eDMA peripheral base address.
0709  * @param channel eDMA channel number.
0710  */
0711 static inline void EDMA_EnableChannelRequest(DMA_Type *base, uint32_t channel)
0712 {
0713     assert(channel < (uint32_t)FSL_FEATURE_DMAMUX_MODULE_CHANNEL);
0714 
0715     base->SERQ = DMA_SERQ_SERQ(channel);
0716 }
0717 
0718 /*!
0719  * @brief Disables the eDMA hardware channel request.
0720  *
0721  * This function disables the hardware channel request.
0722  *
0723  * @param base eDMA peripheral base address.
0724  * @param channel eDMA channel number.
0725  */
0726 static inline void EDMA_DisableChannelRequest(DMA_Type *base, uint32_t channel)
0727 {
0728     assert(channel < (uint32_t)FSL_FEATURE_DMAMUX_MODULE_CHANNEL);
0729 
0730     base->CERQ = DMA_CERQ_CERQ(channel);
0731 }
0732 
0733 /*!
0734  * @brief Starts the eDMA transfer by using the software trigger.
0735  *
0736  * This function starts a minor loop transfer.
0737  *
0738  * @param base eDMA peripheral base address.
0739  * @param channel eDMA channel number.
0740  */
0741 static inline void EDMA_TriggerChannelStart(DMA_Type *base, uint32_t channel)
0742 {
0743     assert(channel < (uint32_t)FSL_FEATURE_DMAMUX_MODULE_CHANNEL);
0744 
0745     base->SSRT = DMA_SSRT_SSRT(channel);
0746 }
0747 
0748 /*! @} */
0749 /*!
0750  * @name eDMA Channel Status Operation
0751  * @{
0752  */
0753 
0754 /*!
0755  * @brief Gets the remaining major loop count from the eDMA current channel TCD.
0756  *
0757  * This function checks the TCD (Task Control Descriptor) status for a specified
0758  * eDMA channel and returns the number of major loop count that has not finished.
0759  *
0760  * @param base eDMA peripheral base address.
0761  * @param channel eDMA channel number.
0762  * @return Major loop count which has not been transferred yet for the current TCD.
0763  * @note 1. This function can only be used to get unfinished major loop count of transfer without
0764  *          the next TCD, or it might be inaccuracy.
0765  *       2. The unfinished/remaining transfer bytes cannot be obtained directly from registers while
0766  *          the channel is running.
0767  *          Because to calculate the remaining bytes, the initial NBYTES configured in DMA_TCDn_NBYTES_MLNO
0768  *          register is needed while the eDMA IP does not support getting it while a channel is active.
0769  *          In another word, the NBYTES value reading is always the actual (decrementing) NBYTES value the dma_engine
0770  *          is working with while a channel is running.
0771  *          Consequently, to get the remaining transfer bytes, a software-saved initial value of NBYTES (for example
0772  *          copied before enabling the channel) is needed. The formula to calculate it is shown below:
0773  *          RemainingBytes = RemainingMajorLoopCount * NBYTES(initially configured)
0774  */
0775 uint32_t EDMA_GetRemainingMajorLoopCount(DMA_Type *base, uint32_t channel);
0776 
0777 /*!
0778  * @brief Gets the eDMA channel error status flags.
0779  *
0780  * @param base eDMA peripheral base address.
0781  * @return The mask of error status flags. Users need to use the
0782  *         _edma_error_status_flags type to decode the return variables.
0783  */
0784 static inline uint32_t EDMA_GetErrorStatusFlags(DMA_Type *base)
0785 {
0786     return base->ES;
0787 }
0788 
0789 /*!
0790  * @brief Gets the eDMA channel status flags.
0791  *
0792  * @param base eDMA peripheral base address.
0793  * @param channel eDMA channel number.
0794  * @return The mask of channel status flags. Users need to use the
0795  *         _edma_channel_status_flags type to decode the return variables.
0796  */
0797 uint32_t EDMA_GetChannelStatusFlags(DMA_Type *base, uint32_t channel);
0798 
0799 /*!
0800  * @brief Clears the eDMA channel status flags.
0801  *
0802  * @param base eDMA peripheral base address.
0803  * @param channel eDMA channel number.
0804  * @param mask The mask of channel status to be cleared. Users need to use
0805  *             the defined _edma_channel_status_flags type.
0806  */
0807 void EDMA_ClearChannelStatusFlags(DMA_Type *base, uint32_t channel, uint32_t mask);
0808 
0809 /*! @} */
0810 /*!
0811  * @name eDMA Transactional Operation
0812  */
0813 
0814 /*!
0815  * @brief Creates the eDMA handle.
0816  *
0817  * This function is called if using the transactional API for eDMA. This function
0818  * initializes the internal state of the eDMA handle.
0819  *
0820  * @param handle eDMA handle pointer. The eDMA handle stores callback function and
0821  *               parameters.
0822  * @param base eDMA peripheral base address.
0823  * @param channel eDMA channel number.
0824  */
0825 void EDMA_CreateHandle(edma_handle_t *handle, DMA_Type *base, uint32_t channel);
0826 
0827 /*!
0828  * @brief Installs the TCDs memory pool into the eDMA handle.
0829  *
0830  * This function is called after the EDMA_CreateHandle to use scatter/gather feature. This function shall only be used
0831  * while users need to use scatter gather mode. Scatter gather mode enables EDMA to load a new transfer control block
0832  * (tcd) in hardware, and automatically reconfigure that DMA channel for a new transfer.
0833  * Users need to prepare tcd memory and also configure tcds using interface EDMA_SubmitTransfer.
0834  *
0835  * @param handle eDMA handle pointer.
0836  * @param tcdPool A memory pool to store TCDs. It must be 32 bytes aligned.
0837  * @param tcdSize The number of TCD slots.
0838  */
0839 void EDMA_InstallTCDMemory(edma_handle_t *handle, edma_tcd_t *tcdPool, uint32_t tcdSize);
0840 
0841 /*!
0842  * @brief Installs a callback function for the eDMA transfer.
0843  *
0844  * This callback is called in the eDMA IRQ handler. Use the callback to do something after
0845  * the current major loop transfer completes. This function will be called every time one tcd finished transfer.
0846  *
0847  * @param handle eDMA handle pointer.
0848  * @param callback eDMA callback function pointer.
0849  * @param userData A parameter for the callback function.
0850  */
0851 void EDMA_SetCallback(edma_handle_t *handle, edma_callback callback, void *userData);
0852 
0853 /*!
0854  * @brief Prepares the eDMA transfer structure configurations.
0855  *
0856  * This function prepares the transfer configuration structure according to the user input.
0857  *
0858  * @param config The user configuration structure of type edma_transfer_t.
0859  * @param srcAddr eDMA transfer source address.
0860  * @param srcWidth eDMA transfer source address width(bytes).
0861  * @param srcOffset source address offset.
0862  * @param destAddr eDMA transfer destination address.
0863  * @param destWidth eDMA transfer destination address width(bytes).
0864  * @param destOffset destination address offset.
0865  * @param bytesEachRequest eDMA transfer bytes per channel request.
0866  * @param transferBytes eDMA transfer bytes to be transferred.
0867  * @note The data address and the data width must be consistent. For example, if the SRC
0868  *       is 4 bytes, the source address must be 4 bytes aligned, or it results in
0869  *       source address error (SAE).
0870  */
0871 void EDMA_PrepareTransferConfig(edma_transfer_config_t *config,
0872                                 void *srcAddr,
0873                                 uint32_t srcWidth,
0874                                 int16_t srcOffset,
0875                                 void *destAddr,
0876                                 uint32_t destWidth,
0877                                 int16_t destOffset,
0878                                 uint32_t bytesEachRequest,
0879                                 uint32_t transferBytes);
0880 
0881 /*!
0882  * @brief Prepares the eDMA transfer structure.
0883  *
0884  * This function prepares the transfer configuration structure according to the user input.
0885  *
0886  * @param config The user configuration structure of type edma_transfer_t.
0887  * @param srcAddr eDMA transfer source address.
0888  * @param srcWidth eDMA transfer source address width(bytes).
0889  * @param destAddr eDMA transfer destination address.
0890  * @param destWidth eDMA transfer destination address width(bytes).
0891  * @param bytesEachRequest eDMA transfer bytes per channel request.
0892  * @param transferBytes eDMA transfer bytes to be transferred.
0893  * @param transferType eDMA transfer type.
0894  * @note The data address and the data width must be consistent. For example, if the SRC
0895  *       is 4 bytes, the source address must be 4 bytes aligned, or it results in
0896  *       source address error (SAE).
0897  */
0898 void EDMA_PrepareTransfer(edma_transfer_config_t *config,
0899                           void *srcAddr,
0900                           uint32_t srcWidth,
0901                           void *destAddr,
0902                           uint32_t destWidth,
0903                           uint32_t bytesEachRequest,
0904                           uint32_t transferBytes,
0905                           edma_transfer_type_t transferType);
0906 
0907 /*!
0908  * @brief Submits the eDMA transfer request.
0909  *
0910  * This function submits the eDMA transfer request according to the transfer configuration structure.
0911  * In scatter gather mode, call this function will add a configured tcd to the circular list of tcd pool.
0912  * The tcd pools is setup by call function EDMA_InstallTCDMemory before.
0913  *
0914  * @param handle eDMA handle pointer.
0915  * @param config Pointer to eDMA transfer configuration structure.
0916  * @retval kStatus_EDMA_Success It means submit transfer request succeed.
0917  * @retval kStatus_EDMA_QueueFull It means TCD queue is full. Submit transfer request is not allowed.
0918  * @retval kStatus_EDMA_Busy It means the given channel is busy, need to submit request later.
0919  */
0920 status_t EDMA_SubmitTransfer(edma_handle_t *handle, const edma_transfer_config_t *config);
0921 
0922 /*!
0923  * @brief eDMA starts transfer.
0924  *
0925  * This function enables the channel request. Users can call this function after submitting the transfer request
0926  * or before submitting the transfer request.
0927  *
0928  * @param handle eDMA handle pointer.
0929  */
0930 void EDMA_StartTransfer(edma_handle_t *handle);
0931 
0932 /*!
0933  * @brief eDMA stops transfer.
0934  *
0935  * This function disables the channel request to pause the transfer. Users can call EDMA_StartTransfer()
0936  * again to resume the transfer.
0937  *
0938  * @param handle eDMA handle pointer.
0939  */
0940 void EDMA_StopTransfer(edma_handle_t *handle);
0941 
0942 /*!
0943  * @brief eDMA aborts transfer.
0944  *
0945  * This function disables the channel request and clear transfer status bits.
0946  * Users can submit another transfer after calling this API.
0947  *
0948  * @param handle DMA handle pointer.
0949  */
0950 void EDMA_AbortTransfer(edma_handle_t *handle);
0951 
0952 /*!
0953  * @brief Get unused TCD slot number.
0954  *
0955  * This function gets current tcd index which is run. If the TCD pool pointer is NULL, it will return 0.
0956  *
0957  * @param handle DMA handle pointer.
0958  * @return The unused tcd slot number.
0959  */
0960 static inline uint32_t EDMA_GetUnusedTCDNumber(edma_handle_t *handle)
0961 {
0962     int8_t tmpTcdSize = handle->tcdSize;
0963     int8_t tmpTcdUsed = handle->tcdUsed;
0964     return ((uint32_t)tmpTcdSize - (uint32_t)tmpTcdUsed);
0965 }
0966 
0967 /*!
0968  * @brief Get the next tcd address.
0969  *
0970  * This function gets the next tcd address. If this is last TCD, return 0.
0971  *
0972  * @param handle DMA handle pointer.
0973  * @return The next TCD address.
0974  */
0975 static inline uint32_t EDMA_GetNextTCDAddress(edma_handle_t *handle)
0976 {
0977     return (uint32_t)(handle->base->TCD[handle->channel].DLAST_SGA);
0978 }
0979 
0980 /*!
0981  * @brief eDMA IRQ handler for the current major loop transfer completion.
0982  *
0983  * This function clears the channel major interrupt flag and calls
0984  * the callback function if it is not NULL.
0985  *
0986  * Note:
0987  * For the case using TCD queue, when the major iteration count is exhausted, additional operations are performed.
0988  * These include the final address adjustments and reloading of the BITER field into the CITER.
0989  * Assertion of an optional interrupt request also occurs at this time, as does a possible fetch of a new TCD from
0990  * memory using the scatter/gather address pointer included in the descriptor (if scatter/gather is enabled).
0991  *
0992  * For instance, when the time interrupt of TCD[0] happens, the TCD[1] has already been loaded into the eDMA engine.
0993  * As sga and sga_index are calculated based on the DLAST_SGA bitfield lies in the TCD_CSR register, the sga_index
0994  * in this case should be 2 (DLAST_SGA of TCD[1] stores the address of TCD[2]). Thus, the "tcdUsed" updated should be
0995  * (tcdUsed - 2U) which indicates the number of TCDs can be loaded in the memory pool (because TCD[0] and TCD[1] have
0996  * been loaded into the eDMA engine at this point already.).
0997  *
0998  * For the last two continuous ISRs in a scatter/gather process, they  both load the last TCD (The last ISR does not
0999  * load a new TCD) from the memory pool to the eDMA engine when major loop completes.
1000  * Therefore, ensure that the header and tcdUsed updated are identical for them.
1001  * tcdUsed are both 0 in this case as no TCD to be loaded.
1002  *
1003  * See the "eDMA basic data flow" in the eDMA Functional description section of the Reference Manual for
1004  * further details.
1005  *
1006  * @param handle eDMA handle pointer.
1007  */
1008 void EDMA_HandleIRQ(edma_handle_t *handle);
1009 
1010 /* @} */
1011 
1012 #if defined(__cplusplus)
1013 }
1014 #endif /* __cplusplus */
1015 
1016 /* @} */
1017 
1018 #endif /*_FSL_EDMA_H_*/