{// PWM1 Mode configuration: Channel1TIM_OC1Init(PIN_MAP[pin].timer_peripheral, &TIM_OCInitStructure); TIM_OC1PreloadConfig(PIN_MAP[pin].timer_peripheral, TIM_OCPreload_Enable); }elseif(PIN_MAP[pin].timer_ch == TIM_Channel_2) {// PWM1 Mode configuration: Channel2TIM_OC2Init(PIN_MAP...
TIM_OCMode = TIM_OCMode_PWM1; TIM_OCInitStructure.TIM_OutputState = TIM_OutputState_Enable; TIM_OCInitStructure.TIM_OCPolarity = TIM_OCPolarity_High; TIM_OCInitStructure.TIM_Pulse = TIM_CCR; if(PIN_MAP[pin].timer_ch == TIM_Channel_1) { // PWM1 Mode configuration: Channel1 TIM_OC1Init(...
void DMA1_Channel2_3_IRQHandler(void) { DMA_ClearITPendingBit(DMA1_IT_TC2); TIM_ITConfig(TIM3, TIM_IT_Update, ENABLE); DMA_Cmd(DMA1_Channel2, DISABLE); DMA_Cmd(DMA1_Channel3, DISABLE); DMA_Cmd(DMA1_Channel4, DISABLE); TIM_DMACmd(TIM3, TIM_DMA_CC1, DISABLE); TIM_DMACmd(TIM3...