TIM_SetCompare1(TIM4,200); //占空比20% TIM_SetCompare2(TIM4,300); //占空比30% TIM_Se...
TIM_OC4Init(TIM4, &TIM_OCInitStructure); //根据T指定的参数初始化外设TIM3 OC2 TIM_OC4PreloadConfig(TIM4, TIM_OCPreload_Enable); //使能TIM3在CCR2上的预装载寄存器 TIM_Cmd(TIM4, ENABLE); //使能TIM4 } 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. 13. 14. 15. 16. 17. 18...
while(1){ TIM_SetCompare1(TIM4,400); //TIM4->CCR1=400 TIM_SetCompare2(TIM4,800); ...
TIM_SetCompare4(TIM1,pwd_value);} 原来的代码加了这些东西,结果PWM没了,望高手能指点一二,谢谢 ...
TIM_SetCompare2(TIM_SWITCH, sw_hold_time[SWstatus]); DispBlink(); } } 开发者ID:gowgos5,项目名称:myproj,代码行数:40,代码来源:libSwitch.c 示例5: toPhone_modulate ▲点赞 1▼ voidtoPhone_modulate(uint8_tb){volatileinttcnt,cnt;if(b){ ...