diff options
author | Stanley Huang <stanleyhuangyc@gmail.com> | 2013-06-10 13:21:54 +0800 |
---|---|---|
committer | Stanley Huang <stanleyhuangyc@gmail.com> | 2013-06-10 13:21:54 +0800 |
commit | f99f21926e515cf93e2af35eb82808f337998738 (patch) | |
tree | ba931f65405704517acc543a4e96fc521fe3212e /obdlogger/MultiLCD.h | |
parent | 47c6ff979fea8051c02fb38fe99c0021880a4ed8 (diff) | |
download | 2021-arduino-obd-f99f21926e515cf93e2af35eb82808f337998738.tar.gz 2021-arduino-obd-f99f21926e515cf93e2af35eb82808f337998738.tar.bz2 2021-arduino-obd-f99f21926e515cf93e2af35eb82808f337998738.zip |
update OBD logger
Diffstat (limited to 'obdlogger/MultiLCD.h')
-rw-r--r-- | obdlogger/MultiLCD.h | 84 |
1 files changed, 0 insertions, 84 deletions
diff --git a/obdlogger/MultiLCD.h b/obdlogger/MultiLCD.h deleted file mode 100644 index 5a8f7e3..0000000 --- a/obdlogger/MultiLCD.h +++ /dev/null @@ -1,84 +0,0 @@ -extern const PROGMEM unsigned char font16x32[][32]; -extern const PROGMEM unsigned char font5x8[][5]; - -#include "PCD8544.h" - -class LCD_Common -{ -public: - virtual void backlight(bool on) {} - virtual byte getLines() = 0; - virtual byte getCols() = 0; - virtual void changeLine() {} -}; - -class LCD_PCD8544 : public LCD_Common, public PCD8544 -{ -public: - byte getLines() { return 6; } - byte getCols() { return 14; } - void printLarge(const char* s); - void backlight(bool on) - { - pinMode(7, OUTPUT); - digitalWrite(7, on ? HIGH : LOW); - } - void clearLine(byte line) - { - setCursor(0, line); - for (byte i = 14; i > 0; i--) write(' '); - } -}; - -#include "ZtLib.h" - -#define OLED_ADDRESS 0x27 - -class LCD_OLED : public LCD_Common, public ZtLib -{ -public: - byte getLines() { return 4; } - byte getCols() { return 16; } - void setCursor(byte column, byte line) - { - m_column = column << 3; - m_line = line << 1; - } - void changeLine() - { - m_column = 0; - m_line += 2; - } - void write(char c); - void print(const char* s); - void printLarge(const char* s); - void clear(); - void begin(); - void backlight(bool on) {} - void clearLine(byte line) - { - setCursor(0, line); - for (byte i = 16; i > 0; i--) write(' '); - } -private: - unsigned char m_column; - unsigned char m_line; -}; - -#include "LCD4Bit_mod.h" -class LCD_1602 : public LCD_Common, public LCD4Bit_mod -{ -public: - byte getLines() { return 2; } - byte getCols() { return 16; } - void printLarge(const char* s) - { - print(s); - } - void clearLine(byte line) - { - setCursor(0, line); - for (byte i = 16; i > 0; i--) write(' '); - } -}; - |