WSTABLET ( 9 ) OpenBSD Kernel Manual WSTABLET ( 9 )
wstablet, wstablet_input, wstabletdevprint - wscons tablet support
|
#include <dev/wscons/wsconsio.h> void int |
The wstablet module is a component of the wscons(9) framework to provide machine-independent
tablet support. Most of the support is provided by the wstablet(4) device driver, which must be a child
of the hardware device driver.
|
Tablet hardware drivers providing support for wscons tablet devices will make use of the following data types: struct wstablet_accessops int (*enable)(void *); The enable member defines the function to be called to enable monitoring device input There is a void * cookie provided by the tablet driver associated with these functions, struct wstabletdev_attach_args const struct wstablet_accessops *accessops; |
wstablet_input(wstabletdev , *td , flags)
|
Callback from the tablet driver to the wstablet interface driver, providing the device input to create wsevents. Arguments are as follows: wstabletdev This is the struct device pointer passed from config_found( ) td Input values from the hardware device are grouped together within this |
OpenBSD 4.4 August 18, 2008 1
|
WSTABLET ( 9 ) |
OpenBSD Kernel Manual WSTABLET ( 9 ) Note that these features are not available on all tablet devices. If a feature is not available, the corresponding member within the struct should be set to NULL by the hardware driver. During the processing of td, flags is checked to only use available input values (as flagged by the hardware driver). The members of td are: btns This specifies the current button status. Bits for pressed buttons x Absolute X-axis value to specify the pointer coordinate. Right- y Absolute or relative Y-axis value to specify the pointer coordi- p Tip pressure of the active stylus. t Twist (or rotation) value of the active stylus. tiltX X-axis tilt angle of the active stylus. tiltY Y-axis tilt angle of the active stylus. dev_id Identification string from the active stylus. |
|||
|
flags |
This argument specifies which members of the td struct have been popu- lated for wstablet_input( ) to create wsevents for. Defined in /sys/dev/wscons/wstabletvar.h, valid values for flags are: WSTABLET_INPUT_SWDEV WSTABLET_INPUT_BUTTON WSTABLET_INPUT_X WSTABLET_INPUT_Y WSTABLET_INPUT_P WSTABLET_INPUT_T |
|||
|
OpenBSD 4.4 |
August 18, 2008 2 |
|
WSTABLET ( 9 ) |
OpenBSD Kernel Manual WSTABLET_INPUT_TILTX |
WSTABLET ( 9 ) |
The tablet device has switched operating modes.
wstablet_printdev(aux , pnp)
The default wstablet printing routine used by config_found(). (see autoconf(9)).
|
Tablet hardware drivers which want to use the wstablet module must be a parent to the wstablet(4) device and provide an attachment interface. To attach the wstablet(4) device, the tablet driver must allocate and populate a wstabletdev_attach_args structure with the supported operations and callbacks and call config_found( ) to perform the attach (see autoconf(9)). |
|
When a tablet-input event is received, the device driver must perform any necessary movement decoding to wscons events and pass the events to wscons via wstablet_input(). The wscons framework calls back into the hardware driver by invoking the functions that are specified in the accessops structure. The enable( ) and disable( ) functions are relatively simple and self-ex- planatory. The ioctl( ) function is called by the wscons interface to perform tablet-specific ioctl opera- tions (see ioctl(2)). The argument cmd to the ioctl( ) function specifies the specific command to perform using the data data. Valid commands are listed in sys/dev/wscons/wsconsio.h. |
|
This section describes places within the NetBSD source tree where actual code implementing or using the machine-independent wscons subsystem can be found. All pathnames are relative to /usr/src. The wscons subsystem is implemented within the directory sys/dev/wscons. The wstablet module itself is implemented within the file sys/dev/wscons/wstablet.c. ioctl(2) operations are listed in sys/dev/wscons/wsconsio.h. |
ioctl(2), wscons(4), wstablet(4), autoconf(9), driver(9), intro(9), wscons(9),
wsdisplay(9), wskbd(9)
OpenBSD 4.4 August 18, 2008 3