INOS
CINOSSioTft Class Reference

#include <cinossiotft.h>

Public Member Functions

const charGetName ()
 Get name of display.
 
XMLNode GetConfig ()
 Get config node of display.
 
uint16 GetWidth ()
 Get number of horizontal pixels.
 
uint16 GetHeight ()
 Get number of vertical pixels.
 
ETftError ClearDisplay ()
 Clear whole display.
 
ETftError ResetDisplay ()
 Init display and clear it.
 
bool GetFontInfo (uint8 auNumber, STFTFontInfo &arInfo)
 Get info about font.
 
bool GetEvent (STFTEvent &arEvent)
 Get display event (pressed/released buttons, touches, keys).
 
uint32 EditEnterValue (const char *apName, STFTFontInfo &arFontInfo, const char *apDefaultText, char *apInputText, uint32 auBufferSize, const char *apKbdDef=NULL, const char *apKbdLayoutName=NULL, uint32 auReqKeyBoard=0)
 Start editing a value.
 
ETftError TFT_TermColor (uint8 auForeColor, uint8 auBackColor)
 Set terminal colors (text, background).
 
ETftError TFT_TermCursorPos (uint8 auColumn, uint8 auRow)
 Set terminal cursor position.
 
ETftError TFT_TermCursorEnable (uint8 auSet)
 Switch terminal cursor on or off.
 
ETftError TFT_TermOutput (char *apText)
 Write text in terminal.
 
ETftError TFT_DisplayColor (uint8 auForeColor, uint8 auBackColor)
 Set graphic colors.
 
ETftError TFT_DisplayClear ()
 Clear display content (with background color).
 
ETftError TFT_DisplayFill (uint8 auColorNr)
 Fill display with given color.
 
ETftError TFT_TextColor (uint8 auForeColor, uint8 auBackColor)
 Set graphic text colors.
 
ETftError TFT_TextFont (uint8 auFontNr)
 Set graphical text font.
 
ETftError TFT_TextZoom (uint8 auZoomX, uint8 auZoomY)
 Set graphical text zoom.
 
ETftError TFT_TextOutput (ETextAlignment aeAlignment, uint16 auCoordX, uint16 auCoordY, char *apText, uint8 auLength=255, uint8 auEndChar=0)
 Write graphical text.
 
ETftError TFT_TextOutputBlock (uint16 auStartCoordX, uint16 auStartCoordY, uint16 auEndCoordX, uint16 auEndCoordY, EBlockTextAlignment aeBlockAlignment, char *apText, uint8 auLength=255, uint8 auEndChar=0)
 Write graphical text inside a block, filled with back color.
 
ETftError TFT_GraphicColor (uint8 auForeColor, uint8 auBackColor)
 Set graphical colors (text, background).
 
ETftError TFT_RectangleDraw (uint16 auStartCoordX, uint16 auStartCoordY, uint16 auEndCoordX, uint16 auEndCoordY)
 Draw a rectangle.
 
ETftError TFT_LineDraw (uint16 auStartCoordX, uint16 auStartCoordY, uint16 auEndCoordX, uint16 auEndCoordY)
 Draw a line.
 
ETftError TFT_LineContinue (uint16 auEndCoordX, uint16 auEndCoordY)
 Draw a line continuing from last end position.
 
ETftError TFT_PointDraw (uint16 auCoordX, uint16 auCoordY)
 Draw a point.
 
ETftError TFT_GraphicZoom (uint8 auZoomX, uint8 auZoomY)
 Set graphical zoom (point and line thickness).
 
ETftError TFT_GraphicPattern (uint8 auPatternNr)
 Select graphical pattern, used for filled objects.
 
ETftError TFT_RectangleFill (uint16 auStartCoordX, uint16 auStartCoordY, uint16 auEndCoordX, uint16 auEndCoordY, uint8 auColorNo)
 Draw a filled rectangle.
 
ETftError TFT_FrameColor (uint8 auColOut, uint8 auColIn, uint8 auColFill)
 Set graphical frame colors.
 
ETftError TFT_FrameShape (uint8 auFrameNr, uint8 auFrameOrient)
 Define the graphical frame.
 
ETftError TFT_FrameDraw (uint16 auStartCoordX, uint16 auStartCoordY, uint16 auEndCoordX, uint16 auEndCoordY)
 Draw a frame with current definition at given position.
 
ETftError TFT_Brightness (uint16 auBrightness)
 Set display brightness.
 
ETftError TFT_BitmapInternal (uint16 auStartCoordX, uint16 auStartCoordY, uint8 auPictureNr)
 Paint a picture from internal memory.
 
ETftError TFT_BitmapLoad (uint16 auStartCoordX, uint16 auStartCoordY, uint8 *apData, uint16 auDataLen)
 Transfer and paint a picture.
 
