From 9051da0184cf839037f1370c729b27bf065b9c95 Mon Sep 17 00:00:00 2001 From: tao_z <tzj0429@163.com> Date: Sat, 10 Jul 2021 22:06:34 +0800 Subject: [PATCH] 马达可以转动 --- USR/SRC/main.c | 14 ++++++++++++++ 1 files changed, 14 insertions(+), 0 deletions(-) diff --git a/USR/SRC/main.c b/USR/SRC/main.c index a70f892..6f7f6aa 100644 --- a/USR/SRC/main.c +++ b/USR/SRC/main.c @@ -10,9 +10,23 @@ #include "bsp_pid.h" #include "os_task.h" #include "RttTask.h" +#include "SEGGER_RTT_Conf.h" +#include "SEGGER_RTT.h" static void Comm_Task(void *p) { + // static uint16_t test_cnt = 0; + // ++test_cnt; + // if (test_cnt == 15) + // { + // timer_channel_output_mode_config(TIMER0, MOTOR_OUT_CH_W, TIMER_OC_MODE_PWM0); + // timer_channel_output_state_config(TIMER0, MOTOR_OUT_CH_W, TIMER_CCX_ENABLE); + // } + // else if (test_cnt > 30) + // { + // test_cnt = 0; + // timer_channel_output_state_config(TIMER0, MOTOR_OUT_CH_W, TIMER_CCX_DISABLE); + // } } int main() -- Gitblit v1.8.0