Please allow me to explain why I have written a custom parser pour the Wacom
devices, instead of just using the already existent one.
The function of interest to us is hidms_setup, it is here that I have a special
condition with as has been mentioned uses a quirk.
We need it because of the
Good day,
I am currently trying to work on an implementation
of a driver for the WACOM tablet on openBSD
I am therefore submitting this diff so that it could potentially be evaluated.
Please if you have a moment, could you have a look at this diff?
I have tested it with my Wacom tablet
and it
!= ms->sc_buttons) {
- wsmouse_position(ms->sc_wsmousedev, x, y);
- wsmouse_buttons(ms->sc_wsmousedev, buttons);
+
+ for (int i = 0; i < ms->sc_num_stylus_buttons; i++)
+ if (hid_get_data(data, len, >sc_loc_stylus_btn[i]))
+ stylus_buttons |= (1 << i);
+
+ for (int i = 0; i < ms->sc_num_pad_buttons; i++)
+ if (hid_get_data(data, len, >sc_loc_pad_btn[i]))
+ pad_buttons |= (1 << i);
+
+
+ #ifdef UWACOM_DEBUG
+ UWACOM_BUTTON_EVENT(pad_buttons);
+ UWACOM_BUTTON_EVENT(stylus_buttons);
+ #endif
+
+ if (x != 0 || y != 0 || pressure != 0 || distance != 0
+ || pad_buttons != ms->sc_buttons || stylus_buttons !=
ms->sc_buttons) {
+ wsmouse_buttons(ms->sc_wsmousedev, (pad_buttons | stylus_buttons));
+ wsmouse_motion(ms->sc_wsmousedev, -dx, dy, dz, dw);
wsmouse_input_sync(ms->sc_wsmousedev);
}
}
Thanks in advance!
Regards,
Vladimir Meshcheriakov