timer int LED

This commit is contained in:
wanghao
2024-08-09 16:34:11 +08:00
parent 673db2d79f
commit 27a1f5624e
6 changed files with 90 additions and 9 deletions

View File

@@ -35,6 +35,7 @@ OF SUCH DAMAGE.
#include "gd32e23x_it.h"
#include "main.h"
#include "systick.h"
#include "chirp_bsp.h"
/*!
\brief this function handles NMI exception
@@ -104,4 +105,18 @@ void EXTI4_15_IRQHandler(void){
exti_interrupt_flag_clear(EXTI_7);
}
}
/**
* @brief This function handles TIMER2 interrupt request.
* @param None
* @retval None
*/
void TIMER2_IRQHandler(void)
{
if (SET == timer_interrupt_flag_get(TIMER2, TIMER_INT_FLAG_CH0))
{
chbsp_led_toggle(0);
timer_interrupt_flag_clear(TIMER2, TIMER_INT_FLAG_CH0);
}
}