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 | |
NanoCanvas16 () | |
NanoCanvas16 (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 (uint16_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 = 16 |
NanoCanvas16 represents objects for drawing in memory buffer NanoCanvas16 represents each pixel as 2-bytes with RGB bits: RRRRRGGG-GGGBBBBB For details refer to SSD1351 datasheet
|
inline |
Draws canvas on the LCD display
x | - horizontal position in pixels |
y | - vertical position in blocks (pixels/8) |
Definition at line 925 of file canvas.cpp.
void NanoCanvas16::blt | ( | ) |
Draws canvas on the LCD display using offset values.
Definition at line 930 of file canvas.cpp.
void NanoCanvas16::clear | ( | ) |
Clears canvas
Definition at line 915 of file canvas.cpp.
void NanoCanvas16::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 745 of file canvas.cpp.
void NanoCanvas16::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 809 of file canvas.cpp.
Draws horizontal or vertical line
x1 | - position X |
y1 | - position Y |
x2 | - position X |
Definition at line 670 of file canvas.cpp.
Draws rectangle
x1 | - position X |
y1 | - position Y |
x2 | - position X |
y2 | - position Y |
Definition at line 692 of file canvas.cpp.
void NanoCanvas16::drawRect | ( | const NanoRect & | rect | ) |
Draws rectangle
rect | - structure, describing rectangle area |
Definition at line 700 of file canvas.cpp.
Draws horizontal or vertical line
x1 | - position X |
y1 | - position Y |
y2 | - position Y |
Definition at line 647 of file canvas.cpp.
Fills rectangle area
x1 | - position X |
y1 | - position Y |
x2 | - position X |
y2 | - position Y |
Definition at line 705 of file canvas.cpp.
void NanoCanvas16::fillRect | ( | const NanoRect & | rect | ) |
Fills rectangle area
rect | - structure, describing rectangle area |
Definition at line 738 of file canvas.cpp.
void NanoCanvas16::printChar | ( | uint8_t | c | ) |
Draws single character to canvas
c | - character code to print |
Definition at line 858 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 891 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 902 of file canvas.cpp.
Draws pixel on specified position
x | - position X |
y | - position Y |
Definition at line 631 of file canvas.cpp.
void NanoCanvas16::putPixel | ( | const NanoPoint & | p | ) |
Draws pixel on specified position
p | - NanoPoint |
Definition at line 642 of file canvas.cpp.
|
inline |
|
inline |
void NanoCanvas16::write | ( | uint8_t | c | ) |
Writes single character to canvas
c | - character code to print |
Definition at line 868 of file canvas.cpp.
|
static |
NanoPoint NanoCanvas16::offset |
Fixed offset for all operation of NanoCanvas8 in pixels