test

Dependencies:   MODDMA MODSERIAL mbed

Fork of IRIS_MBED by IRIS

Files at this revision

API Documentation at this revision

Comitter:
JonathanAshworth
Date:
Mon Mar 16 15:38:37 2015 +0000
Parent:
2:28501c7700f7
Child:
4:1017848d2fe1
Commit message:
Now reset the timer after receiving each byte rather than only on the first byte of each period

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/main.cpp	Mon Mar 16 15:34:35 2015 +0000
+++ b/main.cpp	Mon Mar 16 15:38:37 2015 +0000
@@ -158,6 +158,11 @@
         if (!terminated) {
             while((!serial.readable())&&(!flags.usbTimeout)) {;}
             if (serial.readable()) {
+                usbRIT.disable();
+                usbTimer.stop();
+                usbTimer.reset();
+                usbTimer.start();
+                usbRIT.enable();
                 rxBuffer[buffPntr] = serial.getc();//whenDataReady, insert into rx buffer
             }
         }