diff options
Diffstat (limited to 'libraries/MultiLCD/PCD8544.cpp')
-rw-r--r-- | libraries/MultiLCD/PCD8544.cpp | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/libraries/MultiLCD/PCD8544.cpp b/libraries/MultiLCD/PCD8544.cpp index 9bd62c5..6b339fe 100644 --- a/libraries/MultiLCD/PCD8544.cpp +++ b/libraries/MultiLCD/PCD8544.cpp @@ -185,19 +185,20 @@ void PCD8544::createChar(unsigned char chr, const unsigned char *glyph) } -#if ARDUINO < 100 -void PCD8544::write(uint8_t chr) -#else size_t PCD8544::write(uint8_t chr) -#endif { // ASCII 7-bit only... - if (chr >= 0x80) { -#if ARDUINO < 100 - return; -#else + if (chr >= 0x7f) { + return 0; + } + + if (chr == '\n') { + column = 0; + line = (line + 1) % (PCD8544_HEIGHT/9 + 1); + return 0; + } else if (chr == '\r') { + column = 0; return 0; -#endif } const unsigned char *glyph; |