RealtimeCompLab2

Dependencies:   mbed

Fork of PPP-Blinky by Nicolas Nackel

Revision:
181:bcfe7fe2142d
Parent:
179:ba2b2ddd0da5
Child:
193:8d3c9e94a4fb
--- a/PPP-Blinky/ppp-blinky.h	Mon Sep 11 15:05:52 2017 +0000
+++ b/PPP-Blinky/ppp-blinky.h	Mon Sep 11 16:54:18 2017 +0000
@@ -149,7 +149,7 @@
 #define RXBUFLEN (1<<11)
         // the serial port receive buffer and packet buffer, size is RXBUFLEN (currently 2048 bytes)
         char buf[RXBUFLEN]; // RXBUFLEN MUST be a power of two because we use & operator for fast wrap-around in ring buffer
-        int head;
+        volatile int head; // declared volatile so user code knows this variable changes in the interrupt handler
         int tail;
         int rtail;
         int buflevel;