Modification into 17th July New display demo code

Dependencies:   SDFileSystem ds3231 eeprom_Nikita mbed testUniGraphic_150217

Fork of Ext_Demo_17July2017_newdis by SenseSemi

main.cpp

Committer:
nikitateggi
Date:
2016-12-27
Revision:
0:c47fb0c1bbf6
Child:
1:8316c23ec6b9

File content as of revision 0:c47fb0c1bbf6:

#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;
                
            
    }            
    
           
                
                
                
  }              
                
  
}