Fork of LCD-Window which works with Enhanced TextLCD from Wim
Fork of LcdWindow by
Diff: textlcdadapter.cpp
- Revision:
- 10:d40c70908bf0
- Parent:
- 4:aa08e82834dc
- Child:
- 12:393329d0e050
--- a/textlcdadapter.cpp Tue Feb 22 22:57:44 2011 +0000
+++ b/textlcdadapter.cpp Mon Jan 04 20:22:17 2016 +0000
@@ -25,13 +25,23 @@
#include <stdarg.h>
-TextLCDAdapter::TextLCDAdapter(TextLCD *lcd) {
+TextLCDAdapter::TextLCDAdapter(TextLCD_Base *lcd) {
_lcd=lcd;
}
void TextLCDAdapter::clear() {
_lcd->cls();
}
+void TextLCDAdapter::writeText(const unsigned int column, const unsigned int row, const char text[]){
+ _lcd->locate(column,row);
+ int i=0;
+ while(text[i]!=0)
+ {
+ _lcd->putc(text[i]);
+ i++;
+ }
+}
+
int TextLCDAdapter::getRows() {
return _lcd->rows();
}
@@ -39,6 +49,8 @@
return _lcd->columns();
}
void TextLCDAdapter::character(int column, int row, int c) {
+ _lcd->locate(column,row);
+ _lcd->putc(c);
}
int TextLCDAdapter::putc(int c) {
