From c7ed4cec501f10479a98e380d760670312101136 Mon Sep 17 00:00:00 2001 From: Henrik Rydberg Date: Sun, 21 Mar 2010 14:18:56 +0100 Subject: Comply with MT syncronization protocol The latest semantic clarifications in the kernel MT protocol allow SYN_MT_REPORT to be sent without actually sending any finger data. Add a mask to the hardware data so that the data actually read can be tracked. Signed-off-by: Henrik Rydberg --- src/hwdata.h | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'src/hwdata.h') diff --git a/src/hwdata.h b/src/hwdata.h index 38ffc6b..aa589e0 100644 --- a/src/hwdata.h +++ b/src/hwdata.h @@ -34,6 +34,16 @@ #define MT_BUTTON_HWHEEL_LEFT 5 #define MT_BUTTON_HWHEEL_RIGHT 6 +#define BIT_MT_TOUCH_MAJOR 0 +#define BIT_MT_TOUCH_MINOR 1 +#define BIT_MT_WIDTH_MAJOR 2 +#define BIT_MT_WIDTH_MINOR 3 +#define BIT_MT_ORIENTATION 4 +#define BIT_MT_PRESSURE 5 +#define BIT_MT_POSITION_X 6 +#define BIT_MT_POSITION_Y 7 +#define BIT_MT_CNT 8 + struct FingerData { int touch_major, touch_minor; int width_major, width_minor; @@ -41,8 +51,20 @@ struct FingerData { int position_x, position_y; }; +/** + * struct HWData - hardware reads + * + * @finger: finger data + * @mask: bits corresponding to data actually read (readonly) + * @mread: bits corresponding to data in progress (writeonly) + * @button: bitmask of buttons + * @nfinger: number of fingers actually read (readonly) + * @nread: number of fingers in progress (writeonly) + * + */ struct HWData { struct FingerData finger[DIM_FINGER]; + unsigned mask[DIM_FINGER], mread[DIM_FINGER]; unsigned button; int nfinger, nread; }; -- cgit v1.2.3