From 4a89e24804b91902def506a9e898293fa36ccb59 Mon Sep 17 00:00:00 2001
From: tao_z <tzj0429@163.com>
Date: Sat, 10 Jul 2021 11:52:25 +0800
Subject: [PATCH] 待调试电机转动

---
 USR/INC/pwm.h |   10 ++++++++--
 1 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/USR/INC/pwm.h b/USR/INC/pwm.h
index f4d2e75..da32571 100644
--- a/USR/INC/pwm.h
+++ b/USR/INC/pwm.h
@@ -1,8 +1,8 @@
 #ifndef _PWM_H_
 #define _PWM_H_
 #include "gd32e23x_timer.h"
-//1us * 10000 = 10ms
-#define PERIOD_CAP (10000lU)
+//100us * 30000 = 3s
+#define PERIOD_CAP (30000U)
 
 //48Mzhz / 3000 = 16Khz = 62.5us
 #define PERIOD_CMP (3000u)
@@ -10,4 +10,10 @@
 void TimerInit(void);
 void SetPwmDuty(uint16_t ch, uint32_t duty);
 void SetPwmPeriod(uint32_t period);
+
+extern void StartSpeedTime(void);
+extern void StopSpeedTime(void);
+extern void stop_pwm_output(void);
+extern void TIMER2_IRQHandler_CallBack(void);
+extern uint32_t GetSpeedTimerOutcnt(void);
 #endif

--
Gitblit v1.8.0