SSD1306 OLED display driver
1.5.0
This library is developed to control SSD1306/SSD1331 RGB i2c/spi OLED displays and spi PCD8544 LED display
|
#include <canvas.h>
Public Member Functions | |
NanoCanvas8 () | |
NanoCanvas8 (lcdint_t w, lcdint_t h, uint8_t *bytes) | |
void | begin (lcdint_t w, lcdint_t h, uint8_t *bytes) |
void | setOffset (lcdint_t ox, lcdint_t oy) |
void | putPixel (lcdint_t x, lcdint_t y) |
void | putPixel (const NanoPoint &p) |
void | drawVLine (lcdint_t x1, lcdint_t y1, lcdint_t y2) |
void | drawHLine (lcdint_t x1, lcdint_t y1, lcdint_t x2) |
void | drawRect (lcdint_t x1, lcdint_t y1, lcdint_t x2, lcdint_t y2) |
void | drawRect (const NanoRect &rect) |
void | fillRect (lcdint_t x1, lcdint_t y1, lcdint_t x2, lcdint_t y2) |
void | fillRect (const NanoRect &rect) |
void | drawBitmap1 (lcdint_t x, lcdint_t y, lcduint_t w, lcduint_t h, const uint8_t *bitmap) |
Draws monochrome bitmap in color buffer using color, specified via setColor() method Draws monochrome bitmap in color buffer using color, specified via setColor() method. More... | |
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. More... | |
void | clear () |
void | write (uint8_t c) |
void | printChar (uint8_t c) |
void | printFixed (lcdint_t xpos, lcdint_t y, const char *ch) |
void | printFixedPgm (lcdint_t xpos, lcdint_t y, const char *ch) |
void | setMode (uint8_t modeFlags) |
Sets canvas drawing mode Sets canvas drawing mode. The set flags define transparency of output images. More... | |
void | setColor (uint8_t color) |
void | blt (lcdint_t x, lcdint_t y) |
void | blt () |
Public Attributes | |
NanoPoint | offset |
Static Public Attributes | |
static const uint8_t | BITS_PER_PIXEL = 8 |
NanoCanvas8 represents objects for drawing in memory buffer NanoCanvas8 represents each pixel as single byte with RGB bits: RRRGGGBB For details refer to SSD1331 datasheet
|
inline |
Draws canvas on the LCD display
x | - horizontal position in pixels |
y | - vertical position in blocks (pixels/8) |
Definition at line 326 of file canvas.cpp.
void NanoCanvas8::blt | ( | ) |
Draws canvas on the LCD display using offset values.
Definition at line 331 of file canvas.cpp.
void NanoCanvas8::clear | ( | ) |
Clears canvas
Definition at line 316 of file canvas.cpp.
void NanoCanvas8::drawBitmap1 | ( | lcdint_t | x, |
lcdint_t | y, | ||
lcduint_t | w, | ||
lcduint_t | h, | ||
const uint8_t * | bitmap | ||
) |
Draws monochrome bitmap in color buffer using color, specified via setColor() method Draws monochrome bitmap in color buffer using color, specified via setColor() method.
x | - position X in pixels |
y | - position Y in pixels |
w | - width in pixels |
h | - height in pixels |
bitmap | - monochrome bitmap data, located in flash |
Definition at line 155 of file canvas.cpp.
void NanoCanvas8::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.
x | - position X in pixels |
y | - position Y in pixels |
w | - width in pixels |
h | - height in pixels |
bitmap | - 8-bit color bitmap data, located in flash |
Definition at line 213 of file canvas.cpp.
Draws horizontal or vertical line
x1 | - position X |
y1 | - position Y |
x2 | - position X |
Definition at line 82 of file canvas.cpp.
Draws rectangle
x1 | - position X |
y1 | - position Y |
x2 | - position X |
y2 | - position Y |
Definition at line 103 of file canvas.cpp.
void NanoCanvas8::drawRect | ( | const NanoRect & | rect | ) |
Draws rectangle
rect | - structure, describing rectangle area |
Definition at line 111 of file canvas.cpp.
Draws horizontal or vertical line
x1 | - position X |
y1 | - position Y |
y2 | - position Y |
Definition at line 60 of file canvas.cpp.
Fills rectangle area
x1 | - position X |
y1 | - position Y |
x2 | - position X |
y2 | - position Y |
Definition at line 116 of file canvas.cpp.
void NanoCanvas8::fillRect | ( | const NanoRect & | rect | ) |
Fills rectangle area
rect | - structure, describing rectangle area |
Definition at line 148 of file canvas.cpp.
void NanoCanvas8::printChar | ( | uint8_t | c | ) |
Draws single character to canvas
c | - character code to print |
Definition at line 259 of file canvas.cpp.
Print text at specified position to canvas
xpos | - position in pixels |
y | - position in pixels |
ch | - pointer to NULL-terminated string. |
Definition at line 292 of file canvas.cpp.
Print text at specified position to canvas
xpos | - position in pixels |
y | - position in pixels |
ch | - pointer to NULL-terminated string, located in flash |
Definition at line 303 of file canvas.cpp.
Draws pixel on specified position
x | - position X |
y | - position Y |
Definition at line 45 of file canvas.cpp.
void NanoCanvas8::putPixel | ( | const NanoPoint & | p | ) |
Draws pixel on specified position
p | - NanoPoint |
Definition at line 55 of file canvas.cpp.
|
inline |
|
inline |
void NanoCanvas8::write | ( | uint8_t | c | ) |
Writes single character to canvas
c | - character code to print |
Definition at line 269 of file canvas.cpp.
|
static |
NanoPoint NanoCanvas8::offset |
Fixed offset for all operation of NanoCanvas8 in pixels