Starter firmware project for the Imperial College EEE SWITCH lab

Dependencies:   Adafruit_GFX mbed

Revision:
2:a5b7373c4644
Parent:
1:5aebe57872ed
--- a/main.cpp	Fri Apr 08 11:35:29 2016 +0000
+++ b/main.cpp	Tue Apr 19 15:38:38 2016 +0000
@@ -38,8 +38,10 @@
 //Switch sampling timer
 Ticker swtimer;
 
-//Registers for the switch counter, output register and update flag
-uint16_t scounter=0,scount=0,update=0;
+//Registers for the switch counter, switch counter latch register and update flag
+volatile uint16_t scounter=0;
+volatile uint16_t scount=0;
+volatile uint16_t update=0;
 
 //Initialise SPI instance for communication with the display
 SPIPreInit gSpi(D_MOSI_PIN,NC,D_CLK_PIN); //MOSI,MISO,CLK
@@ -49,6 +51,7 @@
 
 int main() { 
     //Initialisation
+    gOled1.setRotation(2); //Set display rotation
     
     //Attach switch oscillator counter ISR to the switch input instance for a rising edge
     swin.rise(&sedge);