INOS
cinossiotft.h
Go to the documentation of this file.
1//******************************************************************************
27//******************************************************************************
28
29
30#if !defined(_CINOSSIOTFT)
31#define _CINOSSIOTFT
32
33
34//------------------------------------------------------------------------------
35// includes
36//------------------------------------------------------------------------------
37
38#include <cinoscontainer.h>
39#include <xmlparser.h>
40
42
43
44//------------------------------------------------------------------------------
45// defines
46//------------------------------------------------------------------------------
47
49#define DF_SIO_TFT_MOD_XDB "xcfg-mod-sio-tft"
50
51// ascii chars 0-31 don't produce an output and can be used for special meanings
52#define DF_SIOTFT_KEY_NOP 0
53#define DF_SIOTFT_KEY_ENTER 1
54#define DF_SIOTFT_KEY_DELETE 2
55#define DF_SIOTFT_KEY_UP 3
56#define DF_SIOTFT_KEY_DOWN 4
57#define DF_SIOTFT_KEY_LEFT 5
58#define DF_SIOTFT_KEY_RIGHT 6
59#define DF_SIOTFT_KEY_CLEAR 7
60#define DF_SIOTFT_KEY_ESCAPE 8
61#define DF_SIOTFT_KEY_LAYOUT 9
62
63#define DF_SIOTFT_EVENT_QUEUE_SIZE 16
64
65// text styles such as stretch, invert etc
66#define DF_SIOTFT_NORMAL 0x00000000
67#define DF_SIODIS_STRETCHX 0x00000001
68#define DF_SIODIS_STRETCHY 0x00000002
69#define DF_SIOTFT_STRETCH (DF_SIODIS_STRETCHX|DF_SIODIS_STRETCHY)
70#define DF_SIODIS_INVERT 0x00000004
71
72#define DF_SIOTFT_Pix_X 480
73#define DF_SIOTFT_Pix_Y 272
74
75// special chars for tft
76#define DF_SIOTFT_DC1 0x11
77#define DF_SIOTFT_DC2 0x12
78#define DF_SIOTFT_ESC 0x1B
79#define DF_SIOTFT_ACK 0x06
80#define DF_SIOTFT_NAK 0x15
81
83#define DF_SIOTFT_CMD_AREA 0xD0
84
85// tft pre defined colors
86#define DF_SIOTFT_Col_transparent 0
87#define DF_SIOTFT_Col_black 1
88#define DF_SIOTFT_Col_blue 2
89#define DF_SIOTFT_Col_red 3
90#define DF_SIOTFT_Col_green 4
91#define DF_SIOTFT_Col_magenta 5
92#define DF_SIOTFT_Col_cyan 6
93#define DF_SIOTFT_Col_yellow 7
94#define DF_SIOTFT_Col_white 8
95#define DF_SIOTFT_Col_dark_gray 9
96#define DF_SIOTFT_Col_orange 10
97#define DF_SIOTFT_Col_purple 11
98#define DF_SIOTFT_Col_light_red 12
99#define DF_SIOTFT_Col_dark_cyan 13
100#define DF_SIOTFT_Col_light_green 14
101#define DF_SIOTFT_Col_light_blue 15
102#define DF_SIOTFT_Col_gray 16
103
104// terminal cursor
105#define DF_SIOTFT_Cursor_OFF 0
106#define DF_SIOTFT_Cursor_ON 1
107
108// Define touch button inversion.
109enum ETouchInvert
110{
111 eTIClear=0,
112 eTISet=1,
113 eTIToggle=2
114};
115
116// Define touch reaction.
117enum ETouchReaction
118{
119 eTRInvert,
120 eTRSummer
121};
122
123// Define text alignment.
124enum ETextAlignment
125{
126 eTALeft=0x4C, // "L"
127 eTACenter=0x43, // "C"
128 eTARight=0x52 // "R"
129};
130
131
134{
135 eBTUpperLeft=1,
136 eBTUpperCenter=2,
137 eBTUpperRight=3,
138 eBTMiddleLeft=4,
139 eBTMiddleCenter=5,
140 eBTMiddleRight=6,
141 eBTLowerLeft=7,
142 eBTLowerCenter=8,
143 eBTLowerRight=9
144};
145
146
149{
150 eErrNoError=0,
151 eErrFrameErrorACK,
152 eErrFrameErrorESC,
153 eErrFrameErrorDC1,
154 eErrFrameErrorDC2,
155 eErrFrameErrorLen,
156 eErrTimeout,
157 eErrChecksum
158};
159
162{
163 eTftRplAnaTouch = 0x00000001
164 , eTftRplMatrix = 0x00000002
165 , eTftRplTouchArea = 0x00000004
166 , eTftRplProjectName = 0x00000008
167 , eTftRplInternalInfo = 0x00000010
168 , eTftRplHardCopy = 0x00000020
169};
170
171// Hold event from display
173{
174 uint8 m_uCode; // touch code, free touch event, matrix keyboard etc
175 uint8 m_uInfo; // pressed, released etc
176 uint16 m_uXCoord; // X coord if free touch event
177 uint16 m_uYCoord; // Y coord if free touch event
178};
179
182{
183 char m_cASCII;
184 char m_cLCD;
185};
186
215
231
232
233//------------------------------------------------------------------------------
234// describe a touch-button
235//------------------------------------------------------------------------------
236
239{
240 uint8 m_uOutSide;
241 uint8 m_uInSide;
242 uint8 m_uFill;
243};
244
247{
248 uint8 m_uFrameNr;
249 uint8 m_uOrientNr;
250};
251
254{
255 uint8 m_uColorNormal;
256 uint8 m_uColorSelected;
257 uint8 m_uFontNr;
258 uint8 m_uZoomX;
259 uint8 m_uZoomY;
260};
261
264{
265 SBtnFrameColor m_FrameColorNormal;
266 SBtnFrameColor m_FrameColorSelected;
267 SBtnFrameShape m_FrameShape;
268 SBtnFont m_ButtonFont;
269 uint16 m_uSizeX;
270 uint16 m_uSizeY;
271};
272
273
276{
277 uint8 m_uNumber;
278 int8 m_iWidth; // -1 = proportional
279 uint8 m_uHeight;
280 uint8 m_uZoomX;
281 uint8 m_uZoomY;
282
283 void Init() {
284 m_uNumber=0;m_iWidth=-1;m_uHeight=0;m_uZoomX=0;m_uZoomY=0;
285 }
286
287 uint8 GetRealWidth() {
288 // there's no fixed width for proportional fonts
289 ASSERT_ALWAYS(m_iWidth!=-1);
290 return m_iWidth*m_uZoomX;
291 }
292
293 uint8 GetRealHeight() {
294 return m_uHeight*m_uZoomY;
295 }
296};
297
298
299// TX/RX buffer
301 uint16 m_uFrameLength;
302 uint8 m_uBuffer[259]; // PktNr,DC1,len,255,bcc = 259bytes
303};
304
306struct SComFifo {
307 uint8 m_uAddrIn;
308 uint8 m_uAddrOut;
309 uint8 m_uBuffer[256];
310
313 void Reset() {
314 memset(this, 0, sizeof(SComFifo));
315 }
316
321 // don't overflow buffer
322 if ((uint16)m_uAddrIn<sizeof(m_uBuffer)) {
323 m_uBuffer[m_uAddrIn++]=auByte;
324 }
325 }
326
331 return m_uAddrIn-m_uAddrOut;
332 }
333
338 return m_uBuffer[m_uAddrOut++];
339 }
340};
341
342
343//------------------------------------------------------------------------------
344// variables
345//------------------------------------------------------------------------------
346
347
348//------------------------------------------------------------------------------
349// CINOSSioTft
350//------------------------------------------------------------------------------
351
355{
356 //--- user interface -------------------------------------------------------
357 public:
358 // Universal display-handling-functions
359
364 static CINOSSioTft* Find(const char* apName) {
365 if (!m_pTfts) {
366 return NULL;
367 }
368 // return result
369 return m_pTfts->Find(apName);
370 }
371
375 static void Add(CINOSSioTft* apTft) {
376 if (!m_pTfts) {
377 Create();
378 }
379 m_pTfts->Add(apTft);
380 }
381
385 static uint32 GetNumber() {
386 if (!m_pTfts) {
387 return 0;
388 }
389 return m_pTfts->GetNumber();
390 }
391
397 if (!m_pTfts) {
398 return NULL;
399 }
400 return m_pTfts->GetAt(auIndex);
401 }
402
406 const char* GetName() {
407 return m_pName;
408 }
409
414 return m_xConfigNode;
415 }
416
421 return m_uWidth;
422 }
423
428 return m_uHeight;
429 }
430
435
440
447
453
466 const char* apDefaultText, char* apInputText, uint32 auBufferSize,
467 const char* apKbdDef=NULL, const char* apKbdLayoutName=NULL,
469
470
471 // ---------------------------------------------------------------------
472 // display terminal commands
473 // ---------------------------------------------------------------------
474
481
488
494
500
501
502 // ---------------------------------------------------------------------
503 // display graphical/text commands
504 // ---------------------------------------------------------------------
505
512
517
523
530
536
543
554 uint16 auCoordY, char* apText, uint8 auLength=255, uint8 auEndChar=0);
555
569 char* apText, uint8 auLength=255, uint8 auEndChar=0);
570
577
587
597
604
611
618
624
635
643
650
660
666
667 // ---------------------------------------------------------------------
668 // display bitmap/animation commands
669 // ---------------------------------------------------------------------
670
678 uint8 auPictureNr);
679
688 uint8* apData, uint16 auDataLen);
689
696
705 uint8 auAnimNr, uint8 auPictureNr);
706
707
708 // ---------------------------------------------------------------------
709 // display bargraph commands
710 // ---------------------------------------------------------------------
711
712
713 // ---------------------------------------------------------------------
714 // display instrument commands
715 // ---------------------------------------------------------------------
716
722
723
724 // ---------------------------------------------------------------------
725 // display macro commands
726 // ---------------------------------------------------------------------
727
735
741
742
743 // ---------------------------------------------------------------------
744 // display analog inputs commands
745 // ---------------------------------------------------------------------
746
747
748 // ---------------------------------------------------------------------
749 // display general commands
750 // ---------------------------------------------------------------------
751
759
765
772
778
784
785 // ---------------------------------------------------------------------
786 // display touch commands
787 // ---------------------------------------------------------------------
788
799 uint8 auColNormFill, uint8 auColSelOut, uint8 auColSelIn,
800 uint8 auColSelFill);
801
808
815
821
828
841 uint16 auSizeY, uint8 auUpCode, uint8 auDownCode, char* apText,
842 ETextAlignment aeAlignment=eTACenter);
843
855 uint16 auSizeY, uint8 auUpCode, uint8 auDownCode, char* apText);
856
866
873
879 ETftError TFT_TouchInvert(uint8 auBtnCode, ETouchInvert eSet=eTIToggle);
880
887
895 uint16 auCoordY=DF_SIOTFT_Pix_Y, uint8 auValue=1);
896
902
907
908 /* \brief General data send function.
909 \param apData Buffer of data to send to display.
910 \param auLength Length of data to send to display.
911 \return Communication error.
912 */
913 ETftError SendData(uint8* apData, uint8 auLength);
914
915
916 //--- internals ------------------------------------------------------------
917
918 public:
922 virtual ~CINOSSioTft();
923
926 { return (strcmp(GetName(), aObject.GetName())<0);}
928 { return (strcmp(GetName(), aObject.GetName())==0);}
929 int operator < (const char* aName)
930 { return (strcmp(GetName(), aName)<0);}
931 int operator == (const char* aName)
932 { return (strcmp(GetName(), aName)==0);}
934 virtual void PostCreate(void* apParent){};
936 virtual bool PreDestroy(bool& bDeleteSelf)
937 { return true; };
938
941 static void Create() {
942 if (!m_pTfts) {
943 m_pTfts=new CINOSContainer<CINOSSioTft>("TFT", "CINOSSioTft");
944 pINCOItems->Add(m_pTfts->GetRegister(false));
945 }
946 }
947
952 virtual CINCOObject* GetRegister(CINCOObject* apObject=NULL);
953
960
967
968 protected:
972
978
988
1002 bool abEnableRetry=false, bool abAcceptTimeout=false);
1003
1009
1014 char MapChar(char acChar);
1015
1021
1029
1034 uint8 SendReceive(bool abSynch=true);
1035
1042
1047
1048 protected:
1054 const char* m_pName;
1056 const char* m_pInterface;
1060 CINCOObject* m_pRegister;
1077
1084
1085 // pointer to com handler task
1086 CINOSTask* m_pHandler;
1087
1089 STFTEvent m_EventQueue[DF_SIOTFT_EVENT_QUEUE_SIZE];
1094
1101
1104 uint8* m_pHardCopyBuffer = nullptr;
1111 // (because display does not always send the required data)
1113
1114 // dynamic object handling
1116};
1117
1118
1119//------------------------------------------------------------------------------
1120
1121#endif // _CINOSSIOTFT
1122
1123
1124//------------------------------------------------------------------------------
1125// end of file
CINOSContainer declaration file.
#define DECLARE_DYNAMIC(aClass)
Definition cinospartitionmemory.h:328
ETftError
Errors of tft display functions.
Definition cinossiotft.h:149
EBlockTextAlignment
Define text alignment in block text output.
Definition cinossiotft.h:134
ETftReply
Type of replies successfully received from tft display.
Definition cinossiotft.h:162
Definition cinosmcmodule.h:1900
Definition cinossiotft.h:355
void SetHeight(uint16 auHeight)
Set the display height e.g. as read from display info.
Definition cinossiotft.h:964
ETftError TFT_HardCopy(STFTHardcopy aInstr)
Stores a hard copy (screenshot) of the current display to the buffer.
static CINOSSioTft * GetAt(uint32 auIndex)
Get display by index.
Definition cinossiotft.h:396
ETftError TFT_TextOutput(ETextAlignment aeAlignment, uint16 auCoordX, uint16 auCoordY, char *apText, uint8 auLength=255, uint8 auEndChar=0)
Write graphical text.
bool GetFontInfo(uint8 auNumber, STFTFontInfo &arInfo)
Get info about font.
void ComHandler()
Communication handler, runs in separate task.
uint8 * m_pHardCopyBuffer
Definition cinossiotft.h:1104
ETftError TFT_GraphicPattern(uint8 auPatternNr)
Select graphical pattern, used for filled objects.
bool GetEvent(STFTEvent &arEvent)
Get display event (pressed/released buttons, touches, keys).
uint32 m_uReadRetries
Number of retries to read data from display.
Definition cinossiotft.h:1112
ETftError TFT_TermCursorEnable(uint8 auSet)
Switch terminal cursor on or off.
ETftError TFT_TouchFontColor(uint8 auColNormal, uint8 auColSelect)
Set touch button font color.
ETftError TFT_TermCursorPos(uint8 auColumn, uint8 auRow)
Set terminal cursor position.
ETftError TFT_RectangleFill(uint16 auStartCoordX, uint16 auStartCoordY, uint16 auEndCoordX, uint16 auEndCoordY, uint8 auColorNo)
Draw a filled rectangle.
uint32 m_uReplyMask
Mask of successful replies.
Definition cinossiotft.h:1096
ETftError TFT_Beep(uint8 auStopRun)
Set beeper.
uint32 m_uHardCopyBufferSize
Hard copy buffer size.
Definition cinossiotft.h:1109
ETftError TFT_FrameDraw(uint16 auStartCoordX, uint16 auStartCoordY, uint16 auEndCoordX, uint16 auEndCoordY)
Draw a frame with current definition at given position.
STFTEvent m_EventQueue[16]
Queue of received events from display.
Definition cinossiotft.h:1089
char m_cInputBuffer[128]
Edit value input buffer.
Definition cinossiotft.h:1066
ETftError RetryGetData(uint8 RecBuf[])
Retry to get data from display (see GetData)
ETftError TFT_BitmapLoad(uint16 auStartCoordX, uint16 auStartCoordY, uint8 *apData, uint16 auDataLen)
Transfer and paint a picture.
ETftError TFT_TouchInvert(uint8 auBtnCode, ETouchInvert eSet=eTIToggle)
Invert a touch button.
uint32 SendTest()
Test function.
XMLNode m_xConfigNode
Xml config node.
Definition cinossiotft.h:1052
ETftError TFT_MacroStop(uint8 auStopRun)
Stop/start all macros and animations.
uint16 m_uEditCoordX
Edit field X coord.
Definition cinossiotft.h:1068
ETftError ResetDisplay()
Init display and clear it.
uint8 CalcBcc(uint8 auBuffer[], uint16 auStart, uint16 auLength)
Calculate checksum.
int operator<(CINOSSioTft &aObject)
binary tree operators
Definition cinossiotft.h:925
ETftError TFT_MacroDisable(char acTyp, uint8 auFirst, uint8 auLast)
Disable macro (range).
ETftError TFT_LineDraw(uint16 auStartCoordX, uint16 auStartCoordY, uint16 auEndCoordX, uint16 auEndCoordY)
Draw a line.
void ActivateKeyboard(XMLNode axKbdLayout, const char *apName)
Show keyboard on screen.
ETftError TFT_GraphicZoom(uint8 auZoomX, uint8 auZoomY)
Set graphical zoom (point and line thickness).
ETftError TFT_DisplayFill(uint8 auColorNr)
Fill display with given color.
uint8 m_uEventRead
Read index in event queue.
Definition cinossiotft.h:1091
uint16 m_uEditSizeY
Edit field Y size.
Definition cinossiotft.h:1074
STFTInternalInfo m_Info
Internal info as read from display.
Definition cinossiotft.h:1100
ETftError TFT_TextFont(uint8 auFontNr)
Set graphical text font.
SComBuffer m_TxBuffer
Transmit buffer.
Definition cinossiotft.h:1079
ETftError SendData(uint16 auLength, bool abSynch=true)
Send data in tx fifo to display.
void ParseReply(uint8 *apRecBuffer, uint16 auRecBufferSize)
Parse buffer for replies.
ETftError TFT_InstrumentClear(uint8 auInstrumentNr=0)
Clear instrument (one or all).
ETftError TFT_TouchFont(uint8 auFontNr)
Set touch button text font.
ETftError GetData(uint8 RecBuf[])
Get data from display.
uint16 m_uEditCoordY
Edit field Y coord.
Definition cinossiotft.h:1070
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.
uint8 m_uEditBackCol
Backgound color of "input field".
Definition cinossiotft.h:1076
ETftError TFT_TouchSwitch(uint16 auCoordX, uint16 auCoordY, uint16 auSizeX, uint16 auSizeY, uint8 auUpCode, uint8 auDownCode, char *apText)
Define manually switchable touch button.
ETftError TFT_TouchClearArea(uint16 auCoordX=480, uint16 auCoordY=272, uint8 auValue=1)
Clear touch area surrounding given coordinate.
virtual CINCOObject * GetRegister(CINCOObject *apObject=NULL)
Do inco registration and return pointer to it.
ETftError TFT_GraphicColor(uint8 auForeColor, uint8 auBackColor)
Set graphical colors (text, background).
uint16 GetWidth()
Get number of horizontal pixels.
Definition cinossiotft.h:420
ETftError TFT_LoadMacroFile(const char *sTableName)
Load the .df file from the database to the TFT.
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_TouchArea(uint16 auCoordX, uint16 auCoordY, uint16 auSizeX, uint16 auSizeY)
Define free touch area.
ETftError TFT_FrameShape(uint8 auFrameNr, uint8 auFrameOrient)
Define the graphical frame.
ETftError TFT_ProjectName(char *apBuffer, uint16 auSize)
Get name of project burned into display.
ETftError TFT_DisplayClear()
Clear display content (with background color).
uint16 m_uWidth
Number of pixels of whole display width.
Definition cinossiotft.h:1062
XMLNode GetConfig()
Get config node of display.
Definition cinossiotft.h:413
ETftError TFT_InternalInfos(STFTInternalInfo &arInfo)
Get internal info of display (e.g. resolution).
const char * m_pInterface
Display interface name (Sio).
Definition cinossiotft.h:1056
ETftError TFT_TouchFontZoom(uint8 auZoomX, uint8 auZoomY)
Set touch button text font zoom.
SComFifo m_TxFifo
Transmit fifo.
Definition cinossiotft.h:1083
ETftError TFT_TouchFrameColor(uint8 auColNormOut, uint8 auColNormIn, uint8 auColNormFill, uint8 auColSelOut, uint8 auColSelIn, uint8 auColSelFill)
Set touch button frame color.
uint16 GetHeight()
Get number of vertical pixels.
Definition cinossiotft.h:427
static void Create()
Create and initialize display handler.
Definition cinossiotft.h:941
static void Add(CINOSSioTft *apTft)
Add display to list.
Definition cinossiotft.h:375
CINOSSioTft(XMLNode axConfig)
Cconstructor.
const char * GetName()
Get name of display.
Definition cinossiotft.h:406
virtual void PostCreate(void *apParent)
called after creation
Definition cinossiotft.h:934
ETftError TFT_FrameColor(uint8 auColOut, uint8 auColIn, uint8 auColFill)
Set graphical frame colors.
ETftError TFT_TermColor(uint8 auForeColor, uint8 auBackColor)
Set terminal colors (text, background).
const char * m_pName
Display name.
Definition cinossiotft.h:1054
char MapChar(char acChar)
Map char code to lcd code if necessary.
uint16 m_uHeight
Number of pixels of whole display height.
Definition cinossiotft.h:1064
uint16 m_uEditSizeX
Edit field X size.
Definition cinossiotft.h:1072
ETftError TFT_AnimSingle(uint16 auStartCoordX, uint16 auStartCoordY, uint8 auAnimNr, uint8 auPictureNr)
Show a single picture of an animation.
uint8 m_uEventWrite
Write index in event queue.
Definition cinossiotft.h:1093
CINCOObject * m_pRegister
Inco registration object.
Definition cinossiotft.h:1060
virtual bool PreDestroy(bool &bDeleteSelf)
called before destruction (return false if destruction not allowed)
Definition cinossiotft.h:936
ETftError TFT_MatrixSize(uint8 auNrOfInp, uint8 auNrOfOut, uint8 auFilter)
Define matrix of external keyboard.
ETftError TFT_RectangleDraw(uint16 auStartCoordX, uint16 auStartCoordY, uint16 auEndCoordX, uint16 auEndCoordY)
Draw a rectangle.
ETftError TFT_BitmapInternal(uint16 auStartCoordX, uint16 auStartCoordY, uint8 auPictureNr)
Paint a picture from internal memory.
ETftError TFT_TouchReaction(ETouchReaction aeReaction, uint8 auValue)
Define how display should react on touches.
SComFifo m_RxFifo
Receive fifo.
Definition cinossiotft.h:1081
static uint32 GetNumber()
Get number of displays in list.
Definition cinossiotft.h:385
ETftError TouchButton(STouchButton aBtn)
Define a touch button with all possible properties.
ETftError TFT_TextColor(uint8 auForeColor, uint8 auBackColor)
Set graphic text colors.
ETftError TFT_TextZoom(uint8 auZoomX, uint8 auZoomY)
Set graphical text zoom.
virtual ~CINOSSioTft()
Sio Tft display destructor.
int32 m_iHardCopyDataSize
Definition cinossiotft.h:1107
ETftError TFT_TermOutput(char *apText)
Write text in terminal.
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_TouchClearButton(uint8 auBtnCode=0, uint8 auValue=1)
Clear a touch button.
ETftError ClearDisplay()
Clear whole display.
ETftError GetBufferInfo(uint8 &auSend, uint8 &auReceive, bool abEnableRetry=false, bool abAcceptTimeout=false)
Get number of bytes in display's send and receive buffer.
static CINOSContainer< CINOSSioTft > * m_pTfts
List of available displays.
Definition cinossiotft.h:1050
ETftError TFT_TouchFrameShape(uint8 auFrameNr, uint8 auFrameOrient)
Set touch button frame shape.
char m_cProjectName[256]
Project name as read from display.
Definition cinossiotft.h:1098
CINOSSerialInOut * m_pSio
Interface object.
Definition cinossiotft.h:1058
ETftError TouchClear()
Clear all touch buttons and areas.
void SetWidth(uint16 auWidth)
Set the display width e.g. as read from display info.
Definition cinossiotft.h:957
uint8 SendReceive(bool abSynch=true)
Send out data and wait for acknowledge.
ETftError TFT_DisplayColor(uint8 auForeColor, uint8 auBackColor)
Set graphic colors.
static CINOSSioTft * Find(const char *apName)
Find display object by name.
Definition cinossiotft.h:364
ETftError TFT_Brightness(uint16 auBrightness)
Set display brightness.
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.
Definition cinostask.h:52
#define ASSERT_ALWAYS(f)
Definition inosmacro.h:696
Define a button's font.
Definition cinossiotft.h:254
Define a button's colors.
Definition cinossiotft.h:239
Define a button's frame.
Definition cinossiotft.h:247
Definition cinossiotft.h:300
Communication fifo buffer.
Definition cinossiotft.h:306
uint8 Get()
Get next byte from fifo buffer.
Definition cinossiotft.h:337
void Put(uint8 auByte)
Add byte to fifo buffer.
Definition cinossiotft.h:320
uint8 Level()
Return fifo buffer level.
Definition cinossiotft.h:330
void Reset()
Reset buffer.
Definition cinossiotft.h:313
Structure for mapping ASCII special chars to LCD chars.
Definition cinossiotft.h:182
Definition cinossiotft.h:173
Information about a system font.
Definition cinossiotft.h:276
Definition cinossiotft.h:219
int16 m_iEndXX2
X-Coordinate for hardcopy lower right corner (xx2)
Definition cinossiotft.h:225
int16 m_iStartXX1
X-Coordinate for hardcopy upper left corner (xx1)
Definition cinossiotft.h:221
int16 m_iEndYY2
Y-Coordinate for hardcopy lower right corner (yy2)
Definition cinossiotft.h:227
int16 m_iStartYY1
Y-Coordinate for hardcopy upper left corner (yy1)
Definition cinossiotft.h:223
bool m_bUseRLE
defines whether hardcopy has to be taken with RLE compression
Definition cinossiotft.h:229
Structure for internal display info.
Definition cinossiotft.h:189
uint16 m_uCRCRomS
Supposed CRC of ROM.
Definition cinossiotft.h:205
char m_cHardwareRevision[2]
Hardware revision.
Definition cinossiotft.h:197
uint16 m_uSizeY
Display Y resolution.
Definition cinossiotft.h:193
uint16 m_uCRCDataFlash
CRC of data flash.
Definition cinossiotft.h:207
uint32 m_uDataFlashSize
Complete size of data flash in bytes.
Definition cinossiotft.h:211
uint16 m_uCRCRom
CRC of ROM.
Definition cinossiotft.h:203
char m_cTouchInfoY[2]
Touch info, '+' Y direction recognized ('-' if not).
Definition cinossiotft.h:201
uint32 m_uDataFlashUsed
Used size of data flash in bytes.
Definition cinossiotft.h:213
char m_cTouchInfoX[2]
Touch info, '+' X direction recognized ('-' if not).
Definition cinossiotft.h:199
uint8 m_uSoftwareVersion
Software version.
Definition cinossiotft.h:195
uint16 m_uCRCDataFlashS
Supposed CRC of data flash.
Definition cinossiotft.h:209
uint16 m_uSizeX
Display X resolution.
Definition cinossiotft.h:191
All information defining a touch button.
Definition cinossiotft.h:264