generated from hulk/gd32e23x_template_cmake_vscode
AI工具写的环形缓冲区
This commit is contained in:
14
Inc/uart_ring_buffer.h
Normal file
14
Inc/uart_ring_buffer.h
Normal 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
|
Reference in New Issue
Block a user