Skip to content

Class evab::ScreenLCD_I2C

ClassList > evab > ScreenLCD_I2C

I2C LCD screen driver (HD44780 with PCF8574 I2C expander). More...

  • #include <evabScreenLCD_I2C.h>

Inherits the following classes: evab::Screen

Public Functions

Type Name
virtual void Deserialize (unsigned short aSerialized, Coor & aPos, Coor & aSize, bool & isFocused)
Deserializes element state for 32x4 screen.
virtual void DrawSymbol (Coor aPosition, Coor aSize, char aCharcode, unsigned char aColor) override
Draws a symbol at the specified position.
ScreenLCD_I2C (uint8_t aAddress, uint8_t aCols, uint8_t aRows, uint8_t aBacklightPin)
Constructor for I2C LCD screen driver.
virtual unsigned short Serialize (const Coor & aPos, const Coor & aSize, bool isFocused)
Serializes element state for 32x4 screen.
void SetBacklight (uint8_t aState)
Sets backlight state.
virtual Coor Size () override
Gets the screen size.

Public Functions inherited from evab::Screen

See evab::Screen

Type Name
virtual void Clear (Coor aPosition, Coor aSize, unsigned char aColor=0)
virtual void Deserialize (unsigned short aSerialized, Coor & aPosition, Coor & aSize, bool & isFocused) = 0
virtual void DrawSymbol (Coor aPosition, Coor aSize, char aSymbol, unsigned char aColor=0) = 0
virtual void Picto (Coor aPosition, const unsigned char * aPictogram, unsigned char aColor=0)
virtual unsigned short Serialize (const Coor & aPosition, const Coor & aSize, bool isFocused) = 0
virtual Coor Size () = 0
void Text (Coor aPosition, Coor aSize, TText aText, unsigned char aColor=0)
Draws text with specified alignment strategy.
void TextCenter (Coor aPosition, Coor aSize, T aText, unsigned char aColor=0)
void TextLeft (Coor aPosition, Coor aSize, T aText, unsigned char aColor=0)
void TextRight (Coor aPosition, Coor aSize, T aText, unsigned char aColor=0)

Detailed Description

Supports standard 16x2, 20x4 LCD displays with I2C backpack.

Public Functions Documentation

function Deserialize

Deserializes element state for 32x4 screen.

virtual void evab::ScreenLCD_I2C::Deserialize (
    unsigned short aSerialized,
    Coor & aPos,
    Coor & aSize,
    bool & isFocused
) 

Parameters:

  • aSerialized Serialized state
  • aPos Position of the element (output)
  • aSize Size of the element (output)
  • isFocused Focus state (output)

Implements evab::Screen::Deserialize


function DrawSymbol

Draws a symbol at the specified position.

virtual void evab::ScreenLCD_I2C::DrawSymbol (
    Coor aPosition,
    Coor aSize,
    char aCharcode,
    unsigned char aColor
) override

Parameters:

  • aPosition Position on screen
  • aSize Size of the symbol
  • aCharcode Character code
  • aColor Color/inversion flag

Implements evab::Screen::DrawSymbol


function ScreenLCD_I2C

Constructor for I2C LCD screen driver.

evab::ScreenLCD_I2C::ScreenLCD_I2C (
    uint8_t aAddress,
    uint8_t aCols,
    uint8_t aRows,
    uint8_t aBacklightPin
) 

Parameters:

  • aAddress I2C address
  • aCols Number of columns
  • aRows Number of rows
  • aBacklightPin Backlight pin in the PCF8574 expander

function Serialize

Serializes element state for 32x4 screen.

virtual unsigned short evab::ScreenLCD_I2C::Serialize (
    const Coor & aPos,
    const Coor & aSize,
    bool isFocused
) 

Parameters:

  • aPos Position of the element
  • aSize Size of the element
  • isFocused Focus state

Returns:

unsigned short Serialized state

Implements evab::Screen::Serialize


function SetBacklight

Sets backlight state.

void evab::ScreenLCD_I2C::SetBacklight (
    uint8_t aState
) 

Parameters:

  • aState 1 = on, 0 = off

function Size

Gets the screen size.

inline virtual Coor evab::ScreenLCD_I2C::Size () override

Returns:

Coor Screen dimensions (cols, rows)

Implements evab::Screen::Size



The documentation for this class was generated from the following file src/evabScreenLCD_I2C.h