|
@@ -80,10 +80,12 @@
|
80
|
80
|
// using a ring buffer (I think), in which rx_buffer_head is the index of the
|
81
|
81
|
// location to which to write the next incoming character and rx_buffer_tail
|
82
|
82
|
// is the index of the location from which to read.
|
83
|
|
- // 256 is the max limit due to uint8_t head and tail. Use only powers of 2. (...,16,32,64,128,256)
|
|
83
|
+ // Use only powers of 2.
|
|
84
|
+ // : [0, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, ...]
|
84
|
85
|
#ifndef RX_BUFFER_SIZE
|
85
|
86
|
#define RX_BUFFER_SIZE 128
|
86
|
87
|
#endif
|
|
88
|
+ // 256 is the max TX buffer climit due to uint8_t head and tail.
|
87
|
89
|
#ifndef TX_BUFFER_SIZE
|
88
|
90
|
#define TX_BUFFER_SIZE 32
|
89
|
91
|
#endif
|
|
@@ -95,7 +97,7 @@
|
95
|
97
|
#error "RX_BUFFER_SIZE must be a power of 2 greater than 1."
|
96
|
98
|
#endif
|
97
|
99
|
#if TX_BUFFER_SIZE && (TX_BUFFER_SIZE < 2 || TX_BUFFER_SIZE > 256 || !IS_POWER_OF_2(TX_BUFFER_SIZE))
|
98
|
|
- #error "TX_BUFFER_SIZE must be 0 or a power of 2 greater than 1."
|
|
100
|
+ #error "TX_BUFFER_SIZE must be 0, a power of 2 greater than 1, and no greater than 256."
|
99
|
101
|
#endif
|
100
|
102
|
|
101
|
103
|
#if RX_BUFFER_SIZE > 256
|