ETftError TFT_HardCopy (STFTHardcopy aInstr)
 Stores a hard copy (screenshot) of the current display to the buffer.
 
ETftError TFT_AnimSingle (uint16 auStartCoordX, uint16 auStartCoordY, uint8 auAnimNr, uint8 auPictureNr)
 Show a single picture of an animation.
 
ETftError TFT_InstrumentClear (uint8 auInstrumentNr=0)
 Clear instrument (one or all).
 
ETftError TFT_MacroDisable (char acTyp, uint8 auFirst, uint8 auLast)
 Disable macro (range).
 
ETftError TFT_MacroStop (uint8 auStopRun)
 Stop/start all macros and animations.
 
ETftError TFT_MatrixSize (uint8 auNrOfInp, uint8 auNrOfOut, uint8 auFilter)
 Define matrix of external keyboard.
 
ETftError TFT_Beep (uint8 auStopRun)
 Set beeper.
 
ETftError TFT_ProjectName (char *apBuffer, uint16 auSize)
 Get name of project burned into display.
 
ETftError TFT_InternalInfos (STFTInternalInfo &arInfo)
 Get internal info of display (e.g. resolution).
 
ETftError TFT_LoadMacroFile (const char *sTableName)
 Load the .df file from the database to the TFT.
 
ETftError TFT_TouchFrameColor (uint8 auColNormOut, uint8 auColNormIn, uint8 auColNormFill, uint8 auColSelOut, uint8 auColSelIn, uint8 auColSelFill)
 Set touch button frame color.
 
ETftError TFT_TouchFrameShape (uint8 auFrameNr, uint8 auFrameOrient)
 Set touch button frame shape.
 
ETftError TFT_TouchFontColor (uint8 auColNormal, uint8 auColSelect)
 Set touch button font color.
 
ETftError TFT_TouchFont (uint8 auFontNr)
 Set touch button text font.
 
ETftError TFT_TouchFontZoom (uint8 auZoomX, uint8 auZoomY)
 Set touch button text font zoom.
 
ETftError TFT_TouchKey (uint16 auCoordX, uint16 auCoordY, uint16 auSizeX, uint16 auSizeY, uint8 auUpCode, uint8 auDownCode, char *apText, ETextAlignment aeAlignment=eTACenter)
 Define touch button.
 
ETftError TFT_TouchSwitch (uint16 auCoordX, uint16 auCoordY, uint16 auSizeX, uint16 auSizeY, uint8 auUpCode, uint8 auDownCode, char *apText)
 Define manually switchable touch button.
 
ETftError TFT_TouchArea (uint16 auCoordX, uint16 auCoordY, uint16 auSizeX, uint16 auSizeY)
 Define free touch area.
 
ETftError TFT_TouchReaction (ETouchReaction aeReaction, uint8 auValue)
 Define how display should react on touches.
 
ETftError TFT_TouchInvert (uint8 auBtnCode, ETouchInvert eSet=eTIToggle)
 Invert a touch button.
 
ETftError TFT_TouchClearButton (uint8 auBtnCode=0, uint8 auValue=1)
 Clear a touch button.
 
ETftError TFT_TouchClearArea (uint16 auCoordX=480, uint16 auCoordY=272, uint8 auValue=1)
 Clear touch area surrounding given coordinate.
 
ETftError TouchButton (STouchButton aBtn)
 Define a touch button with all possible properties.
 
ETftError TouchClear ()
 Clear all touch buttons and areas.
 
ETftError SendData (uint8 *apData, uint8 auLength)
 
 CINOSSioTft (XMLNode axConfig)
 Cconstructor.
 
virtual ~CINOSSioTft ()
 Sio Tft display destructor.
 
int operator< (CINOSSioTft &aObject)
 binary tree operators
 
int operator== (CINOSSioTft &aObject)
 
int operator< (const char *aName)
 
int operator== (const char *aName)
 
virtual void PostCreate (void *apParent)
 called after creation
 
virtual bool PreDestroy (bool &bDeleteSelf)
 called before destruction (return false if destruction not allowed)
 
virtual CINCOObject * GetRegister (CINCOObject *apObject=NULL)
 Do inco registration and return pointer to it.
 
void SetWidth (uint16 auWidth)
 Set the display width e.g. as read from display info.
 
void SetHeight (uint16 auHeight)
 Set the display height e.g. as read from display info.
 

Static Public Member Functions

static CINOSSioTftFind (const char *apName)
 Find display object by name.
 
static void Add (CINOSSioTft *apTft)
 Add display to list.
 
static uint32 GetNumber ()
 Get number of displays in list.
 
static CINOSSioTftGetAt (uint32 auIndex)
 Get display by index.
 
