定时器中断-GD32 include "gd32f10x.h" #include "systick.h" #include "LED.h" volatile static uint32_t delay_reload; volatile static uint32_t delay_value; /*! \brief configure systick \param[in] none \param[out] none \retval none */ void systick_config(void) { /* setup systick timer for 1000Hz interrupts */ if (SysTick_Config(SystemCoreClock / 1000U)){ /* capture error */ while (1){ } } /* configure the systick handler priority */ NVIC_SetPriority(SysTick_IRQn, 0x00U); } /*! \brief delay a time in milliseconds \param[in] count: count in milliseconds \param[out] none \retval none */ void inter_1ms(uint32_t count) { delay_reload = count; delay_value = delay_reload; } /*! \brief delay decrement \param[in] n