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

#include <lcd_ssd1331.h>

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

Public Member Functions

template<typename... Args>
 InterfaceSSD1331 (uint8_t bits, NanoDisplayBase< InterfaceSSD1331< 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 setRotation (uint8_t rotation)
 Sets screen orientation (rotation) More...
 
void drawLine (lcdint_t x1, lcdint_t y1, lcdint_t x2, lcdint_t y2, uint16_t color)
 
void copyBlock (uint8_t left, uint8_t top, uint8_t right, uint8_t bottom, uint8_t newLeft, uint8_t newTop)
 

Detailed Description

template<typename I>
class InterfaceSSD1331< I >

Class implements interface functions to SSD1331 displays

Definition at line 43 of file lcd_ssd1331.h.

Constructor & Destructor Documentation

◆ InterfaceSSD1331()

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

Creates instance of interface to LCD display.

Parameters
bitsdisplay bit mode: 8 or 16
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 55 of file lcd_ssd1331.h.

Member Function Documentation

◆ commandStart()

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

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

Definition at line 67 of file lcd_ssd1331.inl.

◆ copyBlock()

template<class I >
void InterfaceSSD1331< I >::copyBlock ( uint8_t  left,
uint8_t  top,
uint8_t  right,
uint8_t  bottom,
uint8_t  newLeft,
uint8_t  newTop 
)

Copies block in GDRAM to new position using hardware accelerator features.

Parameters
leftleft position of block to copy
toptop position of block to copy
rightright position of block to copy
bottombottom position of block to copy
newLeftnew left position for block being copied
newTopnew top position for block being copied
Note
This API can be used only with ssd1331 RGB oled displays
after copy command is sent, it takes some time from oled controller to complete operation. So, it is highly recommended to wait for reasonable time before send other graphics operations (for example, use 250us delay). This time is required for oled display to become ready to accept new commands.

Definition at line 123 of file lcd_ssd1331.inl.

◆ drawLine()

template<class I >
void InterfaceSSD1331< I >::drawLine ( lcdint_t  x1,
lcdint_t  y1,
lcdint_t  x2,
lcdint_t  y2,
uint16_t  color 
)

Draws line using hardware accelerator capabilities

Parameters
x1x position of first point
y1y position of first point
x2x position of second point
y2y position of second point
colorcolor to draw line with (refere RGB_COLOR16 macro)

Definition at line 108 of file lcd_ssd1331.inl.

◆ endBlock()

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

Closes data send operation to lcd display.

Definition at line 54 of file lcd_ssd1331.inl.

◆ nextBlock()

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

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

Definition at line 49 of file lcd_ssd1331.inl.

◆ setDataMode()

template<class I >
void InterfaceSSD1331< 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 59 of file lcd_ssd1331.inl.

◆ setRotation()

template<class I >
void InterfaceSSD1331< I >::setRotation ( uint8_t  rotation)

Sets screen orientation (rotation)

Sets screen orientation (rotation): 0 - normal, 1 - 90 CW, 2 - 180 CW, 3 - 270 CW

Parameters
rotation- screen rotation 0 - normal, 1 - 90 CW, 2 - 180 CW, 3 - 270 CW

Definition at line 76 of file lcd_ssd1331.inl.

◆ startBlock()

template<class I >
void InterfaceSSD1331< 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 SSD1331 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_ssd1331.inl.


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