From b34d5dbff89fd992af8196c747e18a8933d0c729 Mon Sep 17 00:00:00 2001 From: tao_z <tzj0429@163.com> Date: Sun, 27 Jun 2021 19:50:59 +0800 Subject: [PATCH] 编译通过,能够在线调试 --- USR/SRC/Motor.c | 9 +++++++++ 1 files changed, 9 insertions(+), 0 deletions(-) diff --git a/USR/SRC/Motor.c b/USR/SRC/Motor.c index 416681b..4bb7783 100644 --- a/USR/SRC/Motor.c +++ b/USR/SRC/Motor.c @@ -4,10 +4,19 @@ #include "gd32e23x_timer.h" #include "bldc_ctrl.h" #include "pwm.h" +#include "string.h" static volatile motor_rotate_t motor_drive = {0}; static uint32_t motor_pluse = 0; static void motor_phasechange(void); static void update_speed_dir(uint8_t dir_in); + +extern void Motor_Init(void) +{ + motor_drive.timeout = 0; + motor_drive.speed = 0; + motor_drive.enable_flag = 0; + memset(motor_drive.speed_group, 0, SPEED_FILTER_NUM); +}; /** * @brief ʹ�ܻ��������� * @param �� -- Gitblit v1.8.0