28 #ifndef _NANO_DISPLAY_H_ 29 #define _NANO_DISPLAY_H_ 231 __attribute__((noinline));
243 void fill(uint16_t color);
256 size_t write(uint8_t c) __attribute__((noinline));
269 __attribute__((noinline));
271 #ifndef DOXYGEN_SHOULD_SKIP_THIS 272 void printFixed_oldStyle(uint8_t xpos, uint8_t y,
const char *ch,
EFontStyle style) __attribute__((noinline));
292 __attribute__((noinline));
304 static const uint8_t BITS_PER_PIXEL = 4;
472 __attribute__((noinline));
484 void fill(uint16_t color);
497 size_t write(uint8_t c) __attribute__((noinline));
510 __attribute__((noinline));
516 uint8_t m_lastByte = 0;
526 static const uint8_t BITS_PER_PIXEL = 8;
694 __attribute__((noinline));
706 void fill(uint16_t color);
719 size_t write(uint8_t c) __attribute__((noinline));
732 __attribute__((noinline));
744 static const uint8_t BITS_PER_PIXEL = 1;
912 __attribute__((noinline));
924 void fill(uint16_t color);
937 size_t write(uint8_t c) __attribute__((noinline));
950 __attribute__((noinline));
969 __attribute__((noinline));
1111 __attribute__((noinline));
1121 void write(
const char *str);
1129 void print(
int number);
1137 void print(
float number);
1174 void showMenuSmooth(
SAppMenu *menu);
1192 void updateMenuSmooth(
SAppMenu *menu);
1201 uint8_t menuSelection(
const SAppMenu *menu);
1226 void drawProgressBar(int8_t progress);
1244 virtual void begin() = 0;
1249 virtual void end() = 0;
1252 #include "ssd1306_1bit.inl" 1253 #include "ssd1306_4bit.inl" 1254 #include "ssd1306_8bit.inl" 1255 #include "ssd1306_16bit.inl" 1256 #include "ssd1306_common.inl" 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.
void fill(uint16_t color)
Fill screen content with specified color.
void 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.
uint8_t lcduint_t
internal int type, used by the library.
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...
void drawBuffer4(lcdint_t x, lcdint_t y, lcduint_t w, lcduint_t h, const uint8_t *buffer) __attribute__((noinline))
Draws 4-bit bitmap, located in RAM, on the display Each byte represents two pixels in 4-4 format: ref...
NanoDisplayOps4 is template class for 4-bit monochrome operations.
NanoRect structure describes rectangle area.
lcduint_t width()
Returns width of the display in pixels.
int8_t lcdint_t
internal int type, used by the library.
lcduint_t height()
Returns height of the display in pixels.
void fillRect(lcdint_t x1, lcdint_t y1, lcdint_t x2, lcdint_t y2) __attribute__((noinline))
Fills rectangle area.
static const uint8_t BITS_PER_PIXEL
number of bits per single pixel in buffer
SSD1306 HAL IO communication functions.
Drawing in memory buffer.
NanoDisplayOps< O, I > T
Base type for display operations class.
NanoCanvasOps provides operations for drawing in memory buffer.
void gfx_drawMonoBitmap(lcdint_t x, lcdint_t y, lcduint_t w, lcduint_t h, const uint8_t *buf)
Draws bitmap, located in Flash, on the display.
void drawBuffer1(lcdint_t x, lcdint_t y, lcduint_t w, lcduint_t h, const uint8_t *buffer) __attribute__((noinline))
Draws bitmap, located in RAM, on the display Each byte represents 8 vertical pixels.
NanoDisplayOps1 is template class for 1-bit operations.
uint8_t printChar(uint8_t c)
Draws single character to canvas.
const NanoRect rect() const
Returns rectangle area, covered by canvas in offset terms.
Basic structures of nano gfx library.
void 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.
void 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.
void putPixel(lcdint_t x, lcdint_t y) __attribute__((noinline))
Draws pixel on specified position.
Basic display capabilities implementation.
void printFixedN(lcdint_t xpos, lcdint_t y, const char *ch, EFontStyle style, uint8_t factor) __attribute__((noinline))
Prints text to screen using size fixed font, scaled by factor value.
void drawBuffer8(lcdint_t x, lcdint_t y, lcduint_t w, lcduint_t h, const uint8_t *buffer) __attribute__((noinline))
Draws 8-bit bitmap, located in RAM, on the display Each byte represents one pixel in 2-2-3 format: re...
void clear()
Clears canvas.
size_t write(uint8_t c) __attribute__((noinline))
Writes single character to canvas.
void printFixed(lcdint_t xpos, lcdint_t y, const char *ch, EFontStyle style=STYLE_NORMAL) __attribute__((noinline))
Print text at specified position to canvas.
void 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.
NanoCanvasOps provides operations for drawing in memory buffer.
void drawVLine(lcdint_t x1, lcdint_t y1, lcdint_t y2)
Draws horizontal or vertical line.
EFontStyle
Supported font styles.
Class implements basic display operations for the library: It stores reference to communication inter...
void drawHLine(lcdint_t x1, lcdint_t y1, lcdint_t x2)
Draws horizontal or vertical line.
void drawBuffer16(lcdint_t xpos, lcdint_t ypos, lcduint_t w, lcduint_t h, const uint8_t *buffer) __attribute__((noinline))
Draws 16-bit bitmap, located in RAM, on the display Each pixel occupies 2 bytes (5-6-5 format): refer...
NanoDisplayOps16 is template class for 16-bit operations.
NanoDisplayOps8 is template class for 8-bit operations.