#include "stepmotor.h"#includeu32 PUL_CNT; // TIM3脉冲计数vu32 step_done;vu32 run_state;#define run_state_stop 0#define run_state_acc 1#define run_state_run 2#define run_state_dec 3void STEPMOTOR_CTRL_INIT(void){ GPIO_InitTypeDef GPIO_InitStructure; NVIC_InitTypeDef NVIC_InitStructure; TIM_TimeBaseInitTypeDef TIM_TimeBaseStructure; TIM_OCInitTypeDef TIM_OCInitStructure;
温馨提示:内容为网友见解,仅供参考