static void Create ()
 Create and initialize display handler.
 

Protected Member Functions

void ComHandler ()
 Communication handler, runs in separate task.
 
ETftError GetData (uint8 RecBuf[])
 Get data from display.
 
ETftError RetryGetData (uint8 RecBuf[])
 Retry to get data from display (see GetData)
 
ETftError GetBufferInfo (uint8 &auSend, uint8 &auReceive, bool abEnableRetry=false, bool abAcceptTimeout=false)
 Get number of bytes in display's send and receive buffer.
 
void ParseReply (uint8 *apRecBuffer, uint16 auRecBufferSize)
 Parse buffer for replies.
 
char MapChar (char acChar)
 Map char code to lcd code if necessary.
 
void ActivateKeyboard (XMLNode axKbdLayout, const char *apName)
 Show keyboard on screen.
 
uint8 CalcBcc (uint8 auBuffer[], uint16 auStart, uint16 auLength)
 Calculate checksum.
 
uint8 SendReceive (bool abSynch=true)
 Send out data and wait for acknowledge.
 
ETftError SendData (uint16 auLength, bool abSynch=true)
 Send data in tx fifo to display.
 
uint32 SendTest ()
 Test function.
 
 DECLARE_DYNAMIC (CINOSSioTft)
 

Protected Attributes

XMLNode m_xConfigNode
 Xml config node.
 
const charm_pName
 Display name.
 
const charm_pInterface
 Display interface name (Sio).
 
CINOSSerialInOutm_pSio
 Interface object.
 
CINCOObject * m_pRegister
 Inco registration object.
 
uint16 m_uWidth
 Number of pixels of whole display width.
 
uint16 m_uHeight
 Number of pixels of whole display height.
 
char m_cInputBuffer [128]
 Edit value input buffer.
 
uint16 m_uEditCoordX
 Edit field X coord.
 
uint16 m_uEditCoordY
 Edit field Y coord.
 
uint16 m_uEditSizeX
 Edit field X size.
 
uint16 m_uEditSizeY
 Edit field Y size.
 
uint8 m_uEditBackCol
 Backgound color of "input field".
 
SComBuffer m_TxBuffer
 Transmit buffer.
 
SComFifo m_RxFifo
 Receive fifo.
 
SComFifo m_TxFifo
 Transmit fifo.
 
CINOSTaskm_pHandler
 
STFTEvent m_EventQueue [16]
 Queue of received events from display.
 
uint8 m_uEventRead
 Read index in event queue.
 
uint8 m_uEventWrite
 Write index in event queue.
 
uint32 m_uReplyMask
 Mask of successful replies.
 
char m_cProjectName [256]
 Project name as read from display.
 
STFTInternalInfo m_Info
 Internal info as read from display.
 
uint8 * m_pHardCopyBuffer = nullptr
 
int32 m_iHardCopyDataSize = 0
 
uint32 m_uHardCopyBufferSize = 0
 Hard copy buffer size.
 
uint32 m_uReadRetries = 0
 Number of retries to read data from display.
 

Static Protected Attributes

static CINOSContainer< CINOSSioTft > * m_pTfts
 List of available displays.
 

Detailed Description

Handle TFT display over SIO.

Member Function Documentation

◆ ActivateKeyboard()

void CINOSSioTft::ActivateKeyboard ( XMLNode  axKbdLayout,
const char apName 
)
protected

Show keyboard on screen.

Parameters
axKbdLayoutXML config of layout.
apNameName of value to edit.

◆ Add()

static void CINOSSioTft::Add ( CINOSSioTft apTft)
inlinestatic

Add display to list.

Parameters
apTftPointer of display object to add.

◆ CalcBcc()

uint8 CINOSSioTft::CalcBcc ( uint8  auBuffer[],
uint16  auStart,
uint16  auLength 
)
protected

Calculate checksum.

Parameters
auBufferBuffer with data to checksum.
auStartOffset in buffer of first data.
auLengthLength of data to checksum.
Returns
Claculated checksum.

◆ ClearDisplay()

ETftError CINOSSioTft::ClearDisplay ( )

Clear whole display.

Returns
Tft display communication error.

◆ EditEnterValue()

uint32 CINOSSioTft::EditEnterValue ( const char apName,
STFTFontInfo arFontInfo,
const char apDefaultText,
char apInputText,
uint32  auBufferSize,
const char apKbdDef = NULL,
const char apKbdLayoutName = NULL,
uint32  auReqKeyBoard = 0 
)

Start editing a value.

