LCDGFX LCD display driver  1.2.0
Lightweight graphics library for SSD1306, SSD1325, SSD1327, SSD1331, SSD1351, SH1106, SH1107, IL9163, ST7735, ST7789, ILI9341, PCD8544 displays over I2C/SPI
DisplaySH1107_64x128_CustomSPI< I > Class Template Reference

Template class implements SH1107 64x128 lcd display in 1 bit mode over custom SPI implementation (user-defined spi implementation). More...

#include <lcd_sh1107.h>

Inheritance diagram for DisplaySH1107_64x128_CustomSPI< I >:
Collaboration diagram for DisplaySH1107_64x128_CustomSPI< I >:

Public Member Functions

template<typename... Args>
 DisplaySH1107_64x128_CustomSPI (int8_t rstPin, int8_t dcPin, Args &&... data)
 Inits 64x128 lcd display over spi (based on SH1107 controller): 1-bit mode. More...
 
void begin () override
 Initializes SH1107 lcd in 1-bit mode.
 
void end () override
 Closes connection to display.
 
- Public Member Functions inherited from DisplaySH1107_64x128< InterfaceSH1107< I > >
 DisplaySH1107_64x128 (InterfaceSH1107< I > &intf, int8_t rstPin)
 Creates instance of SH1107 64x128 controller class for 1-bit mode. More...
 
- Public Member Functions inherited from DisplaySH1107< InterfaceSH1107< I > >
 DisplaySH1107 (InterfaceSH1107< I > &intf, int8_t rstPin)
 Creates instance of SH1107 controller class for 1-bit mode. More...
 
- Public Member Functions inherited from NanoDisplayOps< NanoDisplayOps1< InterfaceSH1107< I > >, InterfaceSH1107< I > >
void putPixel (const NanoPoint &p)
 Draws pixel on specified position. More...
 
void drawLine (lcdint_t x1, lcdint_t y1, lcdint_t x2, lcdint_t y2)
 Draws line. More...
 
void drawLine (const NanoRect &rect)
 Draws line. More...
 
void drawRect (lcdint_t x1, lcdint_t y1, lcdint_t x2, lcdint_t y2)
 Draws rectangle. More...
 
void drawRect (const NanoRect &rect)
 Draws rectangle. More...
 
void fillRect (const NanoRect &rect)
 Fills rectangle area. More...
 
void clearRect (lcdint_t x1, lcdint_t y1, lcdint_t x2, lcdint_t y2)
 Clears rectangle area (fills with black/zero color). More...
 
void clearRect (const NanoRect &rect)
 Clears rectangle area (fills with black/zero color). More...
 
void drawCircle (lcdint_t xc, lcdint_t yc, lcdint_t r, uint8_t options=0x0F)
 Draws circle. More...
 
void drawCanvas (lcdint_t x, lcdint_t y, NanoCanvasOps< 1 > &canvas) __attribute__((noinline))
 Draws 1-bit canvas on lcd display. More...
 
void drawCanvas (lcdint_t x, lcdint_t y, NanoCanvasOps< 4 > &canvas) __attribute__((noinline))
 Draws 4-bit canvas on lcd display. More...
 
void drawCanvas (lcdint_t x, lcdint_t y, NanoCanvasOps< 8 > &canvas) __attribute__((noinline))
 Draws 8-bit canvas on lcd display. More...
 
void drawCanvas (lcdint_t x, lcdint_t y, NanoCanvasOps< 16 > &canvas) __attribute__((noinline))
 Draws 16-bit canvas on lcd display. More...
 
void printFixedPgm (lcdint_t xpos, lcdint_t y, const char *ch, EFontStyle style=STYLE_NORMAL) __attribute__((noinline))
 Print text at specified position to canvas. More...
 
void write (const char *str)
 Prints text at current cursor position. More...
 
void print (int number)
 Prints number at current cursor position To specify cursor position using setTextCursor() method. More...
 
void print (float number)
 Prints number at current cursor position To specify cursor position using setTextCursor() method. More...
 
void print (char c)
 Prints single character at current cursor position To specify cursor position using setTextCursor() method. More...
 
void createMenu (SAppMenu *menu, const char **items, uint8_t count, const NanoRect &rect={})
 Creates menu object with the provided list of menu items. More...
 
void showMenu (SAppMenu *menu)
 Shows menu items on the display. More...
 
void showMenuSmooth (SAppMenu *menu)
 Shows menu items on the display. More...
 
void updateMenu (SAppMenu *menu)
 Updates menu items on the display. More...
 
void updateMenuSmooth (SAppMenu *menu)
 Updates menu items on the display. More...
 
uint8_t menuSelection (const SAppMenu *menu)
 Returns currently selected menu item. More...
 
void menuDown (SAppMenu *menu)
 Moves selection pointer down by 1 item. More...
 
void menuUp (SAppMenu *menu)
 Moves selection pointer up by 1 item. More...
 
void drawProgressBar (int8_t progress)
 Displays progress bar in the middle of the display. More...
 
void drawWindow (lcdint_t x, lcdint_t y, lcduint_t width, lcduint_t height, const char *caption, bool blank)
 Displays window at specified position and of specified size. More...
 
- Public Member Functions inherited from NanoDisplayOps1< InterfaceSH1107< I > >
void putPixel (lcdint_t x, lcdint_t y) __attribute__((noinline))
 Draws pixel on specified position. More...
 
void drawVLine (lcdint_t x1, lcdint_t y1, lcdint_t y2)
 Draws horizontal or vertical line. More...
 
void drawHLine (lcdint_t x1, lcdint_t y1, lcdint_t x2)
 Draws horizontal or vertical line. More...
 
