aboutsummaryrefslogtreecommitdiffstats
path: root/src/avr/serial.c
diff options
context:
space:
mode:
authorKevin O'Connor <kevin@koconnor.net>2016-10-14 10:10:51 -0400
committerKevin O'Connor <kevin@koconnor.net>2016-10-18 15:01:29 -0400
commit8be8cb7a9145f3e2e3a854398e0b844ec375636f (patch)
tree38cf5239792eb7a23ec6d11a980a1d77e83a010b /src/avr/serial.c
parent977aabe038a4fbfa46c2b8873999e9e198f7487f (diff)
downloadkutter-8be8cb7a9145f3e2e3a854398e0b844ec375636f.tar.gz
kutter-8be8cb7a9145f3e2e3a854398e0b844ec375636f.tar.xz
kutter-8be8cb7a9145f3e2e3a854398e0b844ec375636f.zip
serial: Increase AVR serial receive buffer
Increase the size of the serial receive buffer. With transmit rates of 250000 baud, it only takes a little over a millisecond to overflow the existing buffer. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Diffstat (limited to 'src/avr/serial.c')
-rw-r--r--src/avr/serial.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/avr/serial.c b/src/avr/serial.c
index c1882a5d..bd92f048 100644
--- a/src/avr/serial.c
+++ b/src/avr/serial.c
@@ -12,10 +12,9 @@
#include "sched.h" // DECL_INIT
#include "irq.h" // irq_save
-#define SERIAL_BUFFER_SIZE 96
-static char receive_buf[SERIAL_BUFFER_SIZE];
+static char receive_buf[192];
static uint8_t receive_pos;
-static char transmit_buf[SERIAL_BUFFER_SIZE];
+static char transmit_buf[96];
static uint8_t transmit_pos, transmit_max;