Updated with option to return from BP screen to main screen, resolved screen navigation issues

Dependencies:   SDFileSystem TFTLCD_8bit ds3231 program mbed

Fork of poc_dis_5 by SenseSemi

Revision:
0:c47fb0c1bbf6
Child:
1:8316c23ec6b9
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Tue Dec 27 10:30:48 2016 +0000
@@ -0,0 +1,101 @@
+#include "mbed.h"
+#include "ili9325.h"
+#include "lcd_base.h"
+#include "display_modules.h"
+#include "touch_modules.h"
+
+
+
+Serial gc(USBTX, USBRX);
+DigitalIn q1(PTB11);
+DigitalIn q(PTB8);
+
+
+
+
+int main(){
+
+
+unsigned char state;
+unsigned char state1;
+unsigned char state2;
+      
+      
+  DisableTouch();
+    
+     
+  gc.baud(115200);
+  init_screen();    //initialize lcd
+  screen_main();    // display of main screen 
+   state=1;
+   EnableTouch();   // enable touch function
+
+   while(1)
+   {
+      detect_touch();     // detrmine the touch points
+    switch(state)
+  {
+      case 1:   state1=touch_main();   // determining the touch for main screen 
+                state=0;
+                 break;
+               
+      case 2: 
+                state1=touch_glc();    // determining the touch for glc screen 
+                state=0;
+                break;
+                
+      case 3:  
+               state1=touch_ecg();     // determining the touch for ecg screen 
+                state=0;
+                break;
+        
+      case 4: 
+                state1=touch_bp();     // determining the touch for bp screen 
+                state=0;
+                break;       
+                
+    }         
+     
+
+  
+  
+  
+ switch(state1)
+  {
+      
+      case 1: 
+                screen_glc();      // glc main screen 
+                state1=0;
+                state=2;
+                
+                break;
+               
+      case 2: 
+                screen_ecg();      // ecg main screen 
+                state1=0;
+                state=3;
+                break;
+                
+      case 3: 
+                screen_bp();       //bp main screen 
+                 state1=0;
+                 state=4;
+                break;
+                
+            
+    }            
+    
+           
+                
+                
+                
+  }              
+                
+  
+}
+
+
+
+
+
+