SmartGPU2-LCD480X320Touch-CommandSet

SMART GPU 2 3.5” TOUCH
Command Set
Vizic Technologies ©2014 139
2.12.3 Object Switch 54hex ‘T’ ascii
Commands (host)
9 bytes
1.- 0x4F (hex), O (ascii). *OBJECT command.
2.- 0x54((hex), T (ascii).
3.- X coord high byte.
4.- X coord low byte.
5.- Y coord high byte.
6.- Y coord low byte.
7.- Switch Size high byte.
8.- Switch Size low byte.
9.- Active State (On/Off).
Responses (device)
1 byte
1.- 0x4F (hex), O (ascii) success ACK or
0x46 (hex), F (ascii) fail NAK.
Description
This Command generates-draws an On/Off
Switch object with the received top left X(16bit)
and Y(16bit) coordinates and received Switch
Size(16bit), the resulting Switch will measure
“Switch Size” pixels in X axis and “Switch Size”/2
pixels in Y axis.
This is a simple but useful object to create GUIs
that need switches.
*Minimum “Switch size” accepted parameter is
40(dec), which means that the smallest switch that
can be created is 40x20 pixels.
Example (sent commands)
Example 1:
<4F,54,00,0A,00,0A,00,64,00> Draw an Off(0x00)
state Switch object starting at the top left corner:
X:10(dec), Y:10(dec).