summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStanley Huang <stanleyhuangyc@gmail.com>2013-09-10 13:04:06 +0800
committerStanley Huang <stanleyhuangyc@gmail.com>2013-09-10 13:04:06 +0800
commit10435db001e2b1b7ee8cf64bcc732f416efde55e (patch)
treebfeb2411f233664f65d7372bb81e57b513a862a4
parent2a3fb81e92fe47db3630243d09aa9b5e02842da2 (diff)
download2021-arduino-obd-10435db001e2b1b7ee8cf64bcc732f416efde55e.tar.gz
2021-arduino-obd-10435db001e2b1b7ee8cf64bcc732f416efde55e.tar.bz2
2021-arduino-obd-10435db001e2b1b7ee8cf64bcc732f416efde55e.zip
update MultiLCD library
-rw-r--r--libraries/MultiLCD/MultiLCD.cpp26
1 files changed, 13 insertions, 13 deletions
diff --git a/libraries/MultiLCD/MultiLCD.cpp b/libraries/MultiLCD/MultiLCD.cpp
index 5668065..2d46b59 100644
--- a/libraries/MultiLCD/MultiLCD.cpp
+++ b/libraries/MultiLCD/MultiLCD.cpp
@@ -199,7 +199,7 @@ size_t LCD_SSD1306::write(uint8_t c)
if (c > 0x20 && c < 0x7f) {
c -= 0x21;
for (byte i = 0; i < 5; i++) {
- byte d = pgm_read_byte_near(&font5x8[c][i]);
+ byte d = pgm_read_byte(&font5x8[c][i]);
Wire.write(d);
if (m_flags & FLAG_PIXEL_DOUBLE_H) Wire.write(d);
}
@@ -227,7 +227,7 @@ size_t LCD_SSD1306::write(uint8_t c)
Wire.beginTransmission(_i2caddr);
Wire.write(0x40);
for (byte i = 0; i <= 14; i += 2) {
- byte d = pgm_read_byte_near(&font8x16_terminal[c][i]);
+ byte d = pgm_read_byte(&font8x16_terminal[c][i]);
Wire.write(d);
if (m_flags & FLAG_PIXEL_DOUBLE_H) Wire.write(d);
}
@@ -240,7 +240,7 @@ size_t LCD_SSD1306::write(uint8_t c)
Wire.beginTransmission(_i2caddr);
Wire.write(0x40);
for (byte i = 1; i <= 15; i += 2) {
- byte d = pgm_read_byte_near(&font8x16_terminal[c][i]);
+ byte d = pgm_read_byte(&font8x16_terminal[c][i]);
Wire.write(d);
if (m_flags & FLAG_PIXEL_DOUBLE_H) Wire.write(d);
}
@@ -288,7 +288,7 @@ void LCD_SSD1306::writeDigit(byte n)
if (n <= 9) {
n += '0' - 0x21;
for (byte i = 0; i < 5; i++) {
- Wire.write(pgm_read_byte_near(&font5x8[n][i]));
+ Wire.write(pgm_read_byte(&font5x8[n][i]));
}
Wire.write(0);
} else {
@@ -309,7 +309,7 @@ void LCD_SSD1306::writeDigit(byte n)
Wire.beginTransmission(_i2caddr);
Wire.write(0x40);
for (byte i = 0; i <= 14; i += 2) {
- byte d = pgm_read_byte_near(&font8x16_terminal[n][i]);
+ byte d = pgm_read_byte(&font8x16_terminal[n][i]);
Wire.write(d);
if (m_flags & FLAG_PIXEL_DOUBLE_H) Wire.write(d);
}
@@ -322,7 +322,7 @@ void LCD_SSD1306::writeDigit(byte n)
Wire.beginTransmission(_i2caddr);
Wire.write(0x40);
for (byte i = 1; i <= 15; i += 2) {
- byte d = pgm_read_byte_near(&font8x16_terminal[n][i]);
+ byte d = pgm_read_byte(&font8x16_terminal[n][i]);
Wire.write(d);
if (m_flags & FLAG_PIXEL_DOUBLE_H) Wire.write(d);
}
@@ -356,7 +356,7 @@ void LCD_SSD1306::writeDigit(byte n)
Wire.write(0x40);
if (n <= 9) {
for (byte i = 0; i < 8; i++) {
- Wire.write(pgm_read_byte_near(&digits8x8[n][i]));
+ Wire.write(pgm_read_byte(&digits8x8[n][i]));
}
} else {
for (byte i = 0; i < 8; i++) {
@@ -376,7 +376,7 @@ void LCD_SSD1306::writeDigit(byte n)
Wire.beginTransmission(_i2caddr);
Wire.write(0x40);
for (i = 0; i < 16; i ++) {
- byte d = pgm_read_byte_near(&digits16x16[n][i]);
+ byte d = pgm_read_byte(&digits16x16[n][i]);
Wire.write(d);
if (m_flags & FLAG_PIXEL_DOUBLE_H) Wire.write(d);
}
@@ -389,7 +389,7 @@ void LCD_SSD1306::writeDigit(byte n)
Wire.beginTransmission(_i2caddr);
Wire.write(0x40);
for (; i < 32; i ++) {
- byte d = pgm_read_byte_near(&digits16x16[n][i]);
+ byte d = pgm_read_byte(&digits16x16[n][i]);
Wire.write(d);
if (m_flags & FLAG_PIXEL_DOUBLE_H) Wire.write(d);
}
@@ -428,7 +428,7 @@ void LCD_SSD1306::writeDigit(byte n)
Wire.beginTransmission(_i2caddr);
Wire.write(0x40);
for (i = 0; i < 16; i ++) {
- byte d = pgm_read_byte_near(&digits16x24[n][i * 3]);
+ byte d = pgm_read_byte(&digits16x24[n][i * 3]);
Wire.write(d);
if (m_flags & FLAG_PIXEL_DOUBLE_H) Wire.write(d);
}
@@ -441,7 +441,7 @@ void LCD_SSD1306::writeDigit(byte n)
Wire.beginTransmission(_i2caddr);
Wire.write(0x40);
for (i = 0; i < 16; i ++) {
- byte d = pgm_read_byte_near(&digits16x24[n][i * 3 + 1]);
+ byte d = pgm_read_byte(&digits16x24[n][i * 3 + 1]);
Wire.write(d);
if (m_flags & FLAG_PIXEL_DOUBLE_H) Wire.write(d);
}
@@ -454,7 +454,7 @@ void LCD_SSD1306::writeDigit(byte n)
Wire.beginTransmission(_i2caddr);
Wire.write(0x40);
for (i = 0; i < 16; i ++) {
- byte d = pgm_read_byte_near(&digits16x24[n][i * 3 + 2]);
+ byte d = pgm_read_byte(&digits16x24[n][i * 3 + 2]);
Wire.write(d);
if (m_flags & FLAG_PIXEL_DOUBLE_H) Wire.write(d);
}
@@ -522,7 +522,7 @@ void LCD_SSD1306::draw(const PROGMEM byte* buffer, byte x, byte y, byte width, b
Wire.beginTransmission(_i2caddr);
Wire.write(0x40);
for (byte k = 0; k < width; k++, p++) {
- Wire.write(pgm_read_byte_near(p));
+ Wire.write(pgm_read_byte(p));
}
Wire.endTransmission();
}