SmartGPU2-LCD480X320Touch-CommandSet

SMART GPU 2 3.5” TOUCH
Command Set
Vizic Technologies ©2014 48
2.4.3 Display String 53hex - S ascii
Commands (host)
10 bytes + string + 1byte(NULL)
1.- 0x53 (hex), S (ascii). *String Command.
2.- 0x53 (hex), S (ascii).
3.- X1 coord high byte.
4.- X1 coord low byte.
5.- Y1 coord high byte.
6.- Y1 coord low byte.
7.- X2 coord high byte.
8.- X2 coord low byte.
9.- Y2 coord high byte.
10.- Y2 coord low byte.
11 up to N.- string text (hex) ascii equivalent.
N+1.- 0x00 (hex) NULL ascii.
Responses (device)
SPC(2 bytes) + 1 byte ACK
1.- SPC high byte
2.- SPC low byte
3.- 0x4F (hex), O (ascii) success ACK.
0x46 (hex), F (ascii) fail NAK.
*SPC stands for Successfully Printed Chars.
Description
This command displays a string on the screen on an
imaginary text box, with the given points: X1(16bit),
Y1(16bit) as top left corner, and X2(16bit), Y2(16bit) as
bottom right corner.
The text or string is automatically adjusted to fit in this
defined text box, if the text is longer to fit in the text box,
it will stop discarding all the rest of the String. The
command always return the SPC(successfully printed
bytes), this way user can determine how many of the
chars fitted and were printed on the received text box.
The maximum size of string to receive in one same
call is 5000 bytes + NULL character. The host must
always send the NULL(0x00 hex) character after the
string to indicate end of string.
Text size, text colour, text background colour, and
filled of unfilled background must be set with the
Strings Config Command, Default are Size 0, White
text colour, Black background colour and unfilled
background.
Colour format is the same RGB565.