Parameters
apNameName of value to show (not editable).
arFontInfoFont to use for editing.
apDefaultTextValue default text to show initially.
apInputTextBuffer to get entered text.
auBufferSizeSize of text buffer.
apKbdDefXml file with keyboard definition.
apKbdLayoutNameName of keyboard layout to start with.
Returns
0 for new value, other in case of error/escape etc.
Parameters
auReqKeyBoardIndex of required keyboard (first index is '0')

◆ Find()

static CINOSSioTft * CINOSSioTft::Find ( const char apName)
inlinestatic

Find display object by name.

Parameters
apNameName of display to find.
Returns
Object pointer if display found or NULL.

◆ GetAt()

static CINOSSioTft * CINOSSioTft::GetAt ( uint32  auIndex)
inlinestatic

Get display by index.

Parameters
auIndexIndex of display in list.
Returns
Object pointer if display found or NULL.

◆ GetBufferInfo()

ETftError CINOSSioTft::GetBufferInfo ( uint8 &  auSend,
uint8 &  auReceive,
bool  abEnableRetry = false,
bool  abAcceptTimeout = false 
)
protected

Get number of bytes in display's send and receive buffer.

Parameters
auSendNumber of bytes in display's send buffer ready to send.
auReceiveNumber of free bytes in display's receive buffer.
abEnableRetryAfter a retry it is sometimes needed to throw away first received character. Default: false.
abAcceptTimeoutSet to true, to avoid timeout errors and continue execution anyway. (Default: false)
Note
Parameters abEnableRetry and abAcceptTimeout are needed from hardcopy feature because the display does not always send the expected data.
Returns
Tft display error.

◆ GetConfig()

XMLNode CINOSSioTft::GetConfig ( )
inline

Get config node of display.

Returns
Xml config node.

◆ GetData()

ETftError CINOSSioTft::GetData ( uint8  RecBuf[])
protected

Get data from display.

Parameters
RecBufBuffer to receive data.
Returns
Tft display communication error.

◆ GetEvent()

bool CINOSSioTft::GetEvent ( STFTEvent arEvent)

Get display event (pressed/released buttons, touches, keys).

Parameters
arEventObject to receive event info.
Returns
Flag if new event was returned.

◆ GetFontInfo()

bool CINOSSioTft::GetFontInfo ( uint8  auNumber,
STFTFontInfo arInfo 
)

Get info about font.

Parameters
auNumberNumber of font as used in display.
arInfoObject to receive font info.
Returns
Flag if font with this number was found.

◆ GetHeight()

uint16 CINOSSioTft::GetHeight ( )
inline

Get number of vertical pixels.

Returns
Vertical resolution.

◆ GetName()

const char * CINOSSioTft::GetName ( )
inline

Get name of display.

Returns
Name of display as configured.

◆ GetNumber()

static uint32 CINOSSioTft::GetNumber ( )
inlinestatic

Get number of displays in list.

Returns
Number of displays.

◆ GetRegister()

virtual CINCOObject * CINOSSioTft::GetRegister ( CINCOObject *  apObject = NULL)
virtual

Do inco registration and return pointer to it.

Parameters
apObjectUse this object as main registry, create new if NULL.
Returns
Main registry object.

◆ GetWidth()

uint16 CINOSSioTft::GetWidth ( )
inline

Get number of horizontal pixels.

Returns
Horizontal resolution.

◆ MapChar()

char CINOSSioTft::MapChar ( char  acChar)
protected

Map char code to lcd code if necessary.

Parameters
acCharChar to map.
Returns
Mapped char.

◆ ParseReply()

void CINOSSioTft::ParseReply ( uint8 *  apRecBuffer,
uint16  auRecBufferSize 
)
protected

Parse buffer for replies.

Parameters
apRecBufferBuffer with received data.
auRecBufferSizeSize of buffer.

◆ ResetDisplay()

ETftError CINOSSioTft::ResetDisplay ( )

Init display and clear it.

Returns
Tft display communication error.

◆ RetryGetData()

ETftError CINOSSioTft::RetryGetData ( uint8  RecBuf[])
protected

Retry to get data from display (see GetData)

Parameters
RecBufBuffer to receive data.
Returns
Tft display communication error.
Note
Sends a 'repeat last package' cmd and is also much more tolerant in handling of bcc (experiences for hardcoyp feature revealed a touchy bcc handling of the display).

◆ SendData()

ETftError CINOSSioTft::SendData ( uint16  auLength,
bool  abSynch = true 
)
protected

Send data in tx fifo to display.

Parameters
auLengthLength of data in fifo buffer.
abSynchTrue for synchronous sending, false for immediate return.
Returns
Communication error.

◆ SendReceive()

uint8 CINOSSioTft::SendReceive ( bool  abSynch = true)
protected

Send out data and wait for acknowledge.

Parameters
abSynchTrue for synchronous sending, false for immediate return.
Returns
Received character.

◆ SendTest()

