Changes done in ECG and BT

Dependencies:   SDFileSystem ds3231 eeprom_Nikita mbed testUniGraphic_150217

Fork of merged_code2_20sept_2017_4th_oct_2017 by nikita teggi

Committer:
nikitateggi
Date:
Tue Dec 27 10:30:48 2016 +0000
Revision:
0:c47fb0c1bbf6
Child:
1:8316c23ec6b9
poc display

Who changed what in which revision?

UserRevisionLine numberNew contents of line
nikitateggi 0:c47fb0c1bbf6 1 #include "mbed.h"
nikitateggi 0:c47fb0c1bbf6 2 #include "ili9325.h"
nikitateggi 0:c47fb0c1bbf6 3 #include "lcd_base.h"
nikitateggi 0:c47fb0c1bbf6 4 #include "display_modules.h"
nikitateggi 0:c47fb0c1bbf6 5 #include "touch_modules.h"
nikitateggi 0:c47fb0c1bbf6 6
nikitateggi 0:c47fb0c1bbf6 7
nikitateggi 0:c47fb0c1bbf6 8 BusOut dataBus( PTC12, PTC13, PTB10, PTC9, PTD4, PTD5, PTD6, PTD7 ); // 16 pins//POC
nikitateggi 0:c47fb0c1bbf6 9 ILI9325_LCD lcd( PTC5, PTB9, PTC0, PTB0, &dataBus, NC, PTE31);
nikitateggi 0:c47fb0c1bbf6 10
nikitateggi 0:c47fb0c1bbf6 11
nikitateggi 0:c47fb0c1bbf6 12 void init_screen() // initializing the screen
nikitateggi 0:c47fb0c1bbf6 13 { lcd.Initialize(PORTRAIT);
nikitateggi 0:c47fb0c1bbf6 14 }
nikitateggi 0:c47fb0c1bbf6 15
nikitateggi 0:c47fb0c1bbf6 16 void screen_main()//main screen
nikitateggi 0:c47fb0c1bbf6 17 {
nikitateggi 0:c47fb0c1bbf6 18 lcd.SetFont(&TerminusBigFont);
nikitateggi 0:c47fb0c1bbf6 19 lcd.FillRect(5,127,230,320,COLOR_BLACK);
nikitateggi 0:c47fb0c1bbf6 20 lcd.FillRoundRect(10,130,100,200,COLOR_CYAN);
nikitateggi 0:c47fb0c1bbf6 21 lcd.Print( "BG",40,160,COLOR_BLACK,COLOR_CYAN,0);
nikitateggi 0:c47fb0c1bbf6 22 lcd.FillRoundRect(130,130,220,200,COLOR_YELLOW);
nikitateggi 0:c47fb0c1bbf6 23 lcd.Print( "ECG",160,160,COLOR_BLACK,COLOR_YELLOW,0);
nikitateggi 0:c47fb0c1bbf6 24 lcd.FillRoundRect(10,215,100,285,COLOR_MAGENTA);
nikitateggi 0:c47fb0c1bbf6 25 lcd.Print( "BP",40,245,COLOR_BLACK,COLOR_MAGENTA,0);
nikitateggi 0:c47fb0c1bbf6 26 lcd.FillRoundRect(130,215,220,285,COLOR_GREEN);
nikitateggi 0:c47fb0c1bbf6 27 lcd.Print( "SET",160,245,COLOR_BLACK,COLOR_GREEN,0);
nikitateggi 0:c47fb0c1bbf6 28 }
nikitateggi 0:c47fb0c1bbf6 29
nikitateggi 0:c47fb0c1bbf6 30
nikitateggi 0:c47fb0c1bbf6 31
nikitateggi 0:c47fb0c1bbf6 32 void screen_ecg()
nikitateggi 0:c47fb0c1bbf6 33 {
nikitateggi 0:c47fb0c1bbf6 34 DisableTouch();
nikitateggi 0:c47fb0c1bbf6 35
nikitateggi 0:c47fb0c1bbf6 36 lcd.ClearScreen();
nikitateggi 0:c47fb0c1bbf6 37 //lcd.FillScreen(COLOR_BLACK);
nikitateggi 0:c47fb0c1bbf6 38
nikitateggi 0:c47fb0c1bbf6 39
nikitateggi 0:c47fb0c1bbf6 40 lcd.FillRect(5,127,230,320,COLOR_BLACK);
nikitateggi 0:c47fb0c1bbf6 41 lcd.FillRect(10,30,100,90,COLOR_GREEN);
nikitateggi 0:c47fb0c1bbf6 42 lcd.FillTriangle(10,30,60,10,100,30,COLOR_YELLOW);
nikitateggi 0:c47fb0c1bbf6 43 lcd.DrawRect(20,90,90,40,COLOR_BLACK);
nikitateggi 0:c47fb0c1bbf6 44 //lcd.Print( "HOME",80,60,COLOR_BLACK,COLOR_GREEN,0);
nikitateggi 0:c47fb0c1bbf6 45 lcd.FillRoundRect(10,130,100,200,COLOR_CYAN);
nikitateggi 0:c47fb0c1bbf6 46 lcd.Print( "SET",30,160,COLOR_BLACK,COLOR_CYAN,0);
nikitateggi 0:c47fb0c1bbf6 47 lcd.FillRoundRect(130,130,220,285,COLOR_YELLOW);
nikitateggi 0:c47fb0c1bbf6 48 lcd.Print( "start",140,200,COLOR_BLACK,COLOR_YELLOW,0);
nikitateggi 0:c47fb0c1bbf6 49 lcd.FillRoundRect(10,215,100,285,COLOR_MAGENTA);
nikitateggi 0:c47fb0c1bbf6 50 lcd.Print( "HIS",40,245,COLOR_BLACK,COLOR_MAGENTA,0);
nikitateggi 0:c47fb0c1bbf6 51 EnableTouch();
nikitateggi 0:c47fb0c1bbf6 52 }
nikitateggi 0:c47fb0c1bbf6 53
nikitateggi 0:c47fb0c1bbf6 54
nikitateggi 0:c47fb0c1bbf6 55 void screen_bp() // bp main screen
nikitateggi 0:c47fb0c1bbf6 56 {
nikitateggi 0:c47fb0c1bbf6 57 DisableTouch();
nikitateggi 0:c47fb0c1bbf6 58 lcd.ClearScreen();
nikitateggi 0:c47fb0c1bbf6 59 // lcd.FillScreen(COLOR_BLACK);
nikitateggi 0:c47fb0c1bbf6 60 lcd.FillRect(5,127,230,320,COLOR_BLACK);
nikitateggi 0:c47fb0c1bbf6 61 lcd.FillRoundRect(10,130,100,200,COLOR_CYAN);
nikitateggi 0:c47fb0c1bbf6 62 lcd.Print( "meas",30,160,COLOR_BLACK,COLOR_CYAN,0);
nikitateggi 0:c47fb0c1bbf6 63 lcd.FillRoundRect(130,130,220,200,COLOR_YELLOW);
nikitateggi 0:c47fb0c1bbf6 64 lcd.Print( "start",140,160,COLOR_BLACK,COLOR_YELLOW,0);
nikitateggi 0:c47fb0c1bbf6 65 lcd.FillRoundRect(10,215,100,285,COLOR_MAGENTA);
nikitateggi 0:c47fb0c1bbf6 66 lcd.Print( "his",40,245,COLOR_BLACK,COLOR_MAGENTA,0);
nikitateggi 0:c47fb0c1bbf6 67 lcd.FillRoundRect(130,215,220,285,COLOR_GREEN);
nikitateggi 0:c47fb0c1bbf6 68 lcd.Print( "SET",160,245,COLOR_BLACK,COLOR_GREEN,0);
nikitateggi 0:c47fb0c1bbf6 69
nikitateggi 0:c47fb0c1bbf6 70 EnableTouch();
nikitateggi 0:c47fb0c1bbf6 71 }
nikitateggi 0:c47fb0c1bbf6 72
nikitateggi 0:c47fb0c1bbf6 73
nikitateggi 0:c47fb0c1bbf6 74 void screen_glc() // glc main screen
nikitateggi 0:c47fb0c1bbf6 75 {
nikitateggi 0:c47fb0c1bbf6 76 DisableTouch();
nikitateggi 0:c47fb0c1bbf6 77 lcd.ClearScreen();
nikitateggi 0:c47fb0c1bbf6 78 // lcd.FillScreen(COLOR_BLACK);
nikitateggi 0:c47fb0c1bbf6 79 lcd.FillRect(5,127,230,320,COLOR_BLACK);
nikitateggi 0:c47fb0c1bbf6 80 lcd.FillRoundRect(10,130,100,200,COLOR_CYAN);
nikitateggi 0:c47fb0c1bbf6 81 lcd.Print( "meas",30,160,COLOR_BLACK,COLOR_CYAN,0);
nikitateggi 0:c47fb0c1bbf6 82 lcd.FillRoundRect(130,130,220,200,COLOR_YELLOW);
nikitateggi 0:c47fb0c1bbf6 83 lcd.Print( "start",140,160,COLOR_BLACK,COLOR_YELLOW,0);
nikitateggi 0:c47fb0c1bbf6 84 lcd.FillRoundRect(10,215,100,285,COLOR_MAGENTA);
nikitateggi 0:c47fb0c1bbf6 85 lcd.Print( "his",40,245,COLOR_BLACK,COLOR_MAGENTA,0);
nikitateggi 0:c47fb0c1bbf6 86 lcd.FillRoundRect(130,215,220,285,COLOR_GREEN);
nikitateggi 0:c47fb0c1bbf6 87 lcd.Print( "SET",160,245,COLOR_BLACK,COLOR_GREEN,0);
nikitateggi 0:c47fb0c1bbf6 88
nikitateggi 0:c47fb0c1bbf6 89 EnableTouch();
nikitateggi 0:c47fb0c1bbf6 90 }
nikitateggi 0:c47fb0c1bbf6 91
nikitateggi 0:c47fb0c1bbf6 92
nikitateggi 0:c47fb0c1bbf6 93 void screen_ecg_2() // ecg second screen
nikitateggi 0:c47fb0c1bbf6 94 {
nikitateggi 0:c47fb0c1bbf6 95 DisableTouch();
nikitateggi 0:c47fb0c1bbf6 96
nikitateggi 0:c47fb0c1bbf6 97 lcd.ClearScreen();
nikitateggi 0:c47fb0c1bbf6 98 // lcd.FillScreen(COLOR_BLACK);
nikitateggi 0:c47fb0c1bbf6 99
nikitateggi 0:c47fb0c1bbf6 100 lcd.FillRect(10,30,100,90,COLOR_GREEN);
nikitateggi 0:c47fb0c1bbf6 101 lcd.FillTriangle(10,30,60,10,100,30,COLOR_YELLOW);
nikitateggi 0:c47fb0c1bbf6 102 lcd.DrawRect(20,90,90,40,COLOR_BLACK);
nikitateggi 0:c47fb0c1bbf6 103 //lcd.FillRect(5,127,230,320,COLOR_BLACK);
nikitateggi 0:c47fb0c1bbf6 104 //lcd.FillRect(60,30,170,90,COLOR_GREEN);
nikitateggi 0:c47fb0c1bbf6 105 //lcd.FillTriangle(60,30,115,10,170,30,COLOR_YELLOW);
nikitateggi 0:c47fb0c1bbf6 106 //lcd.DrawRect(90,90,140,40,COLOR_BLACK);
nikitateggi 0:c47fb0c1bbf6 107 //lcd.Print( "HOME",80,60,COLOR_BLACK,COLOR_GREEN,0);
nikitateggi 0:c47fb0c1bbf6 108 lcd.FillRoundRect(10,130,100,200,COLOR_CYAN);
nikitateggi 0:c47fb0c1bbf6 109 lcd.Print( "2 s",30,160,COLOR_BLACK,COLOR_CYAN,0);
nikitateggi 0:c47fb0c1bbf6 110 lcd.FillRoundRect(130,130,220,200,COLOR_YELLOW);
nikitateggi 0:c47fb0c1bbf6 111 lcd.Print( "5 s",140,160,COLOR_BLACK,COLOR_YELLOW,0);
nikitateggi 0:c47fb0c1bbf6 112 lcd.FillRoundRect(10,215,100,285,COLOR_MAGENTA);
nikitateggi 0:c47fb0c1bbf6 113 lcd.Print( "10 s",40,245,COLOR_BLACK,COLOR_MAGENTA,0);
nikitateggi 0:c47fb0c1bbf6 114 lcd.FillRoundRect(130,215,220,285,COLOR_GREEN);
nikitateggi 0:c47fb0c1bbf6 115 lcd.Print( "1 m",160,245,COLOR_BLACK,COLOR_GREEN,0);
nikitateggi 0:c47fb0c1bbf6 116
nikitateggi 0:c47fb0c1bbf6 117 EnableTouch();
nikitateggi 0:c47fb0c1bbf6 118 }
nikitateggi 0:c47fb0c1bbf6 119
nikitateggi 0:c47fb0c1bbf6 120
nikitateggi 0:c47fb0c1bbf6 121