Elements Sub Func: Difference between revisions

From Smart LCD
Created page with "== TPK, VPK Call Functions == Call functions are functions which could be called up by TPK or VPK. === Call Functions - Operations === {| !'''Function''' !'''Descriptions''' |- |VP:= VP XOR Value | Predefine VP variable XOR with a constant stay in Value, and store the result back into the VP variable E.g. VP_N32(0x020000)=0x0055, properties' Value= 0x00AA; result VP_N32 (0x020000)=0x00FF |- |BUFF:= VP | Copy the VP variable content to the BUFF(string format) loc..."
 
 
(3 intermediate revisions by the same user not shown)
Line 4: Line 4:
=== Call Functions - Operations ===
=== Call Functions - Operations ===
{|
{|
!'''Function'''
|'''Function'''
!'''Descriptions'''
|'''Descriptions'''
|-
|-
|VP:= VP XOR Value
|VP:= VP XOR Value
Line 18: Line 18:
|-
|-
|VP:= BUFF
|VP:= BUFF
|Copy  the BUFF  content to a VP variable (integer or a string)
|
 
Copy  the BUFF  content to a VP variable (integer or a string)
E.g. VP(BUFF)=“123”, result  VP_N32(0x020000)=123 (note: string converted to interger)
E.g. VP(BUFF)=“123”, result  VP_N32(0x020000)=123 (note: string converted to interger)
|-
|-
|VP:= Value
|VP:= Value
|Copy  a constant stay in Value to a VP variable
|
 
Copy  a constant stay in Value to a VP variable
E.g. properties' Value= 123;  result VP_N32(0x020000)=123
E.g. properties' Value= 123;  result VP_N32(0x020000)=123
|-
|-
|VP:= VP + Value
|VP:= VP + Value
|Predefine  VP variable add with a constant stay in Value, and  store the result back into the VP variable
|
 
Predefine  VP variable add with a constant stay in Value, and  store the result back into the VP variable
E.g. VP_N32(0x020000)=666, Value=2; result VP_N32 (0x020000)=668
E.g. VP_N32(0x020000)=666, Value=2; result VP_N32 (0x020000)=668
|-
|-
|VP:= VP - Value
|VP:= VP - Value
|Predefine  VP variable minus by a constant stay in Value, and  store the result back into the VP variable
|
 
Predefine  VP variable minus by a constant stay in Value, and  store the result back into the VP variable
E.g. VP_N32(0x020000)=666, Value=10;  result VP_N32  (0x020000)=656
E.g. VP_N32(0x020000)=666, Value=10;  result VP_N32  (0x020000)=656
|-
|-
|VP:= VP + Value, loop
|VP:= VP + Value, loop
|Predefine  VP variable times by a constant stay in Value, and  store the result back into the VP variable
|
 
Predefine  VP variable times by a constant stay in Value, and  store the result back into the VP variable
If  the value is bigger than the predefined maximum, it will "loop" to  the predefined minimum.
If  the value is bigger than the predefined maximum, it will "loop" to  the predefined minimum.
 
E.g. VP_N32(0x020000)=666, Value=2; result VP_N32 (0x020000)=668
E.g. VP_N32(0x020000)=666, Value=2; result VP_N32 (0x020000)=668
|-
|-
|VP:= VP - Value, loop
|VP:= VP - Value, loop
|Predefine  VP variable minus by a constant stay in Value, and  store the result back into the VP variable
|
 
Predefine  VP variable minus by a constant stay in Value, and  store the result back into the VP variable
If  the value is smaller than the predefined minimum, it will "loop" to  the predefined maximum.
If  the value is smaller than the predefined minimum, it will "loop" to  the predefined maximum.
 
E.g. VP_N32(0x020000)=666, Value=10;  result VP_N32  (0x020000)=656
E.g. VP_N32(0x020000)=666, Value=10;  result VP_N32  (0x020000)=656
|-
|-
|VP:= VP * Value
|VP:= VP * Value
|Predefine  VP variable times by a constant stay in Value, and  store the result back into the VP variable
|
 
Predefine  VP variable times by a constant stay in Value, and  store the result back into the VP variable
Eg: VP_N32(0x020000)=666, Value=10; result VP_N32 (0x020000)=6660
Eg: VP_N32(0x020000)=666, Value=10; result VP_N32 (0x020000)=6660
|-
|-
|VP:= VP/Value
|VP:= VP/Value
|Predefine  VP variable divided by a constant  stay in Value, and store the result back into the VP variable
|
 
Predefine  VP variable divided by a constant  stay in Value, and store the result back into the VP variable
E.g. VP_N32(0x020000)=666, Value=2; result VP_N32 (0x020000)=333
E.g. VP_N32(0x020000)=666, Value=2; result VP_N32 (0x020000)=333
|-
|-
|Byte0(VP):= Byte0(Value)
|Byte0(VP):= Byte0(Value)
|Copy the constant byte0(lowest byte) stay in Value to VP variable byte0(Lowest byte) location
|
 
Copy the constant byte0(lowest byte) stay in Value to VP variable byte0(Lowest byte) location
E.g. VP_N32(0x020000)=0x5555, Value=0x0A;  result  VP_N32 (0x020000)=0x550A
E.g. VP_N32(0x020000)=0x5555, Value=0x0A;  result  VP_N32 (0x020000)=0x550A
|-
|-
|Byte1(VP):= Byte0(Value)
|Byte1(VP):= Byte0(Value)
|Copy the constant byte0(lowest byte) stay in Value to VP variable byte1 location
|
 
Copy the constant byte0(lowest byte) stay in Value to VP variable byte1 location
E.g. VP_N32(0x020000)=0x5555, Value=0x0A; result VP_N32 (0x020000)=0x0A55
E.g. VP_N32(0x020000)=0x5555, Value=0x0A; result VP_N32 (0x020000)=0x0A55
|-
|-
|Byte2(VP):= Byte0(Value)
|Byte2(VP):= Byte0(Value)
|Copy the constant byte0(lowest byte) stay in Value to VP variable byte2 location
|
 
Copy the constant byte0(lowest byte) stay in Value to VP variable byte2 location
E.g. VP_N32(0x020000)=0x5555, Value=0x0A; result VP_N32 (0x020000)=0x0A5555
E.g. VP_N32(0x020000)=0x5555, Value=0x0A; result VP_N32 (0x020000)=0x0A5555
|-
|-
|Byte3(VP):= Byte0(Value)
|Byte3(VP):= Byte0(Value)
|Copy the constant byte0(lowest byte) stay in Value to VP variable byte3(Highest byte) location
|
 
Copy the constant byte0(lowest byte) stay in Value to VP variable byte3(Highest byte) location
E.g. VP_N32(0x020000)=0x5555,  Value=0x0A;  result  VP_N32 (0x020000)=0x0A005555
E.g. VP_N32(0x020000)=0x5555,  Value=0x0A;  result  VP_N32 (0x020000)=0x0A005555
|-
|-
|Bit0(VP):= LSB(Value)
|Bit0(VP):= LSB(Value)
|Copy the constant LSB stay in Value to VP variable bit0(LSB) location
|
 
Copy the constant LSB stay in Value to VP variable bit0(LSB) location
E.g. VP_N32(0x020000)=0x0000, Value=0x01;  result VP_N32  (0x020000)=0x0001
E.g. VP_N32(0x020000)=0x0000, Value=0x01;  result VP_N32  (0x020000)=0x0001
|-
|-
|Bit1(VP):= LSB(Value)
|Bit1(VP):= LSB(Value)
|Copy the constante LSB stay in Value to VP variable bit1 location
|
 
Copy the constante LSB stay in Value to VP variable bit1 location
Eg: VP_N32(0x020000)=0x0000, Value=0x01; result VP_N32 (0x020000)=0x0002
Eg: VP_N32(0x020000)=0x0000, Value=0x01; result VP_N32 (0x020000)=0x0002
|-
|-
|Bit2(VP):= LSB(Value)
|Bit2(VP):= LSB(Value)
|Copy the constant LSB stay in Value to VP variable bit2 location
|
 
Copy the constant LSB stay in Value to VP variable bit2 location
E.g. VP_N32(0x020000)=0x0000, Value=0x01;  result VP_N32  (0x020000)=0x0004
E.g. VP_N32(0x020000)=0x0000, Value=0x01;  result VP_N32  (0x020000)=0x0004
|-
|-
|Bit3(VP):= LSB(Value)
|Bit3(VP):= LSB(Value)
|Copy the constant LSB stay in Value to VP variable bit3 location
|
 
Copy the constant LSB stay in Value to VP variable bit3 location
E.g. VP_N32(0x020000)=0x0000, Value=0x01;  result VP_N32  (0x020000)=0x0008
E.g. VP_N32(0x020000)=0x0000, Value=0x01;  result VP_N32  (0x020000)=0x0008
|-
|-
|Bit4(VP):= LSB(Value)
|Bit4(VP):= LSB(Value)
|Copy the constant LSB stay in Value to VP variable bit4 location
|
 
Copy the constant LSB stay in Value to VP variable bit4 location
E.g. VP_N32(0x020000)=0x0000, Value=0x01; result VP_N32 (0x020000)=0x0010
E.g. VP_N32(0x020000)=0x0000, Value=0x01; result VP_N32 (0x020000)=0x0010
|-
|-
|Bit5(VP):= LSB(Value)
|Bit5(VP):= LSB(Value)
|Copy the constant LSB stay in Value to VP variable bit5 location
|
 
Copy the constant LSB stay in Value to VP variable bit5 location
E.g. VP_N32(0x020000)=0x0000, Value= 0x01; result VP_N32 (0x020000)=0x0020
E.g. VP_N32(0x020000)=0x0000, Value= 0x01; result VP_N32 (0x020000)=0x0020
|-
|-
|Bit6(VP):= LSB(Value)
|Bit6(VP):= LSB(Value)
|Copy the constant LSB stay in Value to VP variable bit6 location
|
 
Copy the constant LSB stay in Value to VP variable bit6 location
E.g. VP_N32(0x020000)=0x0000, Value= 0x01; result VP_N32 (0x020000)=0x0040
E.g. VP_N32(0x020000)=0x0000, Value= 0x01; result VP_N32 (0x020000)=0x0040
|-
|-
|Bit7(VP):= LSB(Value)
|Bit7(VP):= LSB(Value)
|Copy the constant LSB stay in Value to VP variable bit7 location
|
 
Copy the constant LSB stay in Value to VP variable bit7 location
E.g. VP_N32(0x020000)=0x0000,  Value= 0x01; result VP_N32 (0x020000)=0x0080
E.g. VP_N32(0x020000)=0x0000,  Value= 0x01; result VP_N32 (0x020000)=0x0080
|}
|}