uint32 CINOSSioTft::SendTest ( )
protected

Test function.

Returns
Communication error.

◆ SetHeight()

void CINOSSioTft::SetHeight ( uint16  auHeight)
inline

Set the display height e.g. as read from display info.

Parameters
auHeightNew height in pixels.

◆ SetWidth()

void CINOSSioTft::SetWidth ( uint16  auWidth)
inline

Set the display width e.g. as read from display info.

Parameters
auWidthNew width in pixels.

◆ TFT_AnimSingle()

ETftError CINOSSioTft::TFT_AnimSingle ( uint16  auStartCoordX,
uint16  auStartCoordY,
uint8  auAnimNr,
uint8  auPictureNr 
)

Show a single picture of an animation.

Parameters
auStartCoordXHorizontal coordinate of start point (upper left).
auStartCoordYVertical coordinate of start point (upper left).
auAnimNrNumber of animation to draw a picture from.
auPictureNrNumber of anime picture to draw (starts at 1).
Returns
Communication error.

◆ TFT_Beep()

ETftError CINOSSioTft::TFT_Beep ( uint8  auStopRun)

Set beeper.

Parameters
auStopRun0=off, 1=on, 2..255=time in 1/10 s.
Returns
Communication error.

◆ TFT_BitmapInternal()

ETftError CINOSSioTft::TFT_BitmapInternal ( uint16  auStartCoordX,
uint16  auStartCoordY,
uint8  auPictureNr 
)

Paint a picture from internal memory.

Parameters
auStartCoordXHorizontal coordinate of start point (upper left).
auStartCoordYVertical coordinate of start point (upper left).
auPictureNrNumber of picture to draw.
Returns
Communication error.

◆ TFT_BitmapLoad()

ETftError CINOSSioTft::TFT_BitmapLoad ( uint16  auStartCoordX,
uint16  auStartCoordY,
uint8 *  apData,
uint16  auDataLen 
)

Transfer and paint a picture.

Parameters
auStartCoordXHorizontal coordinate of start point (upper left).
auStartCoordYVertical coordinate of start point (upper left).
apDataPicture data in g16 format.
auDataLenSize of data in bytes.
Returns
Communication error.

◆ TFT_Brightness()

ETftError CINOSSioTft::TFT_Brightness ( uint16  auBrightness)

Set display brightness.

Parameters
auBrightnessBrightness in %, range 0..100 %.
Returns
Communication error.

◆ TFT_DisplayClear()

ETftError CINOSSioTft::TFT_DisplayClear ( )

Clear display content (with background color).

Returns
Communication error.

◆ TFT_DisplayColor()

ETftError CINOSSioTft::TFT_DisplayColor ( uint8  auForeColor,
uint8  auBackColor 
)

Set graphic colors.

Parameters
auForeColorForeground color.
auBackColorBackground color.
Returns
Communication error.

◆ TFT_DisplayFill()

ETftError CINOSSioTft::TFT_DisplayFill ( uint8  auColorNr)

Fill display with given color.

Parameters
auColorNrIndex of color to use for filling.
Returns
Communication error.

◆ TFT_FrameColor()

ETftError CINOSSioTft::TFT_FrameColor ( uint8  auColOut,
uint8  auColIn,
uint8  auColFill 
)

Set graphical frame colors.

Parameters
auColOutColor for outline.
auColInColor for inline.
auColFillColor for filling.
Returns
Communication error.

◆ TFT_FrameDraw()

ETftError CINOSSioTft::TFT_FrameDraw ( uint16  auStartCoordX,
uint16  auStartCoordY,
uint16  auEndCoordX,
uint16  auEndCoordY 
)

Draw a frame with current definition at given position.

Parameters
auStartCoordXHorizontal coordinate of start point (upper left).
auStartCoordYVertical coordinate of start point (upper left).
auEndCoordXHorizontal coordinate of end point (lower right).
auEndCoordYVertical coordinate of end point (lower right).
Returns
Communication error.

◆ TFT_FrameShape()

ETftError CINOSSioTft::TFT_FrameShape ( uint8  auFrameNr,
uint8  auFrameOrient 
)

Define the graphical frame.

Parameters
auFrameNrNumber of frame to use.
auFrameOrientOrientation of frame to use.
Returns
Communication error.

◆ TFT_GraphicColor()

ETftError CINOSSioTft::TFT_GraphicColor ( uint8  auForeColor,
uint8  auBackColor 
)

Set graphical colors (text, background).

Parameters
auForeColorForeground color.
auBackColorBackground color.
Returns
Communication error.

◆ TFT_GraphicPattern()

ETftError CINOSSioTft::TFT_GraphicPattern ( uint8  auPatternNr)

Select graphical pattern, used for filled objects.

