input/touchscreen: added touchscreen gesture

added touchscreen gesture

Signed-off-by: futerigele <futerigele@xiaomi.com>
This commit is contained in:
futerigele 2021-11-30 10:52:37 +08:00 committed by Xiang Xiao
parent 9f4d236531
commit 06fc3eb1c3

View File

@ -95,6 +95,16 @@
#define TOUCH_POS_VALID (1 << 4) /* Hardware provided a valid X/Y position */
#define TOUCH_PRESSURE_VALID (1 << 5) /* Hardware provided a valid pressure */
#define TOUCH_SIZE_VALID (1 << 6) /* Hardware provided a valid H/W contact size */
#define TOUCH_GESTURE_VALID (1 << 7) /* Hardware provided a valid gesture */
/* These are definitions for touch gesture */
#define TOUCH_DOUBLE_CLICK (0x00)
#define TOUCH_SLIDE_UP (0x01)
#define TOUCH_SLIDE_DOWN (0x02)
#define TOUCH_SLIDE_LEFT (0x03)
#define TOUCH_SLIDE_RIGHT (0x04)
#define TOUCH_PALM (0x05)
/****************************************************************************
* Public Types
@ -112,6 +122,7 @@ struct touch_point_s
int16_t y; /* Y coordinate of the touch point (uncalibrated) */
int16_t h; /* Height of touch point (uncalibrated) */
int16_t w; /* Width of touch point (uncalibrated) */
uint16_t gesture; /* Gesture of touchscreen contact */
uint16_t pressure; /* Touch pressure */
uint64_t timestamp; /* Touch event time stamp, in microseconds */
};