33 #include "v2/lcd/base/display.h" 53 template <
typename... Args>
196 uint8_t m_startLine = 0;
197 uint8_t m_column = 0;
199 uint8_t m_seg_offset = 0;
254 void beginController();
259 void endController();
261 #ifdef CONFIG_LCDGFX_PLATFORM_SPI 275 explicit DisplaySH1107_128x64_SPI(int8_t rstPin,
const SPlatformSpiConfig &config = {-1, {-1}, -1, 0U, -1, -1})
277 , m_spi(*
this, config.dc,
279 config.busId, {config.cs}, config.
dc, config.frequency ?: static_cast<uint32_t>(10000000), config.scl, config.sda})
286 void begin()
override;
313 template <
typename... Args>
316 , m_spi(*this, dcPin, data...)
341 #ifdef CONFIG_LCDGFX_PLATFORM_I2C 355 explicit DisplaySH1107_128x64_I2C(int8_t rstPin,
const SPlatformI2cConfig &config = {-1, 0x3C, -1, -1, 0U})
359 config.frequency ?: 400000U})
366 void begin()
override;
392 template <
typename... Args>
395 , m_i2c(*this, -1, data...)
441 void beginController();
446 void endController();
448 #ifdef CONFIG_LCDGFX_PLATFORM_SPI 462 explicit DisplaySH1107_64x128_SPI(int8_t rstPin,
const SPlatformSpiConfig &config = {-1, {-1}, -1, 0U, -1, -1})
464 , m_spi(*
this, config.dc,
466 config.busId, {config.cs}, config.
dc, config.frequency ?: static_cast<uint32_t>(10000000), config.scl, config.sda})
473 void begin()
override;
500 template <
typename... Args>
503 , m_spi(*this, dcPin, data...)
528 #ifdef CONFIG_LCDGFX_PLATFORM_I2C 542 explicit DisplaySH1107_64x128_I2C(int8_t rstPin,
const SPlatformI2cConfig &config = {-1, 0x3C, -1, -1, 0U})
546 config.frequency ?: 400000U})
553 void begin()
override;
579 template <
typename... Args>
582 , m_i2c(*this, -1, data...)
607 #include "lcd_sh1107.inl" DisplaySH1107_128x64_CustomSPI(int8_t rstPin, int8_t dcPin, Args &&... data)
Inits 128x64 lcd display over spi (based on SH1107 controller): 1-bit mode.
DisplaySH1107_64x128_CustomI2C(int8_t rstPin, Args &&... data)
Inits 64x128 lcd display over i2c (based on SH1107 controller): 1-bit mode.
uint8_t lcduint_t
internal int type, used by the library.
void begin() override
Initializes SH1107 lcd in 1-bit mode.
void setStartLine(uint8_t line)
Sets start line in GDRAM to begin display content with.
Template class implements SH1107 128x64 lcd display in 1 bit mode over custom SPI implementation (use...
void startBlock(lcduint_t x, lcduint_t y, lcduint_t w)
Sets block in RAM of lcd display controller to write data to.
SSD1306 HAL IO communication functions.
uint8_t getStartLine()
Returns the current start line offset in GDRAM.
Class implements basic functions for 1-bit mode of SH1107-based displays.
void end() override
Closes connection to display.
InterfaceSH1107(NanoDisplayBase< InterfaceSH1107< I >> &base, int8_t dc, Args &&... data)
Creates instance of interface to LCD display.
void flipHorizontal(uint8_t mode)
Performs horizontal flip.
Class implements basic functions for 1-bit mode of SH1107-based displays.
void setContrast(uint8_t contrast)
Sets display contrast (brightness level).
DisplaySH1107_128x64_CustomI2C(int8_t rstPin, Args &&... data)
Inits 128x64 lcd display over i2c (based on SH1107 controller): 1-bit mode.
Class implements interface functions to SH1107 displays.
Class implements basic functions for 1-bit mode of SH1107-based displays.
void normalMode()
Switches display back to normal (non-inverted) mode.
NanoDisplayOps1 is template class for 1-bit operations.
DisplaySH1107_128x64(I &intf, int8_t rstPin)
Creates instance of SH1107 128x64 controller class for 1-bit mode.
void begin() override
Initializes SH1107 lcd in 1-bit mode.
void begin() override
Initializes SH1107 lcd in 1-bit mode.
int8_t m_rstPin
indicates hardware reset pin used, -1 if it is not required
void invertMode()
Switches display to inverted mode.
void flipVertical(uint8_t mode)
Performs vertical flip.
void endBlock()
Closes data send operation to lcd display.
DisplaySH1107_64x128(I &intf, int8_t rstPin)
Creates instance of SH1107 64x128 controller class for 1-bit mode.
Template class implements SH1107 64x128 lcd display in 1 bit mode over custom I2C implementation (use...
void setDisplayOffset(uint8_t offset)
Sets display offset according to datasheet.
void displayOn()
Turns on the display, resuming normal output.
DisplaySH1107(I &intf, int8_t rstPin)
Creates instance of SH1107 controller class for 1-bit mode.
void nextBlock()
Switches to the start of next RAM page for the block, specified by startBlock().
DisplaySH1107_64x128_CustomSPI(int8_t rstPin, int8_t dcPin, Args &&... data)
Inits 64x128 lcd display over spi (based on SH1107 controller): 1-bit mode.
NanoCanvasOps provides operations for drawing in memory buffer.
void setDataMode(uint8_t mode)
Enables either data or command mode on SPI bus.
void setSegOffset(uint8_t offset)
Sets segment (column) connection offset.
void begin() override
Initializes SH1107 lcd in 1-bit mode.
Class implements basic display operations for the library: It stores reference to communication inter...
Template class implements SH1107 128x64 lcd display in 1 bit mode over custom I2C implementation (use...
Template class implements SH1107 64x128 lcd display in 1 bit mode over custom SPI implementation (use...
void end() override
Closes connection to display.
void commandStart()
Starts communication with LCD display in command mode.
void displayOff()
Turns off the display (enters sleep mode).
void end() override
Closes connection to display.
void end() override
Closes connection to display.