Parameters
auPatternNrNumber of pattern to set.
Returns
Communication error.

◆ TFT_GraphicZoom()

ETftError CINOSSioTft::TFT_GraphicZoom ( uint8  auZoomX,
uint8  auZoomY 
)

Set graphical zoom (point and line thickness).

Parameters
auZoomXZoom factor in horizontal direction.
auZoomYZoom factor in vertical direction.
Returns
Communication error.

◆ TFT_HardCopy()

ETftError CINOSSioTft::TFT_HardCopy ( STFTHardcopy  aInstr)

Stores a hard copy (screenshot) of the current display to the buffer.

Parameters
aHardcopyCmdHardcopy command data
Returns
Tft display communication error.

◆ TFT_InstrumentClear()

ETftError CINOSSioTft::TFT_InstrumentClear ( uint8  auInstrumentNr = 0)

Clear instrument (one or all).

Parameters
auInstrumentNrNumber of instrument to clear (0 for all).
Returns
Communication error.

◆ TFT_InternalInfos()

ETftError CINOSSioTft::TFT_InternalInfos ( STFTInternalInfo arInfo)

Get internal info of display (e.g. resolution).

Parameters
arInfoStructure to receive display info.
Returns
Communication error.

◆ TFT_LineContinue()

ETftError CINOSSioTft::TFT_LineContinue ( uint16  auEndCoordX,
uint16  auEndCoordY 
)

Draw a line continuing from last end position.

Parameters
auEndCoordXHorizontal coordinate of end point.
auEndCoordYVertical coordinate of end point.
Returns
Communication error.

◆ TFT_LineDraw()

ETftError CINOSSioTft::TFT_LineDraw ( uint16  auStartCoordX,
uint16  auStartCoordY,
uint16  auEndCoordX,
uint16  auEndCoordY 
)

Draw a line.

Parameters
auStartCoordXHorizontal coordinate of start point.
auStartCoordYVertical coordinate of start point.
auEndCoordXHorizontal coordinate of end point.
auEndCoordYVertical coordinate of end point.
Returns
Communication error.

◆ TFT_LoadMacroFile()

ETftError CINOSSioTft::TFT_LoadMacroFile ( const char sTableName)

Load the .df file from the database to the TFT.

Parameters
sTableNameName of the table containing the .df file
Returns
Communication error.

◆ TFT_MacroDisable()

ETftError CINOSSioTft::TFT_MacroDisable ( char  acTyp,
uint8  auFirst,
uint8  auLast 
)

Disable macro (range).

Parameters
acTypType of macro to disable (N/T/P/B/X/C/V, A=all).
auFirstNumber of first macro to disable.
auLastNumber of last macro to disable.
Returns
Communication error.

◆ TFT_MacroStop()

ETftError CINOSSioTft::TFT_MacroStop ( uint8  auStopRun)

Stop/start all macros and animations.

Parameters
auStopRun0 for stopping, 1 for starting.
Returns
Communication error.

◆ TFT_MatrixSize()

ETftError CINOSSioTft::TFT_MatrixSize ( uint8  auNrOfInp,
uint8  auNrOfOut,
uint8  auFilter 
)

Define matrix of external keyboard.

Parameters
auNrOfInpNumber of inputs of matrix.
auNrOfOutNumber of outputs of matrix.
auFilterFiltering for debouncing (0..7)
Returns
Communication error.

◆ TFT_PointDraw()

ETftError CINOSSioTft::TFT_PointDraw ( uint16  auCoordX,
uint16  auCoordY 
)

Draw a point.

Parameters
auCoordXHorizontal coordinate of point.
auCoordYVertical coordinate of point.
Returns
Communication error.

◆ TFT_ProjectName()

ETftError CINOSSioTft::TFT_ProjectName ( char apBuffer,
uint16  auSize 
)

Get name of project burned into display.

Parameters
apBufferBuffer to receive project name (max 32).
auSizeSize of buffer.
Returns
Communication error.

◆ TFT_RectangleDraw()

ETftError CINOSSioTft::TFT_RectangleDraw ( uint16  auStartCoordX,
uint16  auStartCoordY,
uint16  auEndCoordX,
uint16  auEndCoordY 
)

Draw a rectangle.

Parameters
auStartCoordXHorizontal coordinate of start point (upper left).
auStartCoordYVertical coordinate of start point (upper left).
auEndCoordXHorizontal coordinate of end point (lower right).
auEndCoordYVertical coordinate of end point (lower right).
Returns
Communication error.

◆ TFT_RectangleFill()

ETftError CINOSSioTft::TFT_RectangleFill ( uint16  auStartCoordX,
uint16  auStartCoordY,
uint16  auEndCoordX,
uint16  auEndCoordY,
uint8  auColorNo 
)

