RISC OS Open
A fast and easily customised operating system for ARM devices
ROOL
Home | News | Software | Bugs | Bounties | Forum | Documents | Photos | Contact us
Account

HAL_TouchscreenMeasure

Hardware Abstraction Layer
HAL entry points from RISC OS
» HAL_TouchscreenMeasure

HAL_TouchscreenMeasure

(HAL entry #58)
unsigned int HAL_TouchscreenMeasure(int meas)
Entry
meas Measurement type:
0 = X position
1 = Y position
2 = Pressure
3 = X resistance
4 = Y resistance
Exit
- Measurement value

Use

This is an internal call for OS use only and should not be used by user code.

Performs a touchscreen measurement.

“X” and “Y” need not actually be X and Y – rotation can be dealt with by calibration.

All values are returned as unsigned 32-bit values in the range &00000000-&FFFFFFFF. If using, for example, a 10-bit DAC, the 10-bit value read should be placed at the top of the returned word. Ideally, the 10 bits should be replicated in lower bits (ABCDEFGH IJABCDEF GHIJABCD EFGHIJAB) to ensure the returned values fully span the 32-bit range.

Resistance measurements can be used to compensate for large pressed areas causing shorts – subtract the instantaneous resistance from the instantaneous precision. (I think).

See also

  • HAL Touchscreen API
Information source: Kernel.Docs.HAL.MoreEnts in CVS
Revised on February 9, 2012 13:49:54 by Jeffrey Lee (213) (195.72.173.130)
Edit | Back in time (1 revision) | See changes | History | Views: Print | Source | Linked from: HAL entry points from RISC OS, HAL entry points by number, HAL Touchscreen API

Search the Wiki

Commercial use

For commercial enquiries, please contact the owners of RISC OS, Castle Technology Ltd.

ROOL Store

The official C/C++ Development kit and more here.

Donate! Why?

Help ROOL make things happen – please consider donating!

Navigation

  • Home Page
  • All Pages
  • Recently Revised
  • Authors
  • Feeds
  • Export
Site design © RISC OS Open Limited 2011 except where indicated
The RISC OS Open Instiki theme is based on Insitki's default layout

Valid XHTML 1.0  |  Valid CSS

Instiki 0.19.1(MML+)
This site runs on Rails

Hosted by Arachsys