From 003974902952dedc56e9060c4db4b2b1ff63f283 Mon Sep 17 00:00:00 2001 From: Tomasz Kramkowski Date: Tue, 28 Mar 2017 20:04:26 +0100 Subject: expand uart RB --- uart/uart.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'uart') diff --git a/uart/uart.c b/uart/uart.c index 2e5d68d..a5fd352 100644 --- a/uart/uart.c +++ b/uart/uart.c @@ -12,7 +12,7 @@ enum { SBR_VAL = 39, BRFA_VAL = 2, - SRBSZ = 1024, + SRBSZ = 2048, FIFOSZ = 8, }; @@ -31,8 +31,10 @@ static inline size_t rb_store(void *_data, size_t size) end = send_rb.end; avail = (start + sizeof send_rb.buf - end) % sizeof send_rb.buf - 1; - if (size > avail) + if (size > avail) { + GPIOC_PSOR = BV(5); size = avail; + } for (int i = 0; i < size; i++) send_rb.buf[(end + i) % sizeof send_rb.buf] = data[i]; -- cgit v1.2.3-54-g00ecf