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/main.c | 21 +++++++++++++++++++++ 1 files changed, 21 insertions(+), 0 deletions(-) diff --git a/USR/SRC/main.c b/USR/SRC/main.c index 7730d79..a70f892 100644 --- a/USR/SRC/main.c +++ b/USR/SRC/main.c @@ -5,16 +5,37 @@ #include "pwm.h" #include "uart.h" #include "clock.h" +#include "motor.h" +#include "bldc_ctrl.h" +#include "bsp_pid.h" +#include "os_task.h" +#include "RttTask.h" + +static void Comm_Task(void *p) +{ +} int main() { + + OS_TASK_MSG task_queue[8] = {0}; + InitOSTaskQueue(task_queue, 8); + Clock_Config(); GPIO_Init(); TimerInit(); UartInit(); ADC_Init(); + Motor_Init(); + bldcm_init(); + PID_param_init(); + RTT_TaskInit(); Ostick_config(); + + OSTaskCreate(&Comm_Task, 10, 7, NULL); + OSTaskCreate(&RTT_Task10ms, 1000, 7, NULL); + OSSchedule(&OS_GetTick); while (1) ; return 0; -- Gitblit v1.8.0