
#define BSP_TIMER_RCU RCU_TIMER5
#define BSP_TIMER TIMER5
#define BSP_TIMER_IRQ TIMER5_IRQn
int main() {
rcu_periph_clock_enable(BSP_TIMER_RCU); // 开启定时器时钟
timer_deinit(BSP_TIMER); // 复位定时器
timer_prescaler_config(BSP_TIMER, 1, TIMER_PSC_RELOAD_NOW);
timer_parameter_struct timer_init_config;
}正交编码器在GD32手册中,叫做正交译码器
编码器只能使用通道 0 和通道 1