Pranav Thakur / Mbed 2 deprecated daplink-validation

Dependencies:   mbed

Fork of daplink-validation by Russ Butler

Files at this revision

API Documentation at this revision

Comitter:
c1728p9
Date:
Thu Sep 15 20:57:02 2016 +0000
Parent:
10:8f171987d9a2
Child:
12:b56a7a3f45d7
Commit message:
Check for buffer full so flow control works as expected

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/main.cpp	Thu Sep 15 19:34:29 2016 +0000
+++ b/main.cpp	Thu Sep 15 20:57:02 2016 +0000
@@ -77,7 +77,7 @@
     while (1) {
 
         // Enqueue data as it arrives
-        while (pc.readable()) {
+        while (pc.readable() && !buf.full()) {
             val = pc.getc();
             buf.enqueue(val);
         }