AI工具写的环形缓冲区

This commit is contained in:
2025-08-11 20:11:46 +08:00
parent c6c90800d4
commit 4a488429bf
13 changed files with 470 additions and 154 deletions

View File

@@ -34,6 +34,8 @@ OF SUCH DAMAGE.
#include "gd32e23x_it.h"
#include "systick.h"
#include "uart.h"
#include "uart_ring_buffer.h"
/*!
\brief this function handles NMI exception
@@ -93,7 +95,12 @@ void PendSV_Handler(void)
\param[out] none
\retval none
*/
void SysTick_Handler(void)
{
delay_decrement();
void SysTick_Handler(void) {
}
void USART0_IRQHandler(void) {
if (RESET != usart_interrupt_flag_get(USART0, USART_INT_FLAG_RBNE)) {
uint8_t data = usart_data_receive(USART0);
uart_rx_put(data);
}
}