From 33c41f4a95707da1c6e11932c33a1792902fcec4 Mon Sep 17 00:00:00 2001 From: Stanley Huang Date: Tue, 2 Apr 2013 16:00:42 +0800 Subject: add write() for OLED --- obdlogger/MultiLCD.cpp | 6 ++++++ obdlogger/MultiLCD.h | 1 + 2 files changed, 7 insertions(+) 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(); -- cgit v1.2.3