VPADTPData

Syntax

#include <cafe/vpad.h>

typedef struct {
        u16         x;
        u16         y;
        u16         touch;
        u16         validity;
} VPADTPData;

  #define VPAD_TP_TOUCH_OFF      0      //  Touch panel is not being touched
  #define VPAD_TP_TOUCH_ON       1      //  Touch panel is being touched

  #define VPAD_TP_VALIDITY_VALID         0        // Valid data
  #define VPAD_TP_VALIDITY_INVALID_X     1        // Only X coordinate data is invalid
  #define VPAD_TP_VALIDITY_INVALID_Y     2        // Only Y coordinate data is invalid
  #define VPAD_TP_VALIDITY_INVALID_XY   (VPAD_TP_VALIDITY_INVALID_X | VPAD_TP_VALIDITY_INVALID_Y)  
                                                  // X,Y coordinate data are both invalid

Elements

x x coordinate.
y y coordinate
touch Touch determination flag.
validity Coordinate value validity flag. Even when INVALID, touch value is valid

Description

Stores the touch panel information included in the VPADStatus. The table above describes the information that is obtained.

The touch element shows whether the touch panel is currently being touched. The validity element shows the validity of the results that were obtained from the chattering measure process. Even when this flag is INVALID, the touch value is valid. You should still perform ON/OFF assessment.

When creating an application, be sure to consider the case where the INVALID value is stored. To avoid abnormal operation even when an INVALID value was obtained, it is recommended that you use caution for such a situation by using the coordinate data last obtained as a VALID value. (INVALID means that either x or y coordinate data is invalid.)

See Also

VPADStatus

Revision History

2013/05/08 Automated cleanup pass.
2011/06/29 Added comment on the validity of VPADTPData.
2011/03/30 Initial version.


CONFIDENTIAL