tiz
Dependencies: TextLCD X_NUCLEO_IKS01A1 func mbed-src mbed
Fork of mas by
func/Display.cpp@5:100310ea8fba, 2016-08-23 (annotated)
- Committer:
- herenvarno
- Date:
- Tue Aug 23 15:59:59 2016 +0000
- Revision:
- 5:100310ea8fba
- Parent:
- 3:4355890e55b4
final
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
herenvarno | 3:4355890e55b4 | 1 | #include "Display.h" |
herenvarno | 3:4355890e55b4 | 2 | |
herenvarno | 3:4355890e55b4 | 3 | Display::Display() |
herenvarno | 3:4355890e55b4 | 4 | { |
herenvarno | 3:4355890e55b4 | 5 | this->__lcd = new TextLCD(PA_6, PA_7, PB_6, PC_7, PA_9, PA_8, TextLCD::LCD16x2); |
herenvarno | 3:4355890e55b4 | 6 | } |
herenvarno | 3:4355890e55b4 | 7 | |
herenvarno | 3:4355890e55b4 | 8 | void Display::show(char *buffer0, char *buffer1) |
herenvarno | 3:4355890e55b4 | 9 | { |
herenvarno | 3:4355890e55b4 | 10 | this->__lcd->cls(); |
herenvarno | 3:4355890e55b4 | 11 | if(buffer0) |
herenvarno | 3:4355890e55b4 | 12 | this->__lcd->locate(0,0); |
herenvarno | 3:4355890e55b4 | 13 | this->__lcd->printf("%s", buffer0); |
herenvarno | 3:4355890e55b4 | 14 | if(buffer1) |
herenvarno | 3:4355890e55b4 | 15 | this->__lcd->locate(0,1); |
herenvarno | 3:4355890e55b4 | 16 | this->__lcd->printf("%s", buffer1); |
herenvarno | 3:4355890e55b4 | 17 | } |