Console Serial IO con display OLED e seriale asincrona
Dependencies: mbed BufferedSerial AserialIOFuncLib SSD1306 TerminalPlusV2
Fork of SerialIO by
Console Serial IO con display OLED e seriale asincrona
Revision 17:7c8c37fbec9f, committed 2015-08-16
- Comitter:
- MaxScorda
- Date:
- Sun Aug 16 23:51:00 2015 +0000
- Parent:
- 16:4c893ec05fc6
- Child:
- 18:dbe0172cca20
- Commit message:
- Phase oled ok
Changed in this revision
--- a/Functions.h Sun Aug 16 23:30:57 2015 +0000 +++ b/Functions.h Sun Aug 16 23:51:00 2015 +0000 @@ -60,14 +60,14 @@ sc.writeScreen("ON \n",22,14); sc.writeScreen("Virtual ACCESO \n",42,20,99); ardser.printf("\nVirtual ACCESO \n\r"); - printDisp(dispType,"Virtual ACCESO \n\r"); + printDisp(dispType,"Virtual ACCESO \n\r"); errp=0; } if (param=="off") { sc.writeScreen("OFF \n",22,14); sc.writeScreen("Virtual SPENTO! \n",42,20,99); ardser.printf("\nVirtual SPENTO! \n\r"); - printDisp(dispType,"Virtual SPENTO \n\r"); + printDisp(dispType,"Virtual SPENTO \n\r"); errp=0; } } @@ -79,8 +79,8 @@ sc.writeScreen(fnzAdd.string2char(fnzAdd.addEOS(func+"-"+funcnum+"-"+param)),42,14,4); sc.writeScreen("Arduino Command \n",42,20,99); ardser.printf(fnzAdd.string2char(fnzAdd.addEOS(func+funcnum+param))); - printDisp(dispType,"Arduino Command \n\r"); - printDisp(dispType,fnzAdd.string2char(fnzAdd.addEOS(" "+func+funcnum+param+"\r"))); + printDisp(dispType,"Arduino Command \n\r"); + printDisp(dispType,fnzAdd.string2char(fnzAdd.addEOS(" "+func+funcnum+param+"\r"))); //ardser.printf(fnzAdd.string2char(fnzAdd.addEOS(func+"-"+funcnum+"-"+param))); errp=0; } @@ -91,7 +91,7 @@ // pc.printf("Bad command\n\r"); sc.writeScreen("Bad Command\n",42,20,99); ardser.printf("\nBad command\n\r"); - printDisp(dispType,"** Bad command ** \n\r"); + printDisp(dispType,"** Bad command ** \n\r"); } sc.commitScreen(); }
--- a/macroDisp.h Sun Aug 16 23:30:57 2015 +0000 +++ b/macroDisp.h Sun Aug 16 23:51:00 2015 +0000 @@ -88,6 +88,20 @@ return ret; } +void bannerDisp(int disptype) +{ + switch (disptype) { + case 0: //oled + oled.clear(); + oled.printf("-_-_ Boot screen _-_-\n\r"); + oled.printf("Nucleo Scorda IO Test\n\r"); + oled.update(); + break; + case 1: //lcd + break; + } +} + void setFontDisp(int disptype, char fontType) { switch (disptype) {
--- a/main.cpp Sun Aug 16 23:30:57 2015 +0000 +++ b/main.cpp Sun Aug 16 23:51:00 2015 +0000 @@ -36,6 +36,7 @@ // display initDisp(dispType); setFontDisp(dispType,'N'); + bannerDisp(dispType); while(1) { ardser.attach(&callback);