summaryrefslogtreecommitdiff
path: root/obdlogger/MicroLCD.h
diff options
context:
space:
mode:
authorStanley Huang <stanleyhuangyc@gmail.com>2014-02-24 01:47:57 +0800
committerStanley Huang <stanleyhuangyc@gmail.com>2014-02-24 01:47:57 +0800
commitfe25cca198cc468ae12d9cbf320c0d273c630016 (patch)
treef5acba330779777d973ddc29c52256b48e26e36d /obdlogger/MicroLCD.h
parent91335d13a15c13cbb1fad11b35e89d14ebd8e903 (diff)
download2021-arduino-obd-fe25cca198cc468ae12d9cbf320c0d273c630016.tar.gz
2021-arduino-obd-fe25cca198cc468ae12d9cbf320c0d273c630016.tar.bz2
2021-arduino-obd-fe25cca198cc468ae12d9cbf320c0d273c630016.zip
Update OBD logger
Diffstat (limited to 'obdlogger/MicroLCD.h')
-rw-r--r--obdlogger/MicroLCD.h21
1 files changed, 20 insertions, 1 deletions
diff --git a/obdlogger/MicroLCD.h b/obdlogger/MicroLCD.h
index 1206414..6e1d455 100644
--- a/obdlogger/MicroLCD.h
+++ b/obdlogger/MicroLCD.h
@@ -6,7 +6,7 @@
*************************************************************************/
#if !defined(__AVR_ATmega2560__) && !defined(__AVR_ATmega1280__) && !defined(__AVR_ATmega644P__)
-#define MEMORY_SAVING
+//#define MEMORY_SAVING
#endif
typedef enum {
@@ -73,3 +73,22 @@ private:
byte m_col;
byte m_row;
};
+
+class LCD_SH1106 : public LCD_Common, public Print
+{
+public:
+ void begin();
+ void setCursor(byte column, byte line);
+ void draw(const PROGMEM byte* buffer, byte x, byte y, byte width, byte height);
+ size_t write(uint8_t c);
+ void clear(byte x = 0, byte y = 0, byte width = 128, byte height = 64);
+ void clearLine(byte line);
+ byte getLines() { return 21; }
+ byte getCols() { return 8; }
+private:
+ void WriteCommand(unsigned char ins);
+ void WriteData(unsigned char dat);
+ void writeDigit(byte n);
+ byte m_col;
+ byte m_row;
+};