|
LCDGFX LCD display driver
1.1.5
This library is developed to control SSD1306/SSD1325/SSD1327/SSD1331/SSD1351/IL9163/PCD8554 RGB i2c/spi LED displays
|
#include <display.h>


Public Member Functions | |
| void | putPixel (lcdint_t x, lcdint_t y) __attribute__((noinline)) |
| void | drawVLine (lcdint_t x1, lcdint_t y1, lcdint_t y2) |
| 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)) |
| void | drawXBitmap (lcdint_t x, lcdint_t y, lcduint_t w, lcduint_t h, const uint8_t *bitmap) |
| 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 bitmap in color buffer using color, specified via setColor() method. More... | |
| 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. 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 | drawBitmap16 (lcdint_t xpos, lcdint_t ypos, lcduint_t w, lcduint_t h, const uint8_t *bitmap) |
| void | drawBuffer1 (lcdint_t x, lcdint_t y, lcduint_t w, lcduint_t h, const uint8_t *buffer) __attribute__((noinline)) |
| void | drawBuffer1Fast (lcdint_t x, lcdint_t y, lcduint_t w, lcduint_t h, const uint8_t *buffer) |
| void | drawBuffer4 (lcdint_t x, lcdint_t y, lcduint_t w, lcduint_t h, const uint8_t *buffer) __attribute__((noinline)) |
| void | drawBuffer8 (lcdint_t x, lcdint_t y, lcduint_t w, lcduint_t h, const uint8_t *buffer) |
| void | drawBuffer16 (lcdint_t xpos, lcdint_t ypos, lcduint_t w, lcduint_t h, const uint8_t *buffer) __attribute__((noinline)) |
| void | clear () |
| void | fill (uint16_t color) |
| uint8_t | printChar (uint8_t c) |
| size_t | write (uint8_t c) __attribute__((noinline)) |
| void | printFixed (lcdint_t xpos, lcdint_t y, const char *ch, EFontStyle style=STYLE_NORMAL) __attribute__((noinline)) |
| void | printFixedN (lcdint_t xpos, lcdint_t y, const char *ch, EFontStyle style, uint8_t factor) __attribute__((noinline)) |
Public Member Functions inherited from NanoDisplayBase< I > | |
| NanoDisplayBase (I &intf) | |
| const NanoPoint | offsetEnd () const |
| const NanoRect | rect () const |
| lcduint_t | width () |
| lcduint_t | height () |
| void | swapDimensions () |
| void | setColor (uint16_t color) |
| uint16_t | getColor () |
| void | setBackground (uint16_t color) |
| void | invertColors () |
| I & | getInterface () |
| void | setFont (NanoFont &font) |
| void | setFontSpacing (uint8_t spacing) |
| NanoFont & | getFont () |
| void | setFixedFont (const uint8_t *progmemFont) |
| void | setFixedFont (const uint8_t *progmemFont, const uint8_t *secondaryFont) |
| void | setFreeFont (const uint8_t *progmemFont, const uint8_t *secondaryFont=nullptr) |
| void | setTextCursor (lcdint_t x, lcdint_t y) |
Static Public Attributes | |
| static const uint8_t | BITS_PER_PIXEL = 1 |
Additional Inherited Members | |
Protected Attributes inherited from NanoDisplayBase< I > | |
| lcduint_t | m_w = 0 |
| width of NanoCanvas area in pixels | |
| lcduint_t | m_h = 0 |
| height of NanoCanvas area in pixels | |
| lcduint_t | m_p = 0 |
| number of bits, used by width value: 3 equals to 8 pixels width | |
| lcdint_t | m_cursorX = 0 |
| current X cursor position for text output | |
| lcdint_t | m_cursorY = 0 |
| current Y cursor position for text output | |
| uint8_t | m_textMode = 0 |
| Flags for current NanoCanvas mode. | |
| EFontStyle | m_fontStyle = STYLE_NORMAL |
| currently active font style | |
| uint16_t | m_color = 0xFFFF |
| current foreground color | |
| uint16_t | m_bgColor = 0x0000 |
| current background color | |
| NanoFont * | m_font = nullptr |
| currently set font | |
| I & | m_intf |
| communication interface with the display | |
NanoDisplayOps16 is template class for 16-bit operations.
| void NanoDisplayOps16< I >::clear | ( | ) |
Clears canvas
Definition at line 232 of file ssd1306_16bit.inl.
| void NanoDisplayOps16< I >::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 244 of file ssd1306_16bit.inl.
| void NanoDisplayOps16< I >::drawBitmap16 | ( | lcdint_t | xpos, |
| lcdint_t | ypos, | ||
| lcduint_t | w, | ||
| lcduint_t | h, | ||
| const uint8_t * | bitmap | ||
| ) |
Draw 16-bit color bitmap, located in Flash, directly to OLED display GDRAM. Each pixel of the bitmap is expected in 5-6-5 format.
| xpos | start horizontal position in pixels |
| ypos | start vertical position in pixels |
| w | bitmap width in pixels |
| h | bitmap height in pixels |
| bitmap | pointer to Flash data, containing 16-bit color bitmap. |
Definition at line 303 of file ssd1306_16bit.inl.
| void NanoDisplayOps16< I >::drawBitmap4 | ( | lcdint_t | x, |
| lcdint_t | y, | ||
| lcduint_t | w, | ||
| lcduint_t | h, | ||
| const uint8_t * | bitmap | ||
| ) |
Draws 4-bit gray-color bitmap in color buffer. Draws 4-bit gray-color bitmap in color buffer.
| x | - position X in pixels |
| y | - position Y in pixels |
| w | - width in pixels |
| h | - height in pixels |
| bitmap | - 4-bit gray-color bitmap data, located in flash |
Definition at line 282 of file ssd1306_16bit.inl.
| void NanoDisplayOps16< I >::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 288 of file ssd1306_16bit.inl.
| void NanoDisplayOps16< I >::drawBuffer1 | ( | lcdint_t | x, |
| lcdint_t | y, | ||
| lcduint_t | w, | ||
| lcduint_t | h, | ||
| const uint8_t * | buffer | ||
| ) |
Draws bitmap, located in RAM, on the display Each byte represents 8 vertical pixels.
| x | horizontal position in pixels |
| y | vertical position in pixels |
| w | width of bitmap in pixels |
| h | height of bitmap in pixels (must be divided by 8) |
| buffer | pointer to data, located in SRAM: each byte represents 8 vertical pixels. |
Definition at line 317 of file ssd1306_16bit.inl.
| void NanoDisplayOps16< I >::drawBuffer16 | ( | lcdint_t | xpos, |
| lcdint_t | ypos, | ||
| lcduint_t | w, | ||
| lcduint_t | h, | ||
| const uint8_t * | buffer | ||
| ) |
Draws 16-bit bitmap, located in RAM, on the display Each pixel occupies 2 bytes (5-6-5 format): refer to RGB_COLOR16 to understand RGB scheme, being used.
| xpos | horizontal position in pixels |
| ypos | vertical position in pixels |
| w | width of bitmap in pixels |
| h | height of bitmap in pixels |
| buffer | pointer to data, located in RAM. |
Definition at line 382 of file ssd1306_16bit.inl.
| void NanoDisplayOps16< I >::drawBuffer1Fast | ( | lcdint_t | x, |
| lcdint_t | y, | ||
| lcduint_t | w, | ||
| lcduint_t | h, | ||
| const uint8_t * | buffer | ||
| ) |
Implements the same behavior as drawBuffer1, but much faster. This method has some limitations
| x | horizontal position in pixels |
| y | vertical position in pixels |
| w | width of bitmap in pixels |
| h | height of bitmap in pixels (must be divided by 8) |
| buffer | pointer to data, located in SRAM: each byte represents 8 vertical pixels. |
Definition at line 355 of file ssd1306_16bit.inl.
| void NanoDisplayOps16< I >::drawBuffer4 | ( | lcdint_t | x, |
| lcdint_t | y, | ||
| lcduint_t | w, | ||
| lcduint_t | h, | ||
| const uint8_t * | buffer | ||
| ) |
Draws 4-bit bitmap, located in RAM, on the display Each byte represents two pixels in 4-4 format: refer to GRAY_COLOR4 to understand scheme, being used.
| x | horizontal position in pixels |
| y | vertical position in pixels |
| w | width of bitmap in pixels |
| h | height of bitmap in pixels |
| buffer | pointer to data, located in SRAM. |
Definition at line 361 of file ssd1306_16bit.inl.
| void NanoDisplayOps16< I >::drawBuffer8 | ( | lcdint_t | x, |
| lcdint_t | y, | ||
| lcduint_t | w, | ||
| lcduint_t | h, | ||
| const uint8_t * | buffer | ||
| ) |
Draws 8-bit bitmap, located in RAM, on the display Each byte represents one pixel in 2-2-3 format: refer to RGB_COLOR8 to understand RGB scheme, being used.
| x | horizontal position in pixels |
| y | vertical position in pixels |
| w | width of bitmap in pixels |
| h | height of bitmap in pixels |
| buffer | pointer to data, located in SRAM. |
Definition at line 367 of file ssd1306_16bit.inl.
| void NanoDisplayOps16< I >::drawHLine | ( | lcdint_t | x1, |
| lcdint_t | y1, | ||
| lcdint_t | x2 | ||
| ) |
Draws horizontal or vertical line
| x1 | - position X |
| y1 | - position Y |
| x2 | - position X |
Definition at line 176 of file ssd1306_16bit.inl.
| void NanoDisplayOps16< I >::drawVLine | ( | lcdint_t | x1, |
| lcdint_t | y1, | ||
| lcdint_t | y2 | ||
| ) |
Draws horizontal or vertical line
| x1 | - position X |
| y1 | - position Y |
| y2 | - position Y |
Definition at line 188 of file ssd1306_16bit.inl.
| void NanoDisplayOps16< I >::drawXBitmap | ( | lcdint_t | x, |
| lcdint_t | y, | ||
| lcduint_t | w, | ||
| lcduint_t | h, | ||
| const uint8_t * | bitmap | ||
| ) |
Draws bitmap, located in Flash, on the display The bitmap should be in XBMP format
| x | - horizontal position in pixels |
| y | - vertical position in blocks (pixels/8) |
| w | - width of bitmap in pixels |
| h | - height of bitmap in pixels (must be divided by 8) |
| bitmap | - pointer to data, located in Flash: each byte represents 8 vertical pixels. |
Definition at line 238 of file ssd1306_16bit.inl.
| void NanoDisplayOps16< I >::fill | ( | uint16_t | color | ) |
Fill screen content with specified color
| color | color to fill display with |
Definition at line 220 of file ssd1306_16bit.inl.
| void NanoDisplayOps16< I >::fillRect | ( | lcdint_t | x1, |
| lcdint_t | y1, | ||
| lcdint_t | x2, | ||
| lcdint_t | y2 | ||
| ) |
Fills rectangle area
| x1 | - position X |
| y1 | - position Y |
| x2 | - position X |
| y2 | - position Y |
Definition at line 200 of file ssd1306_16bit.inl.
| uint8_t NanoDisplayOps16< I >::printChar | ( | uint8_t | c | ) |
Draws single character to canvas
| c | - character code to print |
Definition at line 395 of file ssd1306_16bit.inl.
| void NanoDisplayOps16< I >::printFixed | ( | lcdint_t | xpos, |
| lcdint_t | y, | ||
| const char * | ch, | ||
| EFontStyle | style = STYLE_NORMAL |
||
| ) |
Print text at specified position to canvas
| xpos | position in pixels |
| y | position in pixels |
| ch | pointer to NULL-terminated string. |
| style | specific font style to use |
Definition at line 458 of file ssd1306_16bit.inl.
| void NanoDisplayOps16< I >::printFixedN | ( | lcdint_t | xpos, |
| lcdint_t | y, | ||
| const char * | ch, | ||
| EFontStyle | style, | ||
| uint8_t | factor | ||
| ) |
Prints text to screen using size fixed font, scaled by factor value.
Factor value 0 gives regular font size (6x8 for example)
Factor value 1 gives double font size (12x16 if 6x8 font is used)
Factor value 2 gives fourth font size (24x32 if 6x8 font is used)
Factor value 3 gives eighth font size (48x64 if 6x8 font is used)
| xpos | - horizontal position in pixels |
| y | - vertical position in pixels |
| ch | - NULL-terminated string to print |
| style | - font style (EFontStyle), normal by default. |
| factor | - 0, 1, 2, 3. |
Definition at line 472 of file ssd1306_16bit.inl.
| void NanoDisplayOps16< I >::putPixel | ( | lcdint_t | x, |
| lcdint_t | y | ||
| ) |
Draws pixel on specified position
| x | - position X |
| y | - position Y |
Definition at line 168 of file ssd1306_16bit.inl.
| size_t NanoDisplayOps16< I >::write | ( | uint8_t | c | ) |
Writes single character to canvas
| c | - character code to print |
Definition at line 440 of file ssd1306_16bit.inl.
|
static |