diff options
author | Stanley Huang <stanleyhuangyc@gmail.com> | 2014-03-18 22:09:52 +0800 |
---|---|---|
committer | Stanley Huang <stanleyhuangyc@gmail.com> | 2014-03-18 22:09:52 +0800 |
commit | 6aaf937f2c17d713966b3b3d647fa35980a3b8ce (patch) | |
tree | c71bb0080e06b12cd7e2e9e9556678ec7699b06c /libraries/MultiLCD/MultiLCD.h | |
parent | 49882cea4e2cb134c990963110cd5c9714462460 (diff) | |
download | 2021-arduino-obd-6aaf937f2c17d713966b3b3d647fa35980a3b8ce.tar.gz 2021-arduino-obd-6aaf937f2c17d713966b3b3d647fa35980a3b8ce.tar.bz2 2021-arduino-obd-6aaf937f2c17d713966b3b3d647fa35980a3b8ce.zip |
Fix MEGA Logger compiliation issue
Diffstat (limited to 'libraries/MultiLCD/MultiLCD.h')
-rw-r--r-- | libraries/MultiLCD/MultiLCD.h | 48 |
1 files changed, 29 insertions, 19 deletions
diff --git a/libraries/MultiLCD/MultiLCD.h b/libraries/MultiLCD/MultiLCD.h index f0eb566..5dac47f 100644 --- a/libraries/MultiLCD/MultiLCD.h +++ b/libraries/MultiLCD/MultiLCD.h @@ -107,6 +107,25 @@ private: 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 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; +}; + #define TFT_LINE_HEIGHT 8 class LCD_ILI9325D : public LCD_Common, public Print @@ -118,6 +137,11 @@ public: m_y = column; m_x = (uint16_t)line * TFT_LINE_HEIGHT; } + void setXY(uint16_t x, uint16_t y) + { + m_y = x; + m_y = y; + } void setTextColor(uint16_t color) { m_color[1] = color; @@ -172,6 +196,11 @@ public: m_x = column; m_y = (uint16_t)line * TFT_LINE_HEIGHT; } + void setXY(uint16_t x, uint16_t y) + { + m_y = x; + m_y = y; + } void setTextColor(uint16_t color) { m_color[1][0] = color & 0xff; @@ -223,22 +252,3 @@ private: uint16_t m_x; uint16_t m_y; }; - -class LCD_SH1106 : public LCD_Common, public Print -{ -public: - void begin(); - void setCursor(byte column, byte line); - void draw(const PROGMEM byte* buffer, 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; -}; |