µC/GUI Touch Screen Support
You are here : Micrium
: Products : µC/GUI :
Touch Screen Support
µC/GUI supports touch screens.
Touch screen support for µC/GUI includes a low level driver, which handles the analog input (from an 8 bit or better AD-converter), debouncing and calibration of the touch screen. The window manager deals with touch messages and widgets such as button objects. It takes no more than one line of code to create a button or other widget, which then automatically handles touch messages and reacts accordingly. The widgets have different attributes, which makes them very flexible. Because in most cases the default attributes are fine, they are easy to use. As all the Micrium products, the touch screen support is written in plain ANSI-"C".
Touch screen simulation
The touch screen simulation is integrated into the regular µC/GUI simulation. The mouse events are used to simulate the touch screen. Pressing the left mouse button anywhere in the display area has the same effect as touching the touch panel in the real hardware. Needless to say that the real application behaves exactly like the simulation. The simulation can be used to write the user interface of your application and can be send as simple executable file to anybody for discussion, demonstration or verification.
Do I need multitasking for the touch support ?
No. The touch screen has to be polled periodically (Usually 100 times per second), but this does not have to be done with the help of a real time OS. You may also use a timer interrupt or simply poll the touch screen.
Sample program
Below you see 2 screenhots of the sample program. This sample program is compact and easy to understand.
In about 300 lines of "C" code we show you how easy it is to create buttons, how they may react to the events and how to calibrate the touch screen (if necessary). The sample also creates an entire "touch" keyboard on the display.
Sample Simulation ! (120kb)
"C" source of the sample program
Sample source code
|