void fillRect (lcdint_t x1, lcdint_t y1, lcdint_t x2, lcdint_t y2) __attribute__((noinline))
 Fills rectangle area. More...
 
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. More...
 
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 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. More...
 
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. 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. More...
 
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. More...
 
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. More...
 
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. More...
 
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: refer to GRAY_COLOR4 to understand scheme, being used. More...
 
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: refer to RGB_COLOR8 to understand RGB scheme, being used. More...
 
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 to RGB_COLOR16 to understand RGB scheme, being used. More...
 
void clear ()
 Clears canvas.
 
void fill (uint16_t color)
 Fill screen content with specified color. More...
 
uint8_t printChar (uint8_t c)
 Draws single character to canvas. More...
 
size_t write (uint8_t c) __attribute__((noinline))
 Writes single character to canvas. More...
 
void printFixed (lcdint_t xpos, lcdint_t y, const char *ch, EFontStyle style=STYLE_NORMAL) __attribute__((noinline))
 Print text at specified position to canvas. More...
 
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. More...
 
- Public Member Functions inherited from NanoDisplayBase< InterfaceSH1107< I > >
 NanoDisplayBase (InterfaceSH1107< I > &intf)
 Creates new empty base display object. More...
 
const NanoPoint offsetEnd () const
 Returns right-bottom point of the canvas in offset terms. More...
 
const NanoRect rect () const
 Returns rectangle area, covered by canvas in offset terms. More...
 
lcduint_t width ()
 Returns width of the display in pixels.
 
lcduint_t height ()
 Returns height of the display in pixels.
 
void swapDimensions ()
 Swaps width and height dimensions.
 
void setColor (uint16_t color)
 Sets color. More...
 
uint16_t getColor ()
 Returns currently set color.
 
void setBackground (uint16_t color)
 Sets background color. More...
 
void invertColors ()
 Changes foreground and background colors.
 
InterfaceSH1107< I > & getInterface ()
 Returns reference to interface communicator. More...
 
void setFont (NanoFont &font)
 Sets new font to use with print functions. More...
 
void setFontSpacing (uint8_t spacing)
 Sets spacing for currently active font. More...
 
NanoFontgetFont ()
 Returns reference to NanoFont object, currently used by Display.
 
void setFixedFont (const uint8_t *progmemFont)
 Sets new font to use with print functions. More...
 
void setFixedFont (const uint8_t *progmemFont, const uint8_t *secondaryFont)
 Sets new font to use with print functions. More...
 
void setFreeFont (const uint8_t *progmemFont, const uint8_t *secondaryFont=nullptr)
 Sets new font to use with print functions. More...
 
void setTextCursor (lcdint_t x, lcdint_t y)
 Function sets text cursor position for write() functions. More...
 

Additional Inherited Members

- Public Types inherited from NanoDisplayOps< NanoDisplayOps1< InterfaceSH1107< I > >, InterfaceSH1107< I > >
typedef NanoDisplayOps< NanoDisplayOps1< InterfaceSH1107< I > >, InterfaceSH1107< I > > T
 Base type for display operations class.
 
- Static Public Attributes inherited from NanoDisplayOps1< InterfaceSH1107< I > >
static const uint8_t BITS_PER_PIXEL
 number of bits per single pixel in buffer
 
- Protected Member Functions inherited from DisplaySH1107_64x128< InterfaceSH1107< I > >
void beginController ()
 Basic SH1107 64x128 initialization.
 
void endController ()
 Basic SH1107 deinitialization.
 
- Protected Member Functions inherited from DisplaySH1107< InterfaceSH1107< I > >
void beginDisplay ()
 Basic SH1107 initialization.
 
void endDisplay ()
 Basic SH1107 deinitialization.
 
- Protected Attributes inherited from DisplaySH1107< InterfaceSH1107< I > >
int8_t m_rstPin
 indicates hardware reset pin used, -1 if it is not required
 
- Protected Attributes inherited from NanoDisplayBase< InterfaceSH1107< I > >
lcduint_t m_w
 width of NanoCanvas area in pixels
 
lcduint_t m_h
 height of NanoCanvas area in pixels
 
lcduint_t m_p
 number of bits, used by width value: 3 equals to 8 pixels width
 
lcdint_t m_cursorX
 current X cursor position for text output
 
lcdint_t m_cursorY
 current Y cursor position for text output
 
uint8_t m_textMode
 Flags for current NanoCanvas mode.
 
EFontStyle m_fontStyle
 currently active font style
 
uint16_t m_color
 current foreground color
 
uint16_t m_bgColor
 current background color
 
NanoFontm_font
 currently set font
 
InterfaceSH1107< I > & m_intf
 communication interface with the display
 

Detailed Description

template<typename I>
class DisplaySH1107_64x128_CustomSPI< I >

Template class implements SH1107 64x128 lcd display in 1 bit mode over custom SPI implementation (user-defined spi implementation).

I - user custom spi class

Definition at line 489 of file lcd_sh1107.h.

Constructor & Destructor Documentation

◆ DisplaySH1107_64x128_CustomSPI()

template<typename I >
template<typename... Args>
DisplaySH1107_64x128_CustomSPI< I >::DisplaySH1107_64x128_CustomSPI ( int8_t  rstPin,
int8_t  dcPin,
Args &&...  data 
)
inline

Inits 64x128 lcd display over spi (based on SH1107 controller): 1-bit mode.

Inits 64x128 lcd display over spi (based on SH1107 controller): 1-bit mode

Parameters
rstPinpin controlling LCD reset (-1 if not used)
dcPinpin to use as data/command control pin
datavariable argument list for custom user spi interface.

Definition at line 501 of file lcd_sh1107.h.


The documentation for this class was generated from the following file: