Modification into 17th July New display demo code
Dependencies: SDFileSystem ds3231 eeprom_Nikita mbed testUniGraphic_150217
Fork of Ext_Demo_17July2017_newdis by
display_modules.cpp
00001 #include "mbed.h" 00002 #include "display_modules.h" 00003 #include "touch_modules.h" 00004 #include "rtc.h" 00005 //#include "main.h" 00006 #include "ILI9341.h" 00007 //#include <ILI932x.h> 00008 #include "Arial12x12.h" 00009 #include "Arial24x23.h" 00010 //#include "Terminal6x8.h" 00011 //#include "Arial43x48_numb.h" 00012 00013 00014 //BusOut dataBus( PTC12, PTC13, PTB10, PTC9, PTD4, PTD5, PTD6, PTD7 ); // 16 pins//POC DISPALY 240*320 pixels 00015 //ILI9325_LCD lcd( PTC5, PTB9, PTC0, PTB0, &dataBus, NC, PTE31); 00016 00017 /*PinName buspins[8]={PTC12, PTC13, PTB10, PTC9, PTD4, PTD5, PTD6, PTD7 }; 00018 ILI932x TFT(BUS_8, buspins, PTC5, PTB9, PTC0, PTB0,PTE31,"SPFD5408_2.4") ; 00019 DigitalOut backlight(PTC9) ;*/ 00020 00021 PinName buspins[8]={PTD2, PTC13, PTB10, PTC9, PTD4, PTD5, PTD6, PTD7 }; //new_display ili9341 00022 ILI9341 TFT(BUS_8, buspins, PTB0, PTB9, PTC0, PTB8,PTE31,"SPFD5408_2.4") ; 00023 DigitalOut backlight(PTC9) ; 00024 00025 void init_screen() // initializing the screen 00026 { 00027 //Configure the display driver 00028 TFT.FastWindow(true) ; 00029 TFT.background(Black); 00030 TFT.foreground(White); 00031 wait(0.01) ; 00032 TFT.cls(); 00033 } 00034 00035 void screen_main() //main screen 00036 { 00037 char buff1[32]; 00038 time_t epoch_time; 00039 epoch_time=rtc_read(); // read the time from rtc module 00040 strftime(buff1, 32, "%d-%m-%Y %H:%M",localtime(&epoch_time)); 00041 backlight = 0 ; 00042 TFT.BusEnable(true) ; 00043 TFT.background(White) ; 00044 TFT.cls() ; 00045 wait(0.1) ; 00046 TFT.set_font((unsigned char*) Arial12x12); 00047 TFT.foreground(Red); 00048 TFT.locate(20,100) ; 00049 TFT.printf(buff1); 00050 TFT.set_font((unsigned char*) Arial24x23); 00051 TFT.foreground(Black); 00052 TFT.locate(35,20) ; 00053 TFT.printf("SENSESEMI") ; 00054 TFT.locate(45,60) ; 00055 TFT.printf("Sense POC") ; 00056 TFT.background(Olive) ; 00057 TFT.fillrect( 60,130,180,200,Olive); 00058 TFT.locate(100,140) ; 00059 TFT.printf("SYS") ; 00060 TFT.locate(65,170) ; 00061 TFT.printf("CONFIG") ; 00062 TFT.fillrect( 60,230,180,300,Olive); 00063 TFT.locate(90,250) ; 00064 TFT.printf("TEST") ; 00065 TFT.BusEnable(false) ; 00066 backlight = 1 ; 00067 00068 } 00069 00070 00071 00072 void screen_main_2(int32_t pid) // test main screen 00073 { 00074 char buff2[10]; 00075 backlight = 0 ; 00076 TFT.BusEnable(true) ; 00077 TFT.background(White) ; 00078 sprintf(buff2 ,"%d", pid); 00079 TFT.fillrect(5,20,250,150,White ); 00080 TFT.fillrect(60,130,180,200,White ); 00081 TFT.fillrect(60,230,180,320,White ); // changed from 300 to 320 00082 TFT.set_font((unsigned char*) Arial24x23); 00083 TFT.foreground(Black); 00084 TFT.locate(10,50) ; 00085 TFT.printf("PATIENTID") ; 00086 TFT.locate(180,50) ; 00087 TFT.printf(buff2) ; 00088 TFT.background(Orange) ; 00089 TFT.foreground(Black); 00090 TFT.fillrect( 10,130,100,200,Orange); 00091 TFT.locate(40,160) ; 00092 TFT.printf("BG") ; 00093 TFT.fillrect( 130,130,220,200,Orange); 00094 TFT.locate(145,160) ; 00095 TFT.printf("ECG") ; 00096 TFT.fillrect( 10,215,100,285,Orange); 00097 TFT.locate(40,245) ; 00098 TFT.printf("BP") ; 00099 TFT.fillrect(130,215,220,285,Orange); 00100 TFT.locate(130,245) ; 00101 TFT.printf("HOME") ; 00102 TFT.BusEnable(false) ; 00103 backlight = 1 ; 00104 } 00105 00106 00107 00108 void screen_main_1() // System Configuration main screen 00109 { 00110 backlight = 0 ; 00111 TFT.BusEnable(true) ; 00112 TFT.background(GreenYellow) ; 00113 TFT.fillrect(5,127,230,320,White ); 00114 // wait(0.1) ; 00115 TFT.set_font((unsigned char*) Arial24x23); 00116 TFT.foreground(Black); 00117 TFT.fillrect( 10,130,100,200,GreenYellow); 00118 TFT.locate(40,160) ; 00119 TFT.printf("BLE") ; 00120 TFT.fillrect( 130,130,220,200,GreenYellow); 00121 TFT.locate(135,160) ; 00122 TFT.printf("ERASE") ; 00123 TFT.fillrect( 10,215,100,285,GreenYellow); 00124 TFT.locate(30,245) ; 00125 TFT.printf("FILE") ; 00126 TFT.fillrect(130,215,220,285,GreenYellow); 00127 TFT.locate(130,245) ; 00128 TFT.printf("HOME") ; 00129 TFT.BusEnable(false) ; 00130 backlight = 1 ; 00131 } 00132 00133 00134 void screen_ecg() //ECG screen 1 00135 { 00136 backlight = 0 ; 00137 TFT.BusEnable(true) ; 00138 TFT.fillrect(10,130,100,200,White); 00139 TFT.fillrect(130,130,220,200,White); 00140 TFT.fillrect(130,215,220,285,White); 00141 TFT.fillrect(10,215,100,285,White); 00142 TFT.fillrect(60,130,180,200,White); 00143 TFT.background(Green) ; 00144 TFT.fillrect( 60,130,180,200,Green); 00145 TFT.locate(80,150) ; 00146 TFT.printf("START") ; 00147 TFT.fillrect( 60,230,180,300,Green); 00148 TFT.locate(85,250) ; 00149 TFT.printf("MAIN") ; 00150 TFT.BusEnable(false) ; 00151 backlight = 1 ; 00152 00153 00154 00155 00156 } 00157 00158 00159 00160 void screen_ecg_2(uint16_t heart_rate) // ECG screen 2 00161 { 00162 char buf[5]; 00163 backlight = 0 ; 00164 TFT.BusEnable(true) ; 00165 TFT.background(White) ; 00166 TFT.foreground(Green) ; 00167 sprintf (buf, "%d bpm",heart_rate); 00168 TFT.fillrect(5,90,230,150,White); 00169 TFT.locate(3,100) ; 00170 TFT.printf(" ECG Tst Done ") ; 00171 TFT.locate(3,150) ; 00172 TFT.printf(" HeartRate ") ; 00173 TFT.locate(50,180); // changed from 30 00174 TFT.printf(buf) ; 00175 TFT.BusEnable(false) ; 00176 backlight = 1 ; 00177 } 00178 00179 void screen_ecg_lead() // ECG screen for displaying no lead proper lead contact 00180 { 00181 backlight = 0 ; 00182 TFT.BusEnable(true) ; 00183 TFT.background(White) ; 00184 TFT.foreground(Red) ; 00185 TFT.fillrect(5,90,230,150,White); 00186 TFT.locate(50,100) ; 00187 TFT.printf("Re-check") ; 00188 TFT.locate(3,130) ; 00189 TFT.printf("Lead Connection") ; 00190 TFT.BusEnable(false) ; 00191 backlight = 1 ; 00192 } 00193 00194 00195 void screen_ecg_lead_bp_fingerdetect() // ECG screen for displaying no lead proper lead contact 00196 { 00197 backlight = 0 ; 00198 TFT.BusEnable(true) ; 00199 TFT.background(White) ; 00200 TFT.foreground(Red) ; 00201 TFT.fillrect(5,90,230,150,White); 00202 TFT.locate(20,100) ; 00203 TFT.printf("Re-check Leads") ; 00204 TFT.locate(50,130) ; 00205 TFT.printf("& finger ") ; 00206 TFT.locate(45,160) ; 00207 TFT.printf("placement") ; 00208 TFT.BusEnable(false) ; 00209 backlight = 1 ; 00210 } 00211 00212 void screen_ecg_bp() // added screen dispaly text //14/06 00213 { backlight = 0 ; 00214 TFT.BusEnable(true) ; 00215 TFT.background(Green) ; 00216 TFT.fillrect(10,215,230,290,White); 00217 //TFT.fillrect(60,230,180,300,Green); 00218 //TFT.locate(100,250) ; 00219 TFT.foreground(Black) ; 00220 // TFT.printf("RET") ; 00221 TFT.fillrect( 10,215,100,285,Green); 00222 TFT.locate(30,245) ; 00223 TFT.printf("MAIN") ; 00224 TFT.fillrect(130,215,220,285,Green); 00225 TFT.locate(155,235) ; // changed // points // 13/06 00226 TFT.printf("RE-") ; 00227 TFT.locate(145,255) ; 00228 TFT.printf("TEST") ; 00229 TFT.BusEnable(false) ; 00230 backlight = 1 ; 00231 00232 } 00233 00234 00235 00236 void screen_bp() // BP main screen 00237 { 00238 backlight = 0 ; 00239 TFT.BusEnable(true) ; 00240 TFT.background(Green) ; 00241 TFT.foreground(Black) ; 00242 TFT.fillrect(10,130,100,200,White); 00243 TFT.fillrect(130,130,220,200,White); 00244 TFT.fillrect(10,215,100,285,White); 00245 TFT.fillrect(130,215,220,285,White); 00246 TFT.fillrect( 60,130,180,200,Green); 00247 TFT.locate(80,150) ; 00248 TFT.printf("START") ; 00249 TFT.fillrect( 60,230,180,300,Green); 00250 TFT.locate(100,250) ; 00251 TFT.printf("MAIN") ; 00252 TFT.BusEnable(false) ; 00253 backlight = 1 ; 00254 00255 } 00256 00257 00258 void screen_bp1(float SBP, float DBP) // BP screen 2 00259 { 00260 backlight = 0 ; 00261 TFT.BusEnable(true) ; 00262 TFT.background(White) ; 00263 TFT.foreground(Green) ; 00264 char buf[10]; 00265 TFT.fillrect(3,130,200,200,White); 00266 TFT.fillrect(60,230,180,300,White); 00267 TFT.locate(3,100) ; 00268 TFT.printf(" BP Tst Done ") ; 00269 sprintf (buf, "SBP: %.0f ",SBP); // changed to display 2 digits after decimal point, 2May'17 Changed to Integer 00270 TFT.locate(5,140) ; // changed 100 to 150 00271 TFT.printf(buf) ; 00272 sprintf (buf, "DBP: %.0f",DBP); // changed to display 2 digits after decimal point, 2May'17, Changed to integer 00273 TFT.locate(5,170) ; // CHANGED from 150 to 170 00274 TFT.printf(buf) ; 00275 //TFT.fillrect(60,230,180,300,Green); 00276 //TFT.locate(85,250) ; 00277 /* TFT.foreground(Black) ; // commented //16/06 00278 TFT.background(Green) ; 00279 //TFT.printf("RET") ; 00280 TFT.fillrect( 10,215,100,285,Green); 00281 TFT.locate(30,245) ; 00282 TFT.printf("RET") ; 00283 TFT.fillrect(130,215,220,285,Green); 00284 TFT.locate(155,235) ; // changed // points // 13/06 00285 TFT.printf("RE-") ; 00286 TFT.locate(145,255) ; 00287 TFT.printf("TEST") ; */ 00288 TFT.BusEnable(false) ; 00289 backlight = 1 ; 00290 } 00291 00292 00293 00294 00295 00296 void screen_glc() // glc main screen 00297 { 00298 00299 backlight = 0 ; 00300 TFT.BusEnable(true) ; 00301 TFT.background(Green) ; 00302 TFT.foreground(Black) ; 00303 TFT.fillrect(10,130,100,200,White); 00304 TFT.fillrect(130,130,220,200,White); 00305 TFT.fillrect(10,215,100,285,White); 00306 TFT.fillrect(130,215,220,285,White); 00307 // TFT.fillrect( 60,130,180,200,Green); 00308 // TFT.locate(80,150) ; 00309 // TFT.printf("START") ; 00310 TFT.fillrect( 10,130,100,200,Green); 00311 TFT.locate(30,160) ; // changed to 30 from 40 00312 TFT.printf("FBS") ; 00313 TFT.fillrect( 130,130,220,200,Green); 00314 TFT.locate(155,160) ; 00315 TFT.printf("PP") ; 00316 TFT.fillrect( 10,215,100,285,Green); 00317 TFT.locate(20,245) ; 00318 TFT.printf("RAN") ; 00319 TFT.fillrect(130,215,220,285,Green); 00320 TFT.locate(155,245); 00321 TFT.printf("MAIN") ; 00322 // TFT.fillrect( 60,230,180,300,Green); 00323 // TFT.locate(100,250) ; 00324 // TFT.printf("RET") ; 00325 TFT.BusEnable(false) ; 00326 backlight = 1 ; 00327 00328 } 00329 00330 00331 void screen_bp2() //BP screen 3 00332 { 00333 00334 /* lcd.FillRoundRect(3,130,200,200,COLOR_BLACK); 00335 lcd.FillRoundRect(60,230,180,300,COLOR_BLACK); 00336 lcd.FillRect(5,215,230,290,COLOR_BLACK);*/ 00337 00338 } 00339 00340 00341 void ecg_countdown() // ECG measurement countdown 00342 { 00343 backlight = 0 ; 00344 TFT.BusEnable(true) ; 00345 TFT.background(White) ; 00346 TFT.foreground(Green) ; 00347 char tim1[5]; 00348 TFT.fillrect(3,130,200,200,White); 00349 TFT.fillrect(60,230,180,300,White); 00350 TFT.fillrect(5,215,230,290,White); 00351 TFT.locate(25,100) ; 00352 TFT.printf("ECG starts in") ; 00353 for(int i=5;i>=0;i--) 00354 { 00355 wait(1); 00356 sprintf (tim1, "%d",i); 00357 TFT.locate(120,120) ; 00358 TFT.printf(tim1) ; 00359 } 00360 TFT.BusEnable(false) ; 00361 backlight = 1 ; 00362 00363 00364 } 00365 00366 void bp_countdown() // ECG measurement countdown 00367 { 00368 backlight = 0 ; 00369 TFT.BusEnable(true) ; 00370 TFT.background(White) ; 00371 TFT.foreground(Green) ; 00372 char tim1[5]; 00373 TFT.fillrect(3,130,200,200,White); 00374 TFT.fillrect(60,230,180,300,White); 00375 TFT.fillrect(1,80,240,290,White); //changed the points// 13/06 00376 TFT.locate(25,100) ; 00377 TFT.printf("BP starts in") ; 00378 for(int i=5;i>=0;i--) 00379 { 00380 wait(1); 00381 sprintf (tim1, "%d",i); 00382 TFT.locate(120,120) ; 00383 TFT.printf(tim1) ; 00384 } 00385 TFT.BusEnable(false) ; 00386 backlight = 1 ; 00387 } 00388 00389 void screen_again() // screen to press 'yes' or 'no' to repeat the test 00390 { 00391 backlight = 0 ; 00392 TFT.BusEnable(true) ; 00393 TFT.background(White) ; 00394 TFT.foreground(Black) ; 00395 TFT.fillrect(5,127,230,200,White); 00396 TFT.locate(50,130) ; 00397 TFT.printf("Take test") ; 00398 TFT.locate(75,160) ; 00399 TFT.printf("again?") ; 00400 TFT.background(Orange) ; 00401 TFT.locate(30,245) ; 00402 TFT.printf("YES") ; 00403 TFT.locate(135,245) ; 00404 TFT.printf(" NO ") ; 00405 backlight = 1 ; 00406 TFT.BusEnable(false) ; 00407 00408 } 00409 00410 00411 void screen_glc_2() // GLC screen 3 after test 00412 { 00413 00414 backlight = 0 ; 00415 TFT.BusEnable(true) ; 00416 TFT.background(White) ; 00417 TFT.foreground(Black) ; 00418 TFT.fillrect(10,215,230,290,White); 00419 //TFT.fillrect(60,230,180,300,Green); 00420 //TFT.locate(85,250) ; 00421 TFT.background(Green); 00422 //TFT.printf("RET") ; 00423 TFT.fillrect( 10,215,100,285,Green); 00424 TFT.locate(30,245) ; 00425 TFT.printf("MAIN") ; 00426 TFT.fillrect(130,215,220,285,Green); 00427 TFT.locate(155,235) ; // changed // points // 13/06 00428 TFT.printf("RE-") ; 00429 TFT.locate(140,255) ; // changed from 145 to 140 00430 TFT.printf("TEST") ; 00431 backlight = 1 ; 00432 TFT.BusEnable(false) ; 00433 00434 00435 00436 } 00437 00438 00439 void glc_1() // GLC screen 00440 { 00441 backlight = 0 ; 00442 TFT.BusEnable(true) ; 00443 TFT.background(White) ; 00444 TFT.foreground(Magenta ) ; 00445 TFT.fillrect(3,130,200,200,White); 00446 TFT.fillrect(60,230,180,300,White); 00447 TFT.fillrect(5,215,230,290,White); 00448 TFT.fillrect( 130,130,220,200,White); 00449 TFT.locate(5,130) ; 00450 TFT.printf("Blood Glucose") ; 00451 TFT.locate(5,160) ; 00452 TFT.printf("Insert strip") ; 00453 TFT.BusEnable(false) ; 00454 backlight = 1 ; 00455 00456 00457 00458 } 00459 00460 void glc_2() // GLC screen 00461 { 00462 backlight = 0 ; 00463 TFT.BusEnable(true) ; 00464 TFT.locate(5,160) ; 00465 TFT.printf("Strip Detected") ; 00466 TFT.locate(5,190) ; 00467 TFT.printf("Insert Blood") ; 00468 TFT.BusEnable(false) ; 00469 backlight = 1 ; 00470 } 00471 00472 00473 void glc_3() // GLC screen 00474 { 00475 backlight = 0 ; 00476 TFT.BusEnable(true) ; 00477 TFT.locate(5,190) ; 00478 TFT.printf("Blood Detected") ; 00479 TFT.locate( 5,220) ; 00480 TFT.printf("computing") ; 00481 TFT.BusEnable(false) ; 00482 backlight = 1 ; 00483 } 00484 00485 00486 void glc_4(uint16_t mgdl) // GLC screen to display blood glucose level on the LCD 00487 { 00488 char buf[10]; 00489 sprintf (buf, " BG %d mg/dl",mgdl); 00490 backlight = 0 ; 00491 TFT.BusEnable(true) ; 00492 TFT.fillrect(5,127,230,320,White); 00493 TFT.locate(3,100) ; 00494 TFT.printf(" BG Tst Done ") ; 00495 TFT.locate(5,130) ; 00496 TFT.printf(buf) ; 00497 TFT.locate(5,160) ; 00498 TFT.printf("(Range 70-120 mg/dl)") ; // added 16/06 00499 TFT.BusEnable(false) ; 00500 backlight = 1 ; 00501 } 00502 00503 00504 void bat_screen_nocharge() 00505 { 00506 00507 /* lcd.FillRect(10,10,20,40,COLOR_RED); 00508 lcd.FillRect(5,127,230,200,COLOR_BLACK); 00509 lcd.FillRoundRect(60,230,180,300,COLOR_BLACK); 00510 lcd.Print( "Low battery",60,130 ,COLOR_RED,COLOR_BLACK, 0); 00511 lcd.Print( "Connect",60,160 ,COLOR_RED,COLOR_BLACK, 0); 00512 lcd.Print( "Charger",30,205,COLOR_RED,COLOR_BLACK,0); */ 00513 00514 backlight = 0 ; 00515 TFT.BusEnable(true) ; 00516 TFT.fillrect(10,10,20,40,Red); 00517 TFT.fillrect(5,127,230,200,White); 00518 TFT.fillrect(60,230,180,300,White); 00519 TFT.locate(60,130) ; 00520 TFT.printf("Low battery") ; 00521 00522 00523 00524 TFT.BusEnable(false) ; 00525 backlight = 1 ; 00526 00527 } 00528 00529 void bat_screen_charge() 00530 { 00531 00532 // lcd.FillRect(10,10,20,40,COLOR_GREEN); 00533 backlight = 0 ; 00534 TFT.BusEnable(true) ; 00535 TFT.fillrect(10,10,20,40,Green); 00536 TFT.BusEnable(false) ; 00537 backlight = 1 ; 00538 } 00539 void screen_ecg_error() 00540 { 00541 backlight = 0 ; 00542 TFT.BusEnable(true) ; 00543 TFT.background(White) ; 00544 TFT.foreground(Red) ; 00545 TFT.fillrect(5,90,230,150,White); 00546 TFT.locate(50,100) ; 00547 TFT.printf("ERROR!") ; 00548 TFT.locate(20,130) ; 00549 TFT.printf("Take ReTest") ; 00550 //TFT.locate(45,160) ; 00551 // TFT.printf("") ; 00552 TFT.BusEnable(false) ; 00553 backlight = 1 ; 00554 } 00555 00556 void screen_bp_error() 00557 { 00558 backlight = 0 ; 00559 TFT.BusEnable(true) ; 00560 TFT.background(White) ; 00561 TFT.foreground(Red) ; 00562 TFT.fillrect(5,90,230,150,White); 00563 TFT.locate(50,100) ; 00564 TFT.printf("ERROR!") ; 00565 TFT.locate(20,130) ; 00566 TFT.printf("Take ReTest") ; 00567 //TFT.locate(45,160) ; 00568 // TFT.printf("") ; 00569 TFT.BusEnable(false) ; 00570 backlight = 1 ; 00571 } 00572 00573 00574 void glc_error() 00575 { 00576 backlight = 0 ; 00577 TFT.BusEnable(true) ; 00578 TFT.background(White) ; 00579 TFT.foreground(Red) ; 00580 TFT.fillrect(5,90,230,300,White); 00581 TFT.locate(50,100) ; 00582 TFT.printf("ERROR!") ; 00583 TFT.locate(20,130) ; 00584 TFT.printf("Take ReTest") ; 00585 //TFT.locate(45,160) ; 00586 // TFT.printf("") ; 00587 TFT.BusEnable(false) ; 00588 backlight = 1 ; 00589 } 00590 00591 00592 void BT_connection() 00593 { 00594 backlight = 0 ; 00595 TFT.BusEnable(true) ; 00596 TFT.background(White) ; 00597 TFT.foreground(Blue) ; 00598 TFT.fillrect(5,90,230,300,White); 00599 TFT.locate(40,140) ; 00600 TFT.printf("Connected") ; 00601 TFT.locate(20,170) ; 00602 TFT.printf("Sending Files") ; 00603 //TFT.locate(45,160) ; 00604 // TFT.printf("") ; 00605 TFT.BusEnable(false) ; 00606 backlight = 1 ; 00607 } 00608 00609 void BT_no_connection() 00610 { 00611 backlight = 0 ; 00612 TFT.BusEnable(true) ; 00613 TFT.background(White) ; 00614 TFT.foreground(Blue) ; 00615 TFT.fillrect(5,90,230,300,White); 00616 TFT.locate(80,140) ; 00617 TFT.printf("Not") ; 00618 TFT.locate(40,160) ; 00619 TFT.printf("Connected") ; 00620 //TFT.locate(45,160) ; 00621 // TFT.printf("") ; 00622 TFT.BusEnable(false) ; 00623 backlight = 1 ; 00624 } 00625 00626 void BT_finished() 00627 { 00628 backlight = 0 ; 00629 TFT.BusEnable(true) ; 00630 TFT.background(White) ; 00631 TFT.foreground(Blue) ; 00632 TFT.fillrect(5,90,230,300,White); 00633 TFT.locate(20,140) ; 00634 TFT.printf("Files Tranfer") ; 00635 TFT.locate(40,170) ; 00636 TFT.printf("Completed") ; 00637 //TFT.locate(45,160) ; 00638 // TFT.printf("") ; 00639 TFT.BusEnable(false) ; 00640 backlight = 1 ; 00641 } 00642 00643 00644 void screen_BT_return() // BT main screen 00645 { 00646 backlight = 0 ; 00647 TFT.BusEnable(true) ; 00648 TFT.background(Green) ; 00649 TFT.foreground(Black) ; 00650 TFT.fillrect(5,90,230,300,White); 00651 TFT.fillrect( 60,230,180,300,Green); 00652 TFT.locate(80,250) ; 00653 TFT.printf("MAIN") ; 00654 TFT.BusEnable(false) ; 00655 backlight = 1 ; 00656 00657 } 00658 00659 00660 void screen_patient_info(uint32_t current_test_pid,uint32_t bt_file_sent_pid) 00661 { 00662 char buf[10]; 00663 sprintf (buf, "current pid %d",current_test_pid); 00664 backlight = 0 ; 00665 TFT.BusEnable(true) ; 00666 TFT.background(White); 00667 TFT.foreground(Blue); 00668 TFT.fillrect(5,90,230,300,White); 00669 TFT.locate(20,140) ; 00670 TFT.printf(buf) ; 00671 sprintf (buf, "Bt pid %d",bt_file_sent_pid); 00672 TFT.locate(20,170) ; 00673 TFT.printf(buf) ; 00674 TFT.background(Green) ; 00675 TFT.foreground(Black) ; 00676 TFT.fillrect( 60,230,180,300,Green); 00677 TFT.locate(80,250) ; 00678 TFT.printf("MAIN") ; 00679 TFT.BusEnable(false) ; 00680 backlight = 1 ; 00681 00682 }
Generated on Wed Jul 13 2022 16:15:21 by 1.7.2