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:
aSerializedSerialized stateaPosPosition of the element (output)aSizeSize of the element (output)isFocusedFocus 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:
aPositionPosition on screenaSizeSize of the symbolaCharcodeCharacter codeaColorColor/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:
aAddressI2C addressaColsNumber of columnsaRowsNumber of rowsaBacklightPinBacklight 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:
aPosPosition of the elementaSizeSize of the elementisFocusedFocus state
Returns:
unsigned short Serialized state
Implements evab::Screen::Serialize
function SetBacklight¶
Sets backlight state.
void evab::ScreenLCD_I2C::SetBacklight (
uint8_t aState
)
Parameters:
aState1 = 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