87 #define CCR_CLEAR_MASK ((uint32_t)0xFFFF800F) 88 #define FLAG_Mask ((uint32_t)0x10000000) 92 #define DMA1_CHANNEL1_IT_MASK ((uint32_t)(DMA_ISR_GIF1 | DMA_ISR_TCIF1 | DMA_ISR_HTIF1 | DMA_ISR_TEIF1)) 93 #define DMA1_CHANNEL2_IT_MASK ((uint32_t)(DMA_ISR_GIF2 | DMA_ISR_TCIF2 | DMA_ISR_HTIF2 | DMA_ISR_TEIF2)) 94 #define DMA1_CHANNEL3_IT_MASK ((uint32_t)(DMA_ISR_GIF3 | DMA_ISR_TCIF3 | DMA_ISR_HTIF3 | DMA_ISR_TEIF3)) 95 #define DMA1_CHANNEL4_IT_MASK ((uint32_t)(DMA_ISR_GIF4 | DMA_ISR_TCIF4 | DMA_ISR_HTIF4 | DMA_ISR_TEIF4)) 96 #define DMA1_CHANNEL5_IT_MASK ((uint32_t)(DMA_ISR_GIF5 | DMA_ISR_TCIF5 | DMA_ISR_HTIF5 | DMA_ISR_TEIF5)) 97 #define DMA1_CHANNEL6_IT_MASK ((uint32_t)(DMA_ISR_GIF6 | DMA_ISR_TCIF6 | DMA_ISR_HTIF6 | DMA_ISR_TEIF6)) 98 #define DMA1_CHANNEL7_IT_MASK ((uint32_t)(DMA_ISR_GIF7 | DMA_ISR_TCIF7 | DMA_ISR_HTIF7 | DMA_ISR_TEIF7)) 101 #define DMA2_CHANNEL1_IT_MASK ((uint32_t)(DMA_ISR_GIF1 | DMA_ISR_TCIF1 | DMA_ISR_HTIF1 | DMA_ISR_TEIF1)) 102 #define DMA2_CHANNEL2_IT_MASK ((uint32_t)(DMA_ISR_GIF2 | DMA_ISR_TCIF2 | DMA_ISR_HTIF2 | DMA_ISR_TEIF2)) 103 #define DMA2_CHANNEL3_IT_MASK ((uint32_t)(DMA_ISR_GIF3 | DMA_ISR_TCIF3 | DMA_ISR_HTIF3 | DMA_ISR_TEIF3)) 104 #define DMA2_CHANNEL4_IT_MASK ((uint32_t)(DMA_ISR_GIF4 | DMA_ISR_TCIF4 | DMA_ISR_HTIF4 | DMA_ISR_TEIF4)) 105 #define DMA2_CHANNEL5_IT_MASK ((uint32_t)(DMA_ISR_GIF5 | DMA_ISR_TCIF5 | DMA_ISR_HTIF5 | DMA_ISR_TEIF5)) 147 DMAy_Channelx->
CCR &= (uint16_t)(~DMA_CCR_EN);
150 DMAy_Channelx->
CCR = 0;
153 DMAy_Channelx->
CNDTR = 0;
156 DMAy_Channelx->
CPAR = 0;
159 DMAy_Channelx->
CMAR = 0;
252 tmpreg = DMAy_Channelx->
CCR;
272 DMAy_Channelx->
CCR = tmpreg;
337 DMAy_Channelx->
CCR |= DMA_CCR_EN;
342 DMAy_Channelx->
CCR &= (uint16_t)(~DMA_CCR_EN);
394 DMAy_Channelx->
CNDTR = DataNumber;
410 return ((uint16_t)(DMAy_Channelx->
CNDTR));
491 DMAy_Channelx->
CCR |= DMA_IT;
496 DMAy_Channelx->
CCR &= ~DMA_IT;
582 if ((tmpreg & DMAy_FLAG) != (uint32_t)RESET)
666 DMA2->IFCR = DMAy_FLAG;
671 DMA1->IFCR = DMAy_FLAG;
757 if ((tmpreg & DMAy_IT) != (uint32_t)RESET)
841 DMA2->IFCR = DMAy_IT;
846 DMA1->IFCR = DMAy_IT;
void DMA_SetCurrDataCounter(DMA_Channel_TypeDef *DMAy_Channelx, uint16_t DataNumber)
Sets the number of data units in the current DMAy Channelx transfer.
DMA Init structure definition.
#define DMA_MemoryDataSize_Byte
#define IS_DMA_PERIPHERAL_DATA_SIZE(SIZE)
#define DMA_PeripheralInc_Disable
void DMA_Cmd(DMA_Channel_TypeDef *DMAy_Channelx, FunctionalState NewState)
Enables or disables the specified DMAy Channelx.
uint32_t DMA_MemoryDataSize
#define IS_DMA_PERIPHERAL_INC_STATE(STATE)
void assert_param(int val)
#define IS_DMA_MEMORY_INC_STATE(STATE)
void DMA_ClearITPendingBit(uint32_t DMAy_IT)
Clears the DMAy Channelx's interrupt pending bits.
uint32_t DMA_PeripheralInc
#define IS_FUNCTIONAL_STATE(STATE)
uint32_t DMA_PeripheralDataSize
#define DMA2_CHANNEL5_IT_MASK
uint32_t DMA_MemoryBaseAddr
#define DMA2_CHANNEL3_IT_MASK
#define DMA2_CHANNEL1_IT_MASK
#define IS_DMA_GET_IT(IT)
#define IS_DMA_MEMORY_DATA_SIZE(SIZE)
void DMA_StructInit(DMA_InitTypeDef *DMA_InitStruct)
Fills each DMA_InitStruct member with its default value.
uint32_t DMA_PeripheralBaseAddr
#define DMA1_CHANNEL1_IT_MASK
#define DMA_DIR_PeripheralSRC
#define DMA1_CHANNEL5_IT_MASK
#define DMA1_CHANNEL3_IT_MASK
#define DMA2_CHANNEL4_IT_MASK
#define DMA1_CHANNEL2_IT_MASK
#define IS_DMA_M2M_STATE(STATE)
#define DMA2_CHANNEL2_IT_MASK
#define IS_DMA_MODE(MODE)
#define IS_DMA_ALL_PERIPH(PERIPH)
#define DMA_PeripheralDataSize_Byte
void DMA_Init(DMA_Channel_TypeDef *DMAy_Channelx, DMA_InitTypeDef *DMA_InitStruct)
Initializes the DMAy Channelx according to the specified parameters in the DMA_InitStruct.
#define IS_DMA_CLEAR_FLAG(FLAG)
#define IS_DMA_CONFIG_IT(IT)
#define DMA_MemoryInc_Disable
#define IS_DMA_CLEAR_IT(IT)
void DMA_ClearFlag(uint32_t DMAy_FLAG)
Clears the DMAy Channelx's pending flags.
#define DMA1_CHANNEL4_IT_MASK
FlagStatus DMA_GetFlagStatus(uint32_t DMAy_FLAG)
Checks whether the specified DMAy Channelx flag is set or not.
void DMA_DeInit(DMA_Channel_TypeDef *DMAy_Channelx)
Deinitializes the DMAy Channelx registers to their default reset values.
#define IS_DMA_PRIORITY(PRIORITY)
#define DMA1_CHANNEL6_IT_MASK
ITStatus DMA_GetITStatus(uint32_t DMAy_IT)
Checks whether the specified DMAy Channelx interrupt has occurred or not.
#define IS_DMA_GET_FLAG(FLAG)
#define DMA1_CHANNEL7_IT_MASK
void DMA_ITConfig(DMA_Channel_TypeDef *DMAy_Channelx, uint32_t DMA_IT, FunctionalState NewState)
Enables or disables the specified DMAy Channelx interrupts.
This file contains all the functions prototypes for the DMA firmware library.
uint16_t DMA_GetCurrDataCounter(DMA_Channel_TypeDef *DMAy_Channelx)
Returns the number of remaining data units in the current DMAy Channelx transfer. ...