Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: mbed BufferedSerial AserialIOFuncLib SSD1306 TerminalPlusV2
Fork of SerialIO by
Diff: macroDisp.h
- Revision:
- 11:b57dee0f344e
- Parent:
- 10:5c406bde1edf
- Child:
- 17:7c8c37fbec9f
--- a/macroDisp.h Sun Aug 16 23:05:12 2015 +0000
+++ b/macroDisp.h Sun Aug 16 23:12:06 2015 +0000
@@ -77,9 +77,38 @@
bool ret=true;
switch (disptype) {
case 0: //oled
+ oled.initialise();
+ oled.clear();
+ oled.set_contrast(255); // max contrast
+ oled.update();
break;
case 1: //lcd
break;
}
return ret;
}
+
+void setFontDisp(int disptype, char fontType)
+{
+ switch (disptype) {
+ case 0: //oled
+ if (fontType=='N') oled.set_font(standard_font, 6);
+ if (fontType=='B') oled.set_font(bold_font, 8);
+ if (fontType=='D') oled.set_double_height_text(1);
+ break;
+ case 1: //lcd
+ break;
+ }
+}
+
+void printDisp(int disptype, char *format)
+{
+ switch (disptype) {
+ case 0: //oled
+ oled.printf(format);
+ oled.update();
+ break;
+ case 1: //lcd
+ break;
+ }
+}
\ No newline at end of file
