wsbell
, wsbelldevprint
—
wscons system bell support
The wsbell
module is a component of the
wscons(9) framework, providing
keyboard-independent bell support. All of the support is provided by the
wsbell(4) device driver, which
must be a child of the hardware device driver. The only hardware device
drivers that can provide a wsbell
facility are
speaker(4) devices.
Speaker drivers providing support for wscons bell devices will make use of the
following data types:
- struct wsbelldev_attach_args
- A structure used to attach the
wsbell(4) child device. It
has the following members:
wsbelldevprint
(aux,
pnp)
- The default wsbell printing routine used by
config_found
(). (see
autoconf(9)).
Speaker drivers which want to use the wsbell module must be a parent to the
wsbell(4) device and provide an
attachment interface. To attach the
wsbell(4) device, the speaker
driver must allocate and populate a
wsbelldev_attach_args structure with a pointer to the
parent's device structure as an access cookie and call
config_found
() to perform the attach (see
autoconf(9)).
When a bell event is received on a
wsdisplay(4) device the
system bell is sounded.
The wscons subsystem is implemented within the directory
sys/dev/wscons. The wsbell
module itself is implement within the file
sys/dev/wscons/wsbell.c.
ioctl(2) operations are listed in
sys/dev/wscons/wsconsio.h.