=== Call Functions - Keyboards ===
=== Call Functions - Keyboards ===
{| class="wikitable"
{|
|'''Function'''
|'''Function'''
|'''Descriptions'''
|'''Descriptions'''
|-
|-
|Keyboard Number
|Keyboard Number
|Number Keyboard for number value input and  report the value to the host.(*1)
|
 
Number Keyboard for number value input and  report the value to the host.(*1)
The input value will be stored inside the  predefined VP Variable
The input value will be stored inside the  predefined VP Variable
|-
|-
|Keyboard Password
|Keyboard Password
|Password Keyboard for number password input.  (display as *, 9char max.) and report the input  value to the host. (*1) The input value will be stored inside the predefined VP Variable
|
Password Keyboard for number password input.  (display as *, 9char max.) and report the input  value to the host. (*1)
The input value will be stored inside the predefined VP Variable
|-
|-
|Keyboard English
|Keyboard English
|English Keyboard for English input and report the  input value to the host. (*1)
|
 
English Keyboard for English input and report the  input value to the host. (*1)
The input value will be stored inside the  predefined VP Variable
The input value will be stored inside the  predefined VP Variable
|-
|-
|Keyboard Chinese
|Keyboard Chinese
|Chinese Pinyin Keyboard for number value input  and report the value to the host. (*1)
|
 
Chinese Pinyin Keyboard for number value input  and report the value to the host. (*1)
The input value will be stored inside the  predefined VP Variable
The input value will be stored inside the  predefined VP Variable
|-
|-
|PIP Menu
|PIP Menu
|Page-in-page Menu is a customizable menu. It pop-up a little window of another page as a menu selection input and report  the input value to the host. (*1)
|
 
Page-in-page Menu is a customizable menu.  
The input value will be stored inside the  predefined VP Variable
It pop-up a little window of another page as a menu selection input and report  the input value to the host. (*1)
The input value will be stored inside the  predefined VP Variable
|-
|-
|PIP Keyboard
|PIP Keyboard
|Page-in-page Keyboard is a customizable keyboard.  It could pop up a little window of another page as a keyboard keys and report  the input value to the host. (*1)
|
 
Page-in-page Keyboard is a customizable keyboard.
The input value will be stored inside the  predefined VP Variable.
  It could pop up a little window of another page as a keyboard keys and report  the input value to the host. (*1)
The input value will be stored inside the  predefined VP Variable.
|-
|-
|PIP Number Keyboard
|PIP Number Keyboard
|Page-in-page Number Keyboard is a customizable  keyboard. It pop up a little window of another page as a keyboard keys and report  the input value to the host. (*1)
|
 
Page-in-page Number Keyboard is a customizable  keyboard.  
The input value will be stored inside the  predefined VP Variable.
It pop up a little window of another page as a keyboard keys and report  the input value to the host. (*1)
The input value will be stored inside the  predefined VP Variable.
|-
|-
|PIP RTC
|PIP RTC
|Page-in-page RTC is a customizable interface to  adjust the Real Time Clock time.
|
 
Page-in-page RTC is a customizable interface to  adjust the Real Time Clock time.
It could pop up a little window of another page  as a keyboard keys.
It could pop up a little window of another page  as a keyboard keys.
|-
|-
|Adjust Backlight
|Adjust Backlight
|Backlight brightness level setting.
|
Backlight brightness level setting.
|-
|-
|Adjust RTC
|Adjust RTC
|Real Time Clock time adjust interface.
|
Real Time Clock time adjust interface.
|-
|-
|Slider Single
|Slider Single
|Single slider input interface input is corresponding ratio of the  predefined max. min. value and report the input value  to the host. (*1) The input value will be stored inside the predefined VP Variable.
|
Single slider input interface input is corresponding ratio of the  predefined max. min. value and report the input value  to the host. (*1)  
The input value will be stored inside the predefined VP Variable.
|-
|-
|Slider Dual
|Slider Dual
|Dual slider input interface function as Single Slider with two VP  Variable input,
|
 
Dual slider input interface function as Single Slider with two VP  Variable input,
Where, the two slider will limit each other for non-overlapped value input and report the input value to the host. (*1) The two input value will be stored inside two  successive predefined VP Variable.
Where, the two slider will limit each other for non-overlapped value input and report the input value to the host. (*1) The two input value will be stored inside two  successive predefined VP Variable.
|-
|-
|Listing
|Listing
|VP_STR listing window
|
 
VP_STR listing window
Display the VP_STR content with predefined VP_STR  Address and no. of VP_STR to be display. Providing touch and scroll  interface.
Display the VP_STR content with predefined VP_STR  Address and no. of VP_STR to be display. Providing touch and scroll  interface.
|-
|-
|Listing with Slider
|Listing with Slider
|VP_STR listing window
|
 
VP_STR listing window
Display the VP_STR content with predefined VP_STR  Address and no. of VP_STR to be display. Providing slider bar for scroll.
Display the VP_STR content with predefined VP_STR  Address and no. of VP_STR to be display. Providing slider bar for scroll.
|}
|}
Note: *1. Entered value that report to host with command header 0x77
Note: *1. Entered value that report to host with command header 0x77


