Update version of EALib.

Dependencies:   FATFileSystem

Fork of EALib by IONX

Embed: (wiki syntax)

« Back to documentation index

EaLcdBoard Class Reference

EaLcdBoard Class Reference

An interface to Embedded Artists LCD Boards. More...

#include <EaLcdBoard.h>

Public Member Functions

 EaLcdBoard (PinName sda, PinName scl)
 Create an interface to an Embedded Artists LCD Board.
Result open (LcdController::Config *cfg, char *initSeq)
 Open the interface and start initialization.
Result close ()
 Close the interface.
Result setFrameBuffer (uint32_t address)
 Set and activate the address of the frame buffer to use.
Result getLcdConfig (LcdController::Config *cfg)
 Get the LCD configuration stored in persistent storage on the LCD Board.
Result getDisplayName (char *buf, int len)
 Get the display name stored in persistent storage on the LCD Board.
Result getDisplayMfg (char *buf, int len)
 Get the display manufacturer stored in persistent storage on the LCD Board.
Result getInitSeq (char *buf, int len)
 Get the initialization sequence stored in persistent storage on the LCD Board.
Result getPowerDownSeq (char *buf, int len)
 Get the power down sequence stored in persistent storage on the LCD Board.
Result getTouchParameters (TouchParams_t *params)
 Get the touch panel parameters stored in persistent storage.
Result storeParameters (const char *lcdName, const char *lcdMfg, LcdController::Config *cfg, const char *initSeqStr, const char *pdSeqStr, TouchParams_t *touch, bool controlWp=false)
 Write display parameters to the EEPROM.

Detailed Description

An interface to Embedded Artists LCD Boards.

Definition at line 25 of file EaLcdBoard.h.


Constructor & Destructor Documentation

EaLcdBoard ( PinName  sda,
PinName  scl 
)

Create an interface to an Embedded Artists LCD Board.

Parameters:
sdaI2C data line pin
sclI2C clock line pin

Definition at line 110 of file EaLcdBoard.cpp.


Member Function Documentation

EaLcdBoard::Result close (  )

Close the interface.

Returns:
the result of the operation

Definition at line 140 of file EaLcdBoard.cpp.

EaLcdBoard::Result getDisplayMfg ( char *  buf,
int  len 
)

Get the display manufacturer stored in persistent storage on the LCD Board.

Parameters:
bufbuffer to which the name will be copied
lensize of the buffer in bytes
Returns:
the result of the operation

Definition at line 247 of file EaLcdBoard.cpp.

EaLcdBoard::Result getDisplayName ( char *  buf,
int  len 
)

Get the display name stored in persistent storage on the LCD Board.

Parameters:
bufbuffer to which the name will be copied
lensize of the buffer in bytes
Returns:
the result of the operation

Definition at line 225 of file EaLcdBoard.cpp.

EaLcdBoard::Result getInitSeq ( char *  buf,
int  len 
)

Get the initialization sequence stored in persistent storage on the LCD Board.

Parameters:
bufbuffer to which the string will be copied
lensize of the buffer in bytes
Returns:
the result of the operation

Definition at line 269 of file EaLcdBoard.cpp.

EaLcdBoard::Result getLcdConfig ( LcdController::Config cfg )

Get the LCD configuration stored in persistent storage on the LCD Board.

Parameters:
cfgpointer to a configuration object. Parameters are copied to this object.
Returns:
the result of the operation

Definition at line 186 of file EaLcdBoard.cpp.

EaLcdBoard::Result getPowerDownSeq ( char *  buf,
int  len 
)

Get the power down sequence stored in persistent storage on the LCD Board.

Parameters:
bufbuffer to which the string will be copied
lensize of the buffer in bytes
Returns:
the result of the operation

Definition at line 292 of file EaLcdBoard.cpp.

EaLcdBoard::Result getTouchParameters ( TouchParams_t *  params )

Get the touch panel parameters stored in persistent storage.

Parameters:
paramspointer to a configuration object. Parameters are copied to this object.
Returns:
the result of the operation

Definition at line 315 of file EaLcdBoard.cpp.

EaLcdBoard::Result open ( LcdController::Config cfg,
char *  initSeq 
)

Open the interface and start initialization.

Parameters:
cfginitialize with a given LCD configuration. If this argument is NULL the LCD configuration will be retrieved from persistent storage on the LCD Board.
initSeqthe initialization string. If this argument is NULL the initialization string will be retrieved from persistent storage on the LCD Board.
Returns:
the result of the operation

Definition at line 117 of file EaLcdBoard.cpp.

EaLcdBoard::Result setFrameBuffer ( uint32_t  address )

Set and activate the address of the frame buffer to use.

It is the content of the frame buffer that is shown on the display. All the drawing on the frame buffer can be done 'offline' and whenever it should be shown this function can be called with the address of the offline frame buffer.

Parameters:
addressMemory address of the frame buffer
Returns:
the result of the operation

Definition at line 159 of file EaLcdBoard.cpp.

EaLcdBoard::Result storeParameters ( const char *  lcdName,
const char *  lcdMfg,
LcdController::Config cfg,
const char *  initSeqStr,
const char *  pdSeqStr,
TouchParams_t *  touch,
bool  controlWp = false 
)

Write display parameters to the EEPROM.

Please use this function with care since original parameters will be overwritten and cannot be restored.

Parameters:
lcdNamethe name of the display
lcdMfgthe display manufacturer
cfgthe display configuration parameters
initSeqStrthe initialization sequence string
pdSeqStrthe power down sequence string
touchtouch panel parameters

Definition at line 344 of file EaLcdBoard.cpp.