generated from hulk/gd32e23x_template_cmake_vscode
release dev branch
This commit is contained in:
@@ -34,6 +34,9 @@ OF SUCH DAMAGE.
|
||||
|
||||
#include "gd32e23x_it.h"
|
||||
#include "systick.h"
|
||||
#include "uart.h"
|
||||
#include "uart_ring_buffer.h"
|
||||
#include "led.h"
|
||||
|
||||
/*!
|
||||
\brief this function handles NMI exception
|
||||
@@ -93,7 +96,14 @@ void PendSV_Handler(void)
|
||||
\param[out] none
|
||||
\retval none
|
||||
*/
|
||||
void SysTick_Handler(void)
|
||||
{
|
||||
void SysTick_Handler(void) {
|
||||
led_heart_beat(); // LED心跳指示灯
|
||||
delay_decrement();
|
||||
}
|
||||
|
||||
void USART0_IRQHandler(void) {
|
||||
if (RESET != usart_interrupt_flag_get(USART0, USART_INT_FLAG_RBNE)) {
|
||||
uint8_t data = usart_data_receive(USART0);
|
||||
(void)uart_ring_buffer_put(data); // 缓冲满时丢弃,返回值可用于统计
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user