When a mouse-movement event is received, the device driver must perform any necessary movement decoding to wscons events and pass the events to wscons via
wsmouse_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-explanatory. The
ioctl() function is called by the wscons interface to perform mouse-specific ioctl operations (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.