Draw a filled rectangle.

Parameters
auStartCoordXHorizontal coordinate of start point (upper left).
auStartCoordYVertical coordinate of start point (upper left).
auEndCoordXHorizontal coordinate of end point (lower right).
auEndCoordYVertical coordinate of end point (lower right).
auColorNoNumber of color to use.
Returns
Communication error.

◆ TFT_TermColor()

ETftError CINOSSioTft::TFT_TermColor ( uint8  auForeColor,
uint8  auBackColor 
)

Set terminal colors (text, background).

Parameters
auForeColorForeground color.
auBackColorBackground color.
Returns
Communication error.

◆ TFT_TermCursorEnable()

ETftError CINOSSioTft::TFT_TermCursorEnable ( uint8  auSet)

Switch terminal cursor on or off.

Parameters
auSet0 for no cursor, 1 for flashing cursor.
Returns
Communication error.

◆ TFT_TermCursorPos()

ETftError CINOSSioTft::TFT_TermCursorPos ( uint8  auColumn,
uint8  auRow 
)

Set terminal cursor position.

Parameters
auColumnTerminal column of cursor.
auRowTerminal row of cursor.
Returns
Communication error.

◆ TFT_TermOutput()

ETftError CINOSSioTft::TFT_TermOutput ( char apText)

Write text in terminal.

Parameters
apTextText to output in terminal.
Returns
Communication error.

◆ TFT_TextColor()

ETftError CINOSSioTft::TFT_TextColor ( uint8  auForeColor,
uint8  auBackColor 
)

Set graphic text colors.

Parameters
auForeColorForeground color.
auBackColorBackground color.
Returns
Communication error.

◆ TFT_TextFont()

ETftError CINOSSioTft::TFT_TextFont ( uint8  auFontNr)

Set graphical text font.

Parameters
auFontNrNumber of font to set.
Returns
Communication error.

◆ TFT_TextOutput()

ETftError CINOSSioTft::TFT_TextOutput ( ETextAlignment  aeAlignment,
uint16  auCoordX,
uint16  auCoordY,
char apText,
uint8  auLength = 255,
uint8  auEndChar = 0 
)

Write graphical text.

Parameters
aeAlignmentAlignment to use (L/C/R).
auCoordXHorizontal coordinate of start point.
auCoordYVertical coordinate of start point.
apTextText to write.
auLengthLength of text to write (or NULL terminated).
auEndCharChar to use as text terminator (NULL/CR/LF).
Returns
Communication error.

◆ TFT_TextOutputBlock()

ETftError CINOSSioTft::TFT_TextOutputBlock ( uint16  auStartCoordX,
uint16  auStartCoordY,
uint16  auEndCoordX,
uint16  auEndCoordY,
EBlockTextAlignment  aeBlockAlignment,
char apText,
uint8  auLength = 255,
uint8  auEndChar = 0 
)

Write graphical text inside a block, filled with back color.

Parameters
auStartCoordXHorizontal coordinate of start point.
auStartCoordYVertical coordinate of start point.
auEndCoordXHorizontal coordinate of end point.
auEndCoordYVertical coordinate of end point.
aeBlockAlignmentAlignment of text in block.
apTextText to write.
auLengthLength of text to write (or NULL terminated).
auEndCharChar to use as text terminator (NULL/CR/LF).
Returns
Communication error.

◆ TFT_TextZoom()

ETftError CINOSSioTft::TFT_TextZoom ( uint8  auZoomX,
uint8  auZoomY 
)

Set graphical text zoom.

Parameters
auZoomXZoom factor in horizontal direction.
auZoomYZoom factor in vertical direction.
Returns
Communication error.

◆ TFT_TouchArea()

ETftError CINOSSioTft::TFT_TouchArea ( uint16  auCoordX,
uint16  auCoordY,
uint16  auSizeX,
uint16  auSizeY 
)

Define free touch area.

Parameters
auCoordXHorizontal coordinate of start point.
auCoordYVertical coordinate of start point.
auSizeXHorizontal size of area.
auSizeYVertical size of area.
Returns
Communication error.

◆ TFT_TouchClearArea()

ETftError CINOSSioTft::TFT_TouchClearArea ( uint16  auCoordX = 480,
uint16  auCoordY = 272,
uint8  auValue = 1 
)

Clear touch area surrounding given coordinate.

Parameters
auCoordXHorizontal coordinate of point.
auCoordYVertical coordinate of point.
auValue0 for keeping it displayed, 1 for clearing it.
Returns
Communication error.

◆ TFT_TouchClearButton()

ETftError CINOSSioTft::TFT_TouchClearButton ( uint8  auBtnCode = 0,
uint8  auValue = 1 
)

