From bc6c916bff0b8d342c1cd62da73a2a09f18d22a8 Mon Sep 17 00:00:00 2001 From: tao_z <tzj0429@163.com> Date: Thu, 24 Jun 2021 22:22:49 +0800 Subject: [PATCH] 基本模块编译通过 --- USR/SRC/gd32e23x_it.c | 32 ++++++++++++++++++++++++++++++++ 1 files changed, 32 insertions(+), 0 deletions(-) diff --git a/USR/SRC/gd32e23x_it.c b/USR/SRC/gd32e23x_it.c index 197b2d2..3d538c2 100644 --- a/USR/SRC/gd32e23x_it.c +++ b/USR/SRC/gd32e23x_it.c @@ -35,6 +35,7 @@ */ #include "gd32e23x_it.h" +#include "motor.h" /*! \brief this function handles NMI exception @@ -142,3 +143,34 @@ { delay_decrement(); } +/*! + \brief this function handles EXTI4-15 exception + \param[in] none + \param[out] none + \retval none +*/ +void EXTI4_15_IRQHandler(void) +{ + + if (RESET != exti_interrupt_flag_get(EXTI_4 | EXTI_5 | EXTI_15)) + { + HAL_HallExti_TriggerCallback(); + } + + exti_interrupt_flag_clear(EXTI_4 | EXTI_5 | EXTI_15); +} + +/*! + \brief this function handles time2 + \param[in] none + \param[out] none + \retval none +*/ +void TIMER2_IRQHandler(void) +{ + if (SET == timer_interrupt_flag_get(TIMER2, TIMER_INT_FLAG_UP)) //time2 count up overflow + { + BLDC_SpeedAndPID(); + timer_interrupt_flag_clear(TIMER2, TIMER_INT_FLAG_UP); + } +} -- Gitblit v1.8.0