=== Call Functions - PIP Keyboard's keys ===
=== Call Functions - PIP Keyboard's keys ===
{| class="wikitable"
{|
|'''Function'''
|'''Function'''
|'''Descriptions'''
|'''Descriptions'''
|-
|-
|Enter
|Enter
|Enter key for PIP keyboard for finishing and  confirming the input.
|
Enter key for PIP keyboard for finishing and  confirming the input.
|-
|-
|Esc
|Esc
|Escape key for PIP keyboard/menu.
|
 
Escape key for PIP keyboard/menu.
It could cancel the input and close the PIP  keyboard/menu.
It could cancel the input and close the PIP  keyboard/menu.
|-
|-
|CapsLock
|CapsLock
|CapsLock key function for PIP Keyboard
|
CapsLock key function for PIP Keyboard
|-
|-
|VP:= Value, Enter
|VP:= Value, Enter
|Directly assigning the value into VP variable and  follow with a Enter to confirm the input.
|
 
Directly assigning the value into VP variable and  follow with a Enter to confirm the input.
Mainly for PIP menu items selection
Mainly for PIP menu items selection
|-
|-
|Buff:=Con(Buff,Cap,
|Buff:=Con(Buff,Cap,


Nom(Byte0/Byte1))
Nom(Byte0/Byte1))
|Generally key call for PIP keyboard with  (Capslock feature)
|
Generally key call for PIP keyboard with  (Capslock feature)
It will put the lower byte value  into the end of Buff area.
If the CapsLock toggled, the high byte will be  insert into the end of the Buff area
(note:  its value in properties should be a 16bit formatted value)
|-
|VP:=Concatenate(VP,Value)
|
Put its properties value to the end of  the content of the predefined VP value
Mainly work with BUFF as a general char input
E.g.  VP(BUFF)=  “123”,  Properties' Value = 4, after call VP(BUFF)=“1234”
|-
|VP:= DelLastChar(VP)
|
Delete the last byte of the the VP variable
Mainly for VP(BUFF) as a  backspace funciton.
E.g. VP(BUFF)=“123”, after call VP(BUFF)=“12”
|}


It will put the lower byte value  into the end of Buff area.
== Draw Pad (DPD) in-memory command Functions ==


If the CapsLock toggled, the high byte will be  insert into the end of the Buff area
* Draw Pad element is an element that execute a drawing function that store inside VP_N16which point by its properties VP_address.
* Host could send the Function Pack into VP by using Multi_Write (0x82) or N16_Write (0x3D) command.
* it is possible to adjust the function or parameter by VPK, TPK or Page_Call.
* And it will refresh/update the Draw Pad content accordingly.
* Each Draw Pad Element could only execute ONE command multiple times.
* The coordinate of the drawing content is based on the page coordinate.
* The Draw Pad element area is the valid area that shows the content.


(note:  its value in properties should be a 16bit formatted value)
=== Draw Pad Element Function Pack Structure ===
{| class="wikitable"
!'''Address'''
!'''Content'''
!'''Descriptions'''
|-
|VP
|CMD
|Command  function
|-
|VP+2
|Number_of_Parmeter_SET
|Number  of parameter set (*2)
|-
|-
|VP:=Concatenate(VP,Value)
|VP+4
|Put its properties value to the end of  the content of the predefined VP value
|Parameter_set
|Parameter  sets for command (*1)
|}


Mainly work with BUFF as a general char input
=== Draw Pad Element Functions ===
{| class="wikitable"
! rowspan="2" |'''CMD'''
! rowspan="2" |'''Name'''
! colspan="3" |'''Parameter Set'''
!
|-
!'''Relative Add  Seq'''
!'''Size'''


E.g.  VP(BUFF)=  “123”,  Properties' Value = 4, after call VP(BUFF)=“1234”
'''in byte'''
!'''Definitions'''
!'''Descriptions'''
|-
|-
|VP:= DelLastChar(VP)
| rowspan="2" |0x0001
|Delete the last byte of the the VP variable
| rowspan="2" |Draw_dot
|0x00
|4
|xh,xl,yh,yl
|Dot  coordinate (*1)
|-
|0x04
|2
|Color
|Dot color
|-
| rowspan="5" |0x0002
| rowspan="5" |Draw_successive_line
|0x00
|2
|Color
|Line color (*3)
|-
|0x02
|4
|x0h,x0l,y0h,y0l
|Coordinate  of the line  starting point (*1)
|-
|0x06
|4
|X1h,x1l,y1h,y1l
|Line to this  coordinate
|-
|:
|4
|:
|:
|-
|0x02+4*n
|4
|xnh,xnl,ynh,ynl
|Last  coordinate for line
|-
| rowspan="3" |0x0003
| rowspan="3" |Draw_line
|0x00
|4
|xsh,xsl,ysh,ysl
|Line start  coordinate (*1)
|-
|0x04
|4
|xeh,xel,yeh,yel
|Line end  coordinate
|-
|0x08
|2
|Color
|Line color
|-
| rowspan="3" |0x0004
| rowspan="3" |Draw_rectangle
|0x00
|4
|xsh,xsl,ysh,ysl
|Top-left  corner coordinate (*1)
|-
|0x04
|4
|xeh,xel,yeh,yel
|Bottom-right  corner coordinate
|-
|0x08
|2
|Color
|Rectangle  line color
|-
| rowspan="3" |0x0005
| rowspan="3" |Fill_rectangle
|0x00
|4
|xsh,xsl,ysh,ysl
|Top-left  corner coordinate (*1)
|-
|0x04
|4
|xeh,xel,yeh,yel
|Bottom-right  corner coordinate
|-
|0x08
|2
|Color
|Rectangle  fill color
|-
| rowspan="4" |0x0006
| rowspan="4" |Show_crop_Page_BKG
|0x00
|2
|PAGE_IDh,PAGE_IDl
|PAGE's  background image (NOT IMG_BKG) to be crop and show (*1)
|-
|0x02
|4
|xsh,xsl,ysh,ysl
|Top-left  corner coordinate for crop
|-
|0x06
|4
|xeh,xel,yeh,yel
|Bottom-right  corner coordinate for crop
|-
|0x0a
|4
|xh,xl,yh,yl
|Top-left  corner coordinate for showing the cropped image on screen
|-
| rowspan="2" |0x0007
| rowspan="2" |Show_IMG_ICO
|0x00
|4
|xh,xl,yh,yl
|Top-left  corner coordinate for showing the cropped image on screen (*1)
|-
|0x04
|2
|IMG_ICO_ID
|IMG_ICON to  be show
|-
| rowspan="5" |0x0008
| rowspan="5" |Show_text
|0x00
|4
|xh,xl,yh,yl
|Top-left  corner coordinate for showing the text on screen (*1)
|-
|0x04
|2
|Color
|Text  color
|-
|0x06(0x06H)
|1
|FONT_ID
|Font  ID
|-
|0x07(0x06L)
|1
|Text_len
|Text  length in no. of byte
|-
|0x08
|n
|Text_STRING
|Text  content
|}
Note.
 
<nowiki>*</nowiki>1. First byte of this parameter could "control" the functionality
 
 - 0xFF terminate the following draw function
 
 - 0xFE terminate current parmeter_set, jump to next parameter_set


Mainly for VP(BUFF) as a  backspace funciton.
<nowiki>*</nowiki>2. Draw_successive_line need n set for (n-1) lines


E.g. VP(BUFF)=“123”, after call VP(BUFF)=“12”
<nowiki>*</nowiki>3. Color is excluded from Number_of_Parmeter_SET
|}