Clear a touch button.

Parameters
auBtnCodeCode identifying the touch button (0=all).
auValue0 for keeping it displayed, 1 for clearing it.
Returns
Communication error.

◆ TFT_TouchFont()

ETftError CINOSSioTft::TFT_TouchFont ( uint8  auFontNr)

Set touch button text font.

Parameters
auFontNrNumber of font to set.
Returns
Communication error.

◆ TFT_TouchFontColor()

ETftError CINOSSioTft::TFT_TouchFontColor ( uint8  auColNormal,
uint8  auColSelect 
)

Set touch button font color.

Parameters
auColNormalColor in normal state.
auColSelectColor in selected state.
Returns
Communication error.

◆ TFT_TouchFontZoom()

ETftError CINOSSioTft::TFT_TouchFontZoom ( uint8  auZoomX,
uint8  auZoomY 
)

Set touch button text font zoom.

Parameters
auZoomXZoom factor in horizontal direction.
auZoomYZoom factor in vertical direction.
Returns
Communication error.

◆ TFT_TouchFrameColor()

ETftError CINOSSioTft::TFT_TouchFrameColor ( uint8  auColNormOut,
uint8  auColNormIn,
uint8  auColNormFill,
uint8  auColSelOut,
uint8  auColSelIn,
uint8  auColSelFill 
)

Set touch button frame color.

Parameters
auColNormOutColor in normal state for outline.
auColNormInColor in normal state for inline.
auColNormFillColor in normal state for filling.
auColSelOutColor in selected state for outline.
auColSelInColor in selected state for inline.
auColSelFillColor in selected state for filling.
Returns
Communication error.

◆ TFT_TouchFrameShape()

ETftError CINOSSioTft::TFT_TouchFrameShape ( uint8  auFrameNr,
uint8  auFrameOrient 
)

Set touch button frame shape.

Parameters
auFrameNrNumber of frame to use.
auFrameOrientOrientation of frame to use.
Returns
Communication error.

◆ TFT_TouchInvert()

ETftError CINOSSioTft::TFT_TouchInvert ( uint8  auBtnCode,
ETouchInvert  eSet = eTIToggle 
)

Invert a touch button.

Parameters
auBtnCodeCode identifying the touch button.
eSetSet/clear/toggle button state.
Returns
Communication error.

◆ TFT_TouchKey()

ETftError CINOSSioTft::TFT_TouchKey ( uint16  auCoordX,
uint16  auCoordY,
uint16  auSizeX,
uint16  auSizeY,
uint8  auUpCode,
uint8  auDownCode,
char apText,
ETextAlignment  aeAlignment = eTACenter 
)

Define touch button.

Parameters
auCoordXHorizontal coordinate of start point.
auCoordYVertical coordinate of start point.
auSizeXHorizontal size of button.
auSizeYVertical size of button.
auUpCodeCode returned upon button release.
auDownCodeCode returned upon button press.
apTextText of button.
aeAlignmentText alignment in button.
Returns
Communication error.

◆ TFT_TouchReaction()

ETftError CINOSSioTft::TFT_TouchReaction ( ETouchReaction  aeReaction,
uint8  auValue 
)

Define how display should react on touches.

Parameters
aeReactionReaction of display (invertion, beeper).
auValue0 to switch off, 1 to enable.
Returns
Communication error.

◆ TFT_TouchSwitch()

ETftError CINOSSioTft::TFT_TouchSwitch ( uint16  auCoordX,
uint16  auCoordY,
uint16  auSizeX,
uint16  auSizeY,
uint8  auUpCode,
uint8  auDownCode,
char apText 
)

Define manually switchable touch button.

Parameters
auCoordXHorizontal coordinate of start point.
auCoordYVertical coordinate of start point.
auSizeXHorizontal size of button.
auSizeYVertical size of button.
auUpCodeCode returned upon button release.
auDownCodeCode returned upon button press.
apTextText of button.
Returns
Communication error.

◆ TouchButton()

ETftError CINOSSioTft::TouchButton ( STouchButton  aBtn)

Define a touch button with all possible properties.

Parameters
aBtnObject containing button properties.
Returns
Communication error.

◆ TouchClear()

ETftError CINOSSioTft::TouchClear ( )

Clear all touch buttons and areas.

Returns
Communication error.

Member Data Documentation

◆ m_iHardCopyDataSize

int32 CINOSSioTft::m_iHardCopyDataSize = 0
protected

Number of valid bytes in buffer

Note
the buffer size might be bigger than this value

◆ m_pHardCopyBuffer

uint8* CINOSSioTft::m_pHardCopyBuffer = nullptr
protected

Pointer to memory buffer for storing the hard copy (screen shots) in format g16 (with / without RLE).


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