summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStanley Huang <stanleyhuangyc@gmail.com>2013-04-02 16:00:42 +0800
committerStanley Huang <stanleyhuangyc@gmail.com>2013-04-02 16:00:42 +0800
commit33c41f4a95707da1c6e11932c33a1792902fcec4 (patch)
tree808004d187c5d12aa33c7bdd156de9cf3b7685b6
parentf2a3687634dfcf1ad7b8ea5ae241cefffbb37614 (diff)
download2021-arduino-obd-33c41f4a95707da1c6e11932c33a1792902fcec4.tar.gz
2021-arduino-obd-33c41f4a95707da1c6e11932c33a1792902fcec4.tar.bz2
2021-arduino-obd-33c41f4a95707da1c6e11932c33a1792902fcec4.zip
add write() for OLED
-rw-r--r--obdlogger/MultiLCD.cpp6
-rw-r--r--obdlogger/MultiLCD.h1
2 files changed, 7 insertions, 0 deletions
diff --git a/obdlogger/MultiLCD.cpp b/obdlogger/MultiLCD.cpp
index 1442ebd..06500fa 100644
--- a/obdlogger/MultiLCD.cpp
+++ b/obdlogger/MultiLCD.cpp
@@ -114,6 +114,12 @@ const PROGMEM unsigned char font5x8[][5] = {
{ 0x00, 0x00, 0x00, 0x00, 0x00 } // 7f
};
+void LCD_OLED::write(char c)
+{
+ char s[2] = {c};
+ ScI2cMxDisplay8x16Str(OLED_ADDRESS, m_line, m_column, s);
+}
+
void LCD_OLED::print(const char* s)
{
ScI2cMxDisplay8x16Str(OLED_ADDRESS, m_line, m_column, s);
diff --git a/obdlogger/MultiLCD.h b/obdlogger/MultiLCD.h
index 25137d1..2a10356 100644
--- a/obdlogger/MultiLCD.h
+++ b/obdlogger/MultiLCD.h
@@ -24,6 +24,7 @@ public:
m_column = column << 3;
m_line = line << 1;
}
+ void write(char c);
void print(const char* s);
void printLarge(const char* s);
void clear();