27 extern uint8_t s_ssd1306_invertByte;
30 void ssd1306_setRgbColor(uint8_t r, uint8_t g, uint8_t b)
35 void ssd1306_setRgbColor8(uint8_t r, uint8_t g, uint8_t b)
42 ssd1306_lcd.set_block(x, y, w);
48 ssd1306_lcd.send_pixels8( *data );
58 ssd1306_drawBufferPitch8( x, y, w, h, w, data );
63 ssd1306_drawBufferPitch8( x, y, w, h, pitch, data );
68 ssd1306_lcd.set_block(x, y, 0);
69 ssd1306_lcd.send_pixels8( color );
101 this->m_intf.startBlock(x, y, 0);
102 this->m_intf.send( this->m_color );
103 this->m_intf.endBlock();
109 this->m_intf.startBlock(x1, y1, 0);
112 this->m_intf.send( this->m_color );
115 this->m_intf.endBlock();
121 this->m_intf.startBlock(x1, y1, 1);
124 this->m_intf.send( this->m_color );
127 this->m_intf.endBlock();
141 this->m_intf.startBlock(x1, y1, x2 - x1 + 1);
142 uint32_t count = (x2 - x1 + 1) * (y2 - y1 + 1);
145 this->m_intf.send( this->m_color );
147 this->m_intf.endBlock();
153 this->m_intf.startBlock(0, 0, 0);
154 uint32_t count = (uint32_t)this->m_w * (uint32_t)this->m_h;
157 this->m_intf.send( color );
159 this->m_intf.endBlock();
178 uint8_t blackColor = s_ssd1306_invertByte ? this->m_color : 0x00;
179 uint8_t color = s_ssd1306_invertByte ? 0x00 : this->m_color;
180 this->m_intf.startBlock(xpos, ypos, w);
186 uint8_t data = pgm_read_byte( bitmap );
188 this->m_intf.send( color );
190 this->m_intf.send( blackColor );
203 this->m_intf.endBlock();
215 this->m_intf.startBlock(x, y, w);
216 uint32_t count = (w) * (h);
219 this->m_intf.send( pgm_read_byte( bitmap ) );
222 this->m_intf.endBlock();
235 uint8_t blackColor = s_ssd1306_invertByte ? this->m_color : 0x00;
236 uint8_t color = s_ssd1306_invertByte ? 0x00 : this->m_color;
237 this->m_intf.startBlock(xpos, ypos, w);
243 uint8_t data = *buffer;
245 this->m_intf.send( color );
247 this->m_intf.send( blackColor );
260 this->m_intf.endBlock();
266 this->drawBuffer1( x, y, w, h, buf );
278 this->m_intf.startBlock(x, y, w);
279 uint32_t count = (w) * (h);
282 this->m_intf.send( *buffer );
285 this->m_intf.endBlock();
297 uint16_t unicode = this->m_font->unicode16FromUtf8(c);
300 this->m_font->getCharBitmap(unicode, &char_info);
301 uint8_t mode = this->m_textMode;
302 for (uint8_t i = 0; i<(this->m_fontStyle == STYLE_BOLD ? 2: 1); i++)
304 this->drawBitmap1(this->m_cursorX + i,
311 this->m_textMode = mode;
314 (this->m_cursorX > ((
lcdint_t)this->m_w - (
lcdint_t)this->m_font->getHeader().width) ) )
316 (this->m_cursorX > ((
lcdint_t)this->m_w - (
lcdint_t)this->m_font->getHeader().width)) ) )
318 this->m_cursorY += (
lcdint_t)this->m_font->getHeader().height;
320 if ( (this->m_textMode & CANVAS_TEXT_WRAP_LOCAL) &&
321 (this->m_cursorY > ((
lcdint_t)this->m_h - (
lcdint_t)this->m_font->getHeader().height)) )
334 this->m_cursorY += (
lcdint_t)this->m_font->getHeader().height;
343 return printChar( c );
353 this->m_cursorX = xpos;
void drawBuffer4(lcdint_t x, lcdint_t y, lcduint_t w, lcduint_t h, const uint8_t *buffer) __attribute__((noinline))
uint8_t height
char height in pixels
void drawBitmap16(lcdint_t xpos, lcdint_t ypos, lcduint_t w, lcduint_t h, const uint8_t *bitmap)
#define SSD1306_MORE_CHARS_REQUIRED
void fill(uint16_t color)
void drawBitmap8(lcdint_t x, lcdint_t y, lcduint_t w, lcduint_t h, const uint8_t *bitmap)
Draws 8-bit color bitmap in color buffer. Draws 8-bit color bitmap in color buffer.
void drawBuffer1Fast(lcdint_t x, lcdint_t y, lcduint_t w, lcduint_t h, const uint8_t *buffer)
uint8_t printChar(uint8_t c)
void printFixed(lcdint_t xpos, lcdint_t y, const char *ch, EFontStyle style=STYLE_NORMAL) __attribute__((noinline))
void drawHLine(lcdint_t x1, lcdint_t y1, lcdint_t x2)
void fillRect(lcdint_t x1, lcdint_t y1, lcdint_t x2, lcdint_t y2) __attribute__((noinline))
size_t write(uint8_t c) __attribute__((noinline))
void putPixel(lcdint_t x, lcdint_t y) __attribute__((noinline))
void drawVLine(lcdint_t x1, lcdint_t y1, lcdint_t y2)
void drawBitmap4(lcdint_t x, lcdint_t y, lcduint_t w, lcduint_t h, const uint8_t *bitmap) __attribute__((noinline))
Draws 4-bit gray-color bitmap in color buffer. Draws 4-bit gray-color bitmap in color buffer...
uint8_t width
char width in pixels
const uint8_t * glyph
char data, located in progmem.
void drawXBitmap(lcdint_t x, lcdint_t y, lcduint_t w, lcduint_t h, const uint8_t *bitmap)
#define RGB_COLOR8(r, g, b)
void drawBitmap1(lcdint_t x, lcdint_t y, lcduint_t w, lcduint_t h, const uint8_t *bitmap) __attribute__((noinline))
Draws monochrome bitmap in color buffer using color, specified via setColor() method Draws monochrome...
uint8_t spacing
additional spaces after char in pixels
void drawBuffer8(lcdint_t x, lcdint_t y, lcduint_t w, lcduint_t h, const uint8_t *buffer)
void drawBuffer1(lcdint_t x, lcdint_t y, lcduint_t w, lcduint_t h, const uint8_t *buffer) __attribute__((noinline))
#define ssd1306_swap_data(a, b, type)
void drawBuffer16(lcdint_t xpos, lcdint_t ypos, lcduint_t w, lcduint_t h, const uint8_t *buffer) __attribute__((noinline))