e z L C D -‐ 4 0 5
|
34
Rev.
© 2016 Earth Computers Tech. Inc.
1.5.3.1 ezButton
The ezButton (ez = easy) protocol is the easiest way to use the touch screen. All you have to do
is:
1. Design the icons of the buttons.
The following button states are supported:
·∙ Button Up
·∙ Button Down
·∙ Button Disabled
Use your favorite software to design the bitmaps of the button states. It is not necessary to
design the bitmaps of all the button states. As a matter of fact, the button may exist without
the bitmaps assigned to any of the above states.
2. Write the designed icons into the ezLCD-‐405 Serial Flash.
Use ezLCD004flash.exe or other utility to store the bitmaps in the ezLCD-‐405 Serial Flash. Note
which bitmap ID should be assigned to each state of the particular button.
3. In your code, select ezButton protocol.
Send
TOUCH_PROTOCOL
(1) command to the ezLCD.
4. In your code, define the buttons using
BUTTON_DEF
command.
Send
BUTTON_DEF
command for each of the buttons that you want to use. The
BUTTON_DEF
command specifies:
·∙ Button Number (ID)
·∙ Initial state of the button
·∙ Bitmaps for each of the button states
·∙ The position of the button
·∙ The touch sensitive area of the button (touch zone)
At this point the ezLCD-‐405 starts broadcasting
ezButton events
for the defined buttons.
You can respond to those events using ezLCD command
BUTTON_STATE
, which will redraw the
button in its new state.
Sending of the ezButton events by the ezLCD
·∙ The ezLCD sends the ezButton event only once per button state change. If you need to have
the button state continuously updated, please use the
cuButton
protocol instead.
·∙ The button cannot be pressed just by sliding the finger onto the button touch zone. The ezLCD
sends the Button Down Event only if the button is directly pressed.
·∙ When the button is already pressed, it may only be released by removing the finger from the
touch screen. Sliding the finger out of the button area will not release the button.
Содержание ezLCD-405
Страница 1: ......
Страница 22: ...e z L C D 4 0 5 22 Rev 2016 Earth Computers Tech Inc Figure 2 ezLCD 405 Schematic...
Страница 23: ...e z L C D 4 0 5 23 Rev 2016 Earth Computers Tech Inc 1 3 2 Pin Configuration Figure 3 ezLCD 405 Connectors...
Страница 32: ...e z L C D 4 0 5 32 Rev 2016 Earth Computers Tech Inc...
Страница 52: ...e z L C D 4 0 5 52 Rev 2016 Earth Computers Tech Inc SET_COLOR SET_XY...
Страница 102: ...e z L C D 4 0 5 102 Rev 2016 Earth Computers Tech Inc...
Страница 109: ...e z L C D 4 0 5 109 Rev 2016 Earth Computers Tech Inc...
Страница 118: ...e z L C D 4 0 5 118 Rev 2016 Earth Computers Tech Inc...
Страница 158: ...e z L C D 4 0 5 158 Rev 2016 Earth Computers Tech Inc 10 10 dec y LSB V_LINE 41 hex 110 110 dec...