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
InterfaceSH1107< I > Class Template Reference

#include <lcd_sh1107.h>

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

Public Member Functions

template<typename... Args>
 InterfaceSH1107 (NanoDisplayBase< InterfaceSH1107< I >> &base, int8_t dc, Args &&... data)
 
void startBlock (lcduint_t x, lcduint_t y, lcduint_t w)
 Sets block in RAM of lcd display controller to write data to. More...
 
void nextBlock ()
 
void endBlock ()
 
void setDataMode (uint8_t mode)
 
void commandStart ()
 
void setStartLine (uint8_t line)
 
uint8_t getStartLine ()
 
void normalMode ()
 
void invertMode ()
 
void setContrast (uint8_t contrast)
 
void displayOff ()
 
void displayOn ()
 
void flipHorizontal (uint8_t mode)
 performs horizontal flip More...
 
void flipVertical (uint8_t mode)
 performs vertical flip More...
 
void setSegOffset (uint8_t offset)
 
void setDisplayOffset (uint8_t offset)
 

Detailed Description

template<typename I>
class InterfaceSH1107< I >

Class implements interface functions to SH1107 displays

Definition at line 43 of file lcd_sh1107.h.

Constructor & Destructor Documentation

◆ InterfaceSH1107()

template<typename I>
template<typename... Args>
InterfaceSH1107< I >::InterfaceSH1107 ( NanoDisplayBase< InterfaceSH1107< I >> &  base,
int8_t  dc,
Args &&...  data 
)
inline

Creates instance of interface to LCD display.

Parameters
baseReference to base class, which represents Display
dcData/command control pin number, for i2c communication should be -1
datavariable argument list, accepted by platform interface (PlatformI2c, PlatformSpi)

Definition at line 54 of file lcd_sh1107.h.

Member Function Documentation

◆ commandStart()

template<class I >
void InterfaceSH1107< I >::commandStart ( )

Starts communication with LCD display in command mode. To stop communication use m_intf.end().

Definition at line 74 of file lcd_sh1107.inl.

◆ displayOff()

template<class I >
void InterfaceSH1107< I >::displayOff ( )

Turns off display

Definition at line 119 of file lcd_sh1107.inl.

◆ displayOn()

template<class I >
void InterfaceSH1107< I >::displayOn ( )

Turns on display

Definition at line 126 of file lcd_sh1107.inl.

◆ endBlock()

template<class I >
void InterfaceSH1107< I >::endBlock ( )

Closes data send operation to lcd display.

Definition at line 61 of file lcd_sh1107.inl.

◆ flipHorizontal()

template<class I >
void InterfaceSH1107< I >::flipHorizontal ( uint8_t  mode)

performs horizontal flip

Performs horizontal flip. If you need to turn display by 180 degree, please use both flipHorizontal() and flipVertical().

Parameters
mode- 0 to disable horizontal flip 1 to enable horizontal flip

Definition at line 133 of file lcd_sh1107.inl.

◆ flipVertical()

template<class I >
void InterfaceSH1107< I >::flipVertical ( uint8_t  mode)

performs vertical flip

Performs vertical flip. If you need to turn display by 180 degree, please use both flipHorizontal() and flipVertical().

Parameters
mode- 0 to disable vertical flip 1 to enable vertical flip

Definition at line 140 of file lcd_sh1107.inl.

◆ getStartLine()

template<class I >
uint8_t InterfaceSH1107< I >::getStartLine ( )

returns start line in gdram.

Definition at line 92 of file lcd_sh1107.inl.

◆ invertMode()

template<class I >
void InterfaceSH1107< I >::invertMode ( )

Switches display to normal mode. This feature is specific for SH1107 based controllers.

Definition at line 104 of file lcd_sh1107.inl.

◆ nextBlock()

template<class I >
void InterfaceSH1107< I >::nextBlock ( )

Switches to the start of next RAM page for the block, specified by startBlock(). For SSD1306 it does nothing, while for SH1106 the function moves cursor to next page.

Definition at line 55 of file lcd_sh1107.inl.

◆ normalMode()

template<class I >
void InterfaceSH1107< I >::normalMode ( )

Switches display to normal mode. This feature is specific for SH1107 based controllers.

Definition at line 97 of file lcd_sh1107.inl.

◆ setContrast()

template<class I >
void InterfaceSH1107< I >::setContrast ( uint8_t  contrast)

Set display contrast, ie light intensity

Parameters
contrast- contrast value to see, refer to SH1107 datasheet

Definition at line 111 of file lcd_sh1107.inl.

◆ setDataMode()

template<class I >
void InterfaceSH1107< I >::setDataMode ( uint8_t  mode)

Enables either data or command mode on SPI bus

Parameters
mode1 to enable data mode, or 0 to enable command mode

Definition at line 66 of file lcd_sh1107.inl.

◆ setDisplayOffset()

template<class I >
void InterfaceSH1107< I >::setDisplayOffset ( uint8_t  offset)

Sets display offset according to datasheet.

Parameters
offsetdisplay offset in range 0 - 127

Definition at line 152 of file lcd_sh1107.inl.

◆ setSegOffset()

template<class I >
void InterfaceSH1107< I >::setSegOffset ( uint8_t  offset)

Sets segment (column) connection offset. Some manufactures connect left column of display matrix to SH1107 starting at non-zero segment output line. This causes some shift comparing to GDDRAM content. Use this function to fix that

Parameters
offsetindex of the segment corresponding to first column

Definition at line 147 of file lcd_sh1107.inl.

◆ setStartLine()

template<class I >
void InterfaceSH1107< I >::setStartLine ( uint8_t  line)

Sets start line in gdram to start display content with

Parameters
linestart line in range 0 - 127

Definition at line 83 of file lcd_sh1107.inl.

◆ startBlock()

template<class I >
void InterfaceSH1107< I >::startBlock ( lcduint_t  x,
lcduint_t  y,
lcduint_t  w 
)

Sets block in RAM of lcd display controller to write data to.

Sets block in RAM of lcd display controller to write data to. For SH1107 it uses horizontal addressing mode, while for sh1106 the function uses page addressing mode. Width can be specified as 0, thus the library will set the right boundary to region of RAM block to the right column of the display.

Parameters
x- column (left region)
y- row (top region)
w- width of the block in pixels to control
Warning
- this function initiates session (i2c or spi) and does not close it. To close session, please, call endBlock().

Definition at line 35 of file lcd_sh1107.inl.


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