CLCD Display and Adaptor Board

Example C-2 Configuring and reading the TSCI interface

Configure the SSP interface Configure the TSCI registers

Enable the touch screen pendown interrupt (on SIC)

...

On touch screen pendown interrupts

... touch screen interrupt handler

Enable the touch screen event timer (TIMER 1-4) for approx. 2mS intervals

...

On touch screen timer events

... touch screen reading

If (pendown flag (PSM) is cleared) Disable the touch screen event timer

Clear and re-enable the touch screen interrupt

Else

Read the pen X/Y values

Draw the pen position on the screen

Note

The selftest example provided on the CD uses a simple polled system to determine pen down and timer events.

The pseudo code in Example C-2 is recommended for OS ports as they typically require interrupt-driven device drivers.

C-14

Copyright © 2003-2010 ARM Limited. All rights reserved.

ARM DUI 0224I

Page 332
Image 332
ARM ARM DUI 0224I manual Example C-2 Configuring and reading the Tsci interface