diff options
| author | Henrik Rydberg <rydberg@euromail.se> | 2010-03-21 14:18:56 +0100 |
|---|---|---|
| committer | Henrik Rydberg <rydberg@euromail.se> | 2010-03-21 14:57:59 +0100 |
| commit | c7ed4cec501f10479a98e380d760670312101136 (patch) | |
| tree | 3e42dc0e2f7d152044555bc178ab47d324aaa277 /src/hwdata.h | |
| parent | d5b3178ca184dee4b3116e5b569745d43dbe37ef (diff) | |
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 <rydberg@euromail.se>
Diffstat (limited to 'src/hwdata.h')
| -rw-r--r-- | src/hwdata.h | 22 |
1 files changed, 22 insertions, 0 deletions
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 @@ | |||
| 34 | #define MT_BUTTON_HWHEEL_LEFT 5 | 34 | #define MT_BUTTON_HWHEEL_LEFT 5 |
| 35 | #define MT_BUTTON_HWHEEL_RIGHT 6 | 35 | #define MT_BUTTON_HWHEEL_RIGHT 6 |
| 36 | 36 | ||
| 37 | #define BIT_MT_TOUCH_MAJOR 0 | ||
| 38 | #define BIT_MT_TOUCH_MINOR 1 | ||
| 39 | #define BIT_MT_WIDTH_MAJOR 2 | ||
| 40 | #define BIT_MT_WIDTH_MINOR 3 | ||
| 41 | #define BIT_MT_ORIENTATION 4 | ||
| 42 | #define BIT_MT_PRESSURE 5 | ||
| 43 | #define BIT_MT_POSITION_X 6 | ||
| 44 | #define BIT_MT_POSITION_Y 7 | ||
| 45 | #define BIT_MT_CNT 8 | ||
| 46 | |||
| 37 | struct FingerData { | 47 | struct FingerData { |
| 38 | int touch_major, touch_minor; | 48 | int touch_major, touch_minor; |
| 39 | int width_major, width_minor; | 49 | int width_major, width_minor; |
| @@ -41,8 +51,20 @@ struct FingerData { | |||
| 41 | int position_x, position_y; | 51 | int position_x, position_y; |
| 42 | }; | 52 | }; |
| 43 | 53 | ||
| 54 | /** | ||
| 55 | * struct HWData - hardware reads | ||
| 56 | * | ||
| 57 | * @finger: finger data | ||
| 58 | * @mask: bits corresponding to data actually read (readonly) | ||
| 59 | * @mread: bits corresponding to data in progress (writeonly) | ||
| 60 | * @button: bitmask of buttons | ||
| 61 | * @nfinger: number of fingers actually read (readonly) | ||
| 62 | * @nread: number of fingers in progress (writeonly) | ||
| 63 | * | ||
| 64 | */ | ||
| 44 | struct HWData { | 65 | struct HWData { |
| 45 | struct FingerData finger[DIM_FINGER]; | 66 | struct FingerData finger[DIM_FINGER]; |
| 67 | unsigned mask[DIM_FINGER], mread[DIM_FINGER]; | ||
| 46 | unsigned button; | 68 | unsigned button; |
| 47 | int nfinger, nread; | 69 | int nfinger, nread; |
| 48 | }; | 70 | }; |
