12#include "fsl_common.h"
26#define FSL_DMAMUX_DRIVER_VERSION (MAKE_VERSION(2, 0, 5))
33#if defined(__cplusplus)
75static inline void DMAMUX_EnableChannel(
DMAMUX_Type *base, uint32_t channel)
77 assert(channel < (uint32_t)FSL_FEATURE_DMAMUX_MODULE_CHANNEL);
79 base->CHCFG[channel] |= DMAMUX_CHCFG_ENBL_MASK;
91static inline void DMAMUX_DisableChannel(
DMAMUX_Type *base, uint32_t channel)
93 assert(channel < (uint32_t)FSL_FEATURE_DMAMUX_MODULE_CHANNEL);
95#if defined FSL_FEATURE_DMAMUX_CHCFG_REGISTER_WIDTH && (FSL_FEATURE_DMAMUX_CHCFG_REGISTER_WIDTH == 32U)
96 base->CHCFG[channel] &= ~DMAMUX_CHCFG_ENBL_MASK;
98 base->CHCFG[channel] &= ~(uint8_t)DMAMUX_CHCFG_ENBL_MASK;
109static inline void DMAMUX_SetSource(
DMAMUX_Type *base, uint32_t channel, uint32_t source)
111 assert(channel < (uint32_t)FSL_FEATURE_DMAMUX_MODULE_CHANNEL);
113#if defined FSL_FEATURE_DMAMUX_CHCFG_REGISTER_WIDTH && (FSL_FEATURE_DMAMUX_CHCFG_REGISTER_WIDTH == 32U)
114 base->CHCFG[channel] = ((base->CHCFG[channel] & ~DMAMUX_CHCFG_SOURCE_MASK) |
DMAMUX_CHCFG_SOURCE(source));
116 base->CHCFG[channel] = (uint8_t)((base->CHCFG[channel] & ~DMAMUX_CHCFG_SOURCE_MASK) |
DMAMUX_CHCFG_SOURCE(source));
120#if defined(FSL_FEATURE_DMAMUX_HAS_TRIG) && FSL_FEATURE_DMAMUX_HAS_TRIG > 0U
129static inline void DMAMUX_EnablePeriodTrigger(
DMAMUX_Type *base, uint32_t channel)
131 assert(channel < (uint32_t)FSL_FEATURE_DMAMUX_MODULE_CHANNEL);
133 base->CHCFG[channel] |= DMAMUX_CHCFG_TRIG_MASK;
144static inline void DMAMUX_DisablePeriodTrigger(
DMAMUX_Type *base, uint32_t channel)
146 assert(channel < (uint32_t)FSL_FEATURE_DMAMUX_MODULE_CHANNEL);
148#if defined FSL_FEATURE_DMAMUX_CHCFG_REGISTER_WIDTH && (FSL_FEATURE_DMAMUX_CHCFG_REGISTER_WIDTH == 32U)
149 base->CHCFG[channel] &= ~DMAMUX_CHCFG_TRIG_MASK;
151 base->CHCFG[channel] &= ~(uint8_t)DMAMUX_CHCFG_TRIG_MASK;
156#if (defined(FSL_FEATURE_DMAMUX_HAS_A_ON) && FSL_FEATURE_DMAMUX_HAS_A_ON)
166static inline void DMAMUX_EnableAlwaysOn(
DMAMUX_Type *base, uint32_t channel,
bool enable)
168 assert(channel < (uint32_t)FSL_FEATURE_DMAMUX_MODULE_CHANNEL);
172 base->CHCFG[channel] |= DMAMUX_CHCFG_A_ON_MASK;
176 base->CHCFG[channel] &= ~DMAMUX_CHCFG_A_ON_MASK;
183#if defined(__cplusplus)
#define DMAMUX_CHCFG_SOURCE(x)
Definition: MIMXRT1052.h:17884
void DMAMUX_Init(DMAMUX_Type *base)
Initializes the DMAMUX peripheral.
Definition: fsl_dmamux.c:72
void DMAMUX_Deinit(DMAMUX_Type *base)
Deinitializes the DMAMUX peripheral.
Definition: fsl_dmamux.c:86
Definition: MIMXRT1052.h:17864