//–TIMER0_CH0 IO口配置
static void pwm_freq_gpio_config(void)
{
rcu_periph_clock_enable(PWM_FREQ_RCC);
gpio_mode_set(PWM_FREQ_PORT, GPIO_MODE_AF, GPIO_PUPD_NONE, PWM_FREQ_PIN);
gpio_output_options_set(PWM_FREQ_PORT, GPIO_OTYPE_PP, GPIO_OSPEED_50MHZ,PWM_FREQ_PIN);
gpio_af_set(PWM_FREQ_PORT, GPIO_AF_2, PWM_FREQ_PIN);
}
//–TIMER0_CH0 IO口配置
static void pwm_freq_config(void)
{
timer_oc_parameter_struct timer_ocintpara;
timer_parameter_struct timer_initpara;
rcu_periph_clock_enable(RCU_TIMER0); //++PWM输出:单脉冲模式
//======================================================================&#