Initialize the DMA according to the specified parameters in the DMA_InitTypeDef and initialize the associated handle.
176 if ((uint32_t)(hdma->
Instance) < (uint32_t)(DMA2_Channel1))
179 hdma->
ChannelIndex = (((uint32_t)hdma->
Instance - (uint32_t)DMA1_Channel1) / ((uint32_t)DMA1_Channel2 - (uint32_t)DMA1_Channel1)) << 2U;
185 hdma->
ChannelIndex = (((uint32_t)hdma->
Instance - (uint32_t)DMA2_Channel1) / ((uint32_t)DMA2_Channel2 - (uint32_t)DMA2_Channel1)) << 2U;
196 tmp &= ((uint32_t)~(DMA_CCR_PL | DMA_CCR_MSIZE | DMA_CCR_PSIZE |
197 DMA_CCR_MINC | DMA_CCR_PINC | DMA_CCR_CIRC |
198 DMA_CCR_DIR | DMA_CCR_MEM2MEM));
201 tmp |= hdma->
Init.Direction |
202 hdma->
Init.PeriphInc | hdma->
Init.MemInc |
203 hdma->
Init.PeriphDataAlignment | hdma->
Init.MemDataAlignment |
204 hdma->
Init.Mode | hdma->
Init.Priority;
215 if(hdma->
Init.Direction == DMA_MEMORY_TO_MEMORY)
218 hdma->
Init.Request = DMA_REQUEST_MEM2MEM;
227 if(((hdma->
Init.Request > 0U) && (hdma->
Init.Request <= DMA_REQUEST_GENERATOR3)))
248 #if !defined (DMAMUX1) 251 if(hdma->
Init.Direction != DMA_MEMORY_TO_MEMORY)
257 DMA1_CSELR->CSELR &= ~(DMA_CSELR_C1S << (hdma->
ChannelIndex & 0x1cU));
260 DMA1_CSELR->CSELR |= (uint32_t) (hdma->
Init.Request << (hdma->
ChannelIndex & 0x1cU));
265 DMA2_CSELR->CSELR &= ~(DMA_CSELR_C1S << (hdma->
ChannelIndex & 0x1cU));
268 DMA2_CSELR->CSELR |= (uint32_t) (hdma->
Init.Request << (hdma->
ChannelIndex & 0x1cU));
uint32_t DMAmuxChannelStatusMask
DMAMUX_RequestGenStatus_TypeDef * DMAmuxRequestGenStatus
DMAMUX_RequestGen_TypeDef * DMAmuxRequestGen
DMA_Channel_TypeDef * Instance
DMA_TypeDef * DmaBaseAddress
__IO HAL_DMA_StateTypeDef State
DMAMUX_Channel_TypeDef * DMAmuxChannel
uint32_t DMAmuxRequestGenStatusMask
DMAMUX_ChannelStatus_TypeDef * DMAmuxChannelStatus
static void DMA_CalcDMAMUXRequestGenBaseAndMask(DMA_HandleTypeDef *hdma)
Updates the DMA handle with the DMAMUX request generator params.
static void DMA_CalcDMAMUXChannelBaseAndMask(DMA_HandleTypeDef *hdma)
Updates the DMA handle with the DMAMUX channel and status mask depending on channel number...
assert_param(IS_RTC_WAKEUP_CLOCK(WakeUpClock))