summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTomasz Kramkowski <tk@the-tk.com>2017-03-28 20:04:26 +0100
committerTomasz Kramkowski <tk@the-tk.com>2017-03-28 20:04:26 +0100
commit003974902952dedc56e9060c4db4b2b1ff63f283 (patch)
treec74eee88ab7fad3ca0460c1741637b6df2f683ee
parent9ceb7ca646a8a0b8ae7885a93ee2ad7f89cd88c6 (diff)
downloadfmk-003974902952dedc56e9060c4db4b2b1ff63f283.tar.gz
fmk-003974902952dedc56e9060c4db4b2b1ff63f283.tar.xz
fmk-003974902952dedc56e9060c4db4b2b1ff63f283.zip
expand uart RB
-rw-r--r--uart/uart.c6
1 files changed, 4 insertions, 2 deletions
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];