serial_uart: Make RBUF_SIZE cutomizable

Default size 256 bytes may be too much in many cases
This commit is contained in:
tmk 2022-02-14 13:43:20 +09:00
parent b3b2e23584
commit 85b69a7eab

View file

@ -63,7 +63,9 @@ void serial_init(void)
} }
// RX ring buffer // RX ring buffer
#ifndef RBUF_SIZE
#define RBUF_SIZE 256 #define RBUF_SIZE 256
#endif
static uint8_t rbuf[RBUF_SIZE]; static uint8_t rbuf[RBUF_SIZE];
static uint8_t rbuf_head = 0; static uint8_t rbuf_head = 0;
static uint8_t rbuf_tail = 0; static uint8_t rbuf_tail = 0;