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 |
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).