Latest revision as of 15:00, 10 May 2025

TPK, VPK Call Functions

Call functions are functions which could be called up by TPK or VPK.

Call Functions - Operations

Function Descriptions
VP:= VP XOR Value
Predefine  VP variable XOR with a constant stay in Value, and store the result back into  the VP variable
E.g. VP_N32(0x020000)=0x0055, properties'  Value=  0x00AA; result VP_N32 (0x020000)=0x00FF
BUFF:= VP
Copy  the VP variable content to the BUFF(string format) location.
E.g. VP_N32(0x020000)=123;  result VP_STR(BUFF)=“123”  (note: number converted to string)
VP:= BUFF
Copy  the BUFF  content to a VP variable (integer or a string)
E.g. VP(BUFF)=“123”, result  VP_N32(0x020000)=123 (note: string converted to interger)
VP:= Value
Copy  a constant stay in Value to a VP variable
E.g. properties' Value= 123;  result VP_N32(0x020000)=123
VP:= VP + Value
Predefine  VP variable add with a constant stay in Value, and  store the result back into the VP variable
E.g. VP_N32(0x020000)=666, Value=2; result VP_N32 (0x020000)=668
VP:= VP - Value
Predefine  VP variable minus by a constant stay in Value, and  store the result back into the VP variable
E.g. VP_N32(0x020000)=666, Value=10;  result VP_N32  (0x020000)=656
VP:= VP + Value, loop
Predefine  VP variable times by a constant stay in Value, and  store the result back into the VP variable
If  the value is bigger than the predefined maximum, it will "loop" to  the predefined minimum.
E.g. VP_N32(0x020000)=666, Value=2; result VP_N32 (0x020000)=668
VP:= VP - Value, loop
Predefine  VP variable minus by a constant stay in Value, and  store the result back into the VP variable
If  the value is smaller than the predefined minimum, it will "loop" to  the predefined maximum.
E.g. VP_N32(0x020000)=666, Value=10;  result VP_N32  (0x020000)=656
VP:= VP * Value
Predefine  VP variable times by a constant stay in Value, and  store the result back into the VP variable
Eg: VP_N32(0x020000)=666, Value=10; result VP_N32 (0x020000)=6660
VP:= VP/Value
Predefine  VP variable divided by a constant  stay in Value, and store the result back into the VP variable
E.g. VP_N32(0x020000)=666, Value=2; result VP_N32 (0x020000)=333
Byte0(VP):= Byte0(Value)
Copy the constant byte0(lowest byte) stay in Value to VP variable byte0(Lowest byte) location
E.g. VP_N32(0x020000)=0x5555, Value=0x0A;  result  VP_N32 (0x020000)=0x550A
Byte1(VP):= Byte0(Value)
Copy the constant byte0(lowest byte) stay in Value to VP variable byte1 location
E.g. VP_N32(0x020000)=0x5555, Value=0x0A; result VP_N32 (0x020000)=0x0A55
Byte2(VP):= Byte0(Value)
Copy the constant byte0(lowest byte) stay in Value to VP variable byte2 location
E.g. VP_N32(0x020000)=0x5555, Value=0x0A; result VP_N32 (0x020000)=0x0A5555
Byte3(VP):= Byte0(Value)
Copy the constant byte0(lowest byte) stay in Value to VP variable byte3(Highest byte) location
E.g. VP_N32(0x020000)=0x5555,  Value=0x0A;  result  VP_N32 (0x020000)=0x0A005555
Bit0(VP):= LSB(Value)
Copy the constant LSB stay in Value to VP variable bit0(LSB) location
E.g. VP_N32(0x020000)=0x0000, Value=0x01;  result VP_N32  (0x020000)=0x0001
Bit1(VP):= LSB(Value)
Copy the constante LSB stay in Value to VP variable bit1 location
Eg: VP_N32(0x020000)=0x0000, Value=0x01; result VP_N32 (0x020000)=0x0002
Bit2(VP):= LSB(Value)
Copy the constant LSB stay in Value to VP variable bit2 location
E.g. VP_N32(0x020000)=0x0000, Value=0x01;  result VP_N32  (0x020000)=0x0004
Bit3(VP):= LSB(Value)
Copy the constant LSB stay in Value to VP variable bit3 location
E.g. VP_N32(0x020000)=0x0000, Value=0x01;  result VP_N32  (0x020000)=0x0008
Bit4(VP):= LSB(Value)
Copy the constant LSB stay in Value to VP variable bit4 location
E.g. VP_N32(0x020000)=0x0000, Value=0x01; result VP_N32 (0x020000)=0x0010
Bit5(VP):= LSB(Value)
Copy the constant LSB stay in Value to VP variable bit5 location
E.g. VP_N32(0x020000)=0x0000, Value= 0x01; result VP_N32 (0x020000)=0x0020
Bit6(VP):= LSB(Value)
Copy the constant LSB stay in Value to VP variable bit6 location
E.g. VP_N32(0x020000)=0x0000, Value= 0x01; result VP_N32 (0x020000)=0x0040
Bit7(VP):= LSB(Value)
Copy the constant LSB stay in Value to VP variable bit7 location
E.g. VP_N32(0x020000)=0x0000,  Value= 0x01; result VP_N32 (0x020000)=0x0080

Call Functions - Keyboards

Function Descriptions
Keyboard Number
Number Keyboard for number value input and  report the value to the host.(*1)
The input value will be stored inside the  predefined VP Variable
Keyboard Password
Password Keyboard for number password input.  (display as *, 9char max.) and report the input  value to the host. (*1)
The input value will be stored inside the predefined VP Variable
Keyboard English
English Keyboard for English input and report the  input value to the host. (*1)
The input value will be stored inside the  predefined VP Variable
Keyboard Chinese
Chinese Pinyin Keyboard for number value input  and report the value to the host. (*1)
The input value will be stored inside the  predefined VP Variable
PIP Menu
Page-in-page Menu is a customizable menu. 
It pop-up a little window of another page as a menu selection input and report  the input value to the host. (*1)
The input value will be stored inside the  predefined VP Variable
PIP Keyboard
Page-in-page Keyboard is a customizable keyboard.  
It could pop up a little window of another page as a keyboard keys and report  the input value to the host. (*1)
The input value will be stored inside the  predefined VP Variable.
PIP Number Keyboard
Page-in-page Number Keyboard is a customizable  keyboard. 
It pop up a little window of another page as a keyboard keys and report  the input value to the host. (*1)
The input value will be stored inside the  predefined VP Variable.
PIP RTC
Page-in-page RTC is a customizable interface to  adjust the Real Time Clock time.
It could pop up a little window of another page  as a keyboard keys.
Adjust Backlight
Backlight brightness level setting.
Adjust RTC
Real Time Clock time adjust interface.
Slider Single
Single slider input interface input is corresponding ratio of the  predefined max. min. value and report the input value  to the host. (*1) 
The input value will be stored inside the predefined VP Variable.
Slider Dual
Dual slider input interface function as Single Slider with two VP  Variable input,
Where, the two slider will limit each other for non-overlapped value input and report the input value to the host. (*1) The two input value will be stored inside two  successive predefined VP Variable.
Listing
VP_STR listing window
Display the VP_STR content with predefined VP_STR  Address and no. of VP_STR to be display. Providing touch and scroll  interface.
Listing with Slider
VP_STR listing window
Display the VP_STR content with predefined VP_STR  Address and no. of VP_STR to be display. Providing slider bar for scroll.

Note: *1. Entered value that report to host with command header 0x77

Call Functions - PIP Keyboard's keys

Function Descriptions
Enter
Enter key for PIP keyboard for finishing and  confirming the input.
Esc
Escape key for PIP keyboard/menu.
It could cancel the input and close the PIP  keyboard/menu.
CapsLock
CapsLock key function for PIP Keyboard
VP:= Value, Enter
Directly assigning the value into VP variable and  follow with a Enter to confirm the input.
Mainly for PIP menu items selection
Buff:=Con(Buff,Cap,

Nom(Byte0/Byte1))

Generally key call for PIP keyboard with  (Capslock feature)
It will put the lower byte value  into the end of Buff area.
If the CapsLock toggled, the high byte will be  insert into the end of the Buff area
(note:  its value in properties should be a 16bit formatted value)
VP:=Concatenate(VP,Value)
Put its properties value to the end of  the content of the predefined VP value
Mainly work with BUFF as a general char input
E.g.  VP(BUFF)=  “123”,  Properties' Value = 4, after call VP(BUFF)=“1234”
VP:= DelLastChar(VP)
Delete the last byte of the the VP variable
Mainly for VP(BUFF) as a  backspace funciton.
E.g. VP(BUFF)=“123”, after call VP(BUFF)=“12”

Draw Pad (DPD) in-memory command Functions

  • Draw Pad element is an element that execute a drawing function that store inside VP_N16which point by its properties VP_address.
  • Host could send the Function Pack into VP by using Multi_Write (0x82) or N16_Write (0x3D) command.
  • it is possible to adjust the function or parameter by VPK, TPK or Page_Call.
  • And it will refresh/update the Draw Pad content accordingly.
  • Each Draw Pad Element could only execute ONE command multiple times.
  • The coordinate of the drawing content is based on the page coordinate.
  • The Draw Pad element area is the valid area that shows the content.

Draw Pad Element Function Pack Structure

Address Content Descriptions
VP CMD Command function
VP+2 Number_of_Parmeter_SET Number of parameter set (*2)
VP+4 Parameter_set Parameter sets for command (*1)

Draw Pad Element Functions

CMD Name Parameter Set
Relative Add Seq Size

in byte

Definitions Descriptions
0x0001 Draw_dot 0x00 4 xh,xl,yh,yl Dot coordinate (*1)
0x04 2 Color Dot color
0x0002 Draw_successive_line 0x00 2 Color Line color (*3)
0x02 4 x0h,x0l,y0h,y0l Coordinate of the line starting point (*1)
0x06 4 X1h,x1l,y1h,y1l Line to this coordinate
: 4 : :
0x02+4*n 4 xnh,xnl,ynh,ynl Last coordinate for line
0x0003 Draw_line 0x00 4 xsh,xsl,ysh,ysl Line start coordinate (*1)
0x04 4 xeh,xel,yeh,yel Line end coordinate
0x08 2 Color Line color
0x0004 Draw_rectangle 0x00 4 xsh,xsl,ysh,ysl Top-left corner coordinate (*1)
0x04 4 xeh,xel,yeh,yel Bottom-right corner coordinate
0x08 2 Color Rectangle line color
0x0005 Fill_rectangle 0x00 4 xsh,xsl,ysh,ysl Top-left corner coordinate (*1)
0x04 4 xeh,xel,yeh,yel Bottom-right corner coordinate
0x08 2 Color Rectangle fill color
0x0006 Show_crop_Page_BKG 0x00 2 PAGE_IDh,PAGE_IDl PAGE's background image (NOT IMG_BKG) to be crop and show (*1)
0x02 4 xsh,xsl,ysh,ysl Top-left corner coordinate for crop
0x06 4 xeh,xel,yeh,yel Bottom-right corner coordinate for crop
0x0a 4 xh,xl,yh,yl Top-left corner coordinate for showing the cropped image on screen
0x0007 Show_IMG_ICO 0x00 4 xh,xl,yh,yl Top-left corner coordinate for showing the cropped image on screen (*1)
0x04 2 IMG_ICO_ID IMG_ICON to be show
0x0008 Show_text 0x00 4 xh,xl,yh,yl Top-left corner coordinate for showing the text on screen (*1)
0x04 2 Color Text color
0x06(0x06H) 1 FONT_ID Font ID
0x07(0x06L) 1 Text_len Text length in no. of byte
0x08 n Text_STRING Text content

Note.

*1. First byte of this parameter could "control" the functionality

 - 0xFF terminate the following draw function

 - 0xFE terminate current parmeter_set, jump to next parameter_set

*2. Draw_successive_line need n set for (n-1) lines

*3. Color is excluded from Number_of_Parmeter_SET