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

14
Inc/uart_ring_buffer.h Normal file
View File

@@ -0,0 +1,14 @@
#ifndef UART_RING_BUFFER_H
#define UART_RING_BUFFER_H
#include <stdint.h>
#include <stdbool.h>
#define UART_RX_BUFFER_SIZE 128
void uart_ring_buffer_init(void);
uint16_t uart_rx_available(void);
int uart_rx_get(void);
void uart_rx_put(uint8_t data);
void uart_rx_clear(void);
#endif // UART_RING_BUFFER_H