xref: /netbsd-src/share/man/man9/wsbell.9 (revision efc48405e04a55f2d6cb622c31973f9135ffa54c)
1.\" $NetBSD: wsbell.9,v 1.4 2018/02/11 14:17:17 wiz Exp $
2.\"
3.\" Copyright (c) 2017 Nathanial Sloss <nathanialsloss@yahoo.com.au>
4.\" All rights reserved.
5.\"
6.\" Redistribution and use in source and binary forms, with or without
7.\" modification, are permitted provided that the following conditions
8.\" are met:
9.\" 1. Redistributions of source code must retain the above copyright
10.\"    notice, this list of conditions and the following disclaimer.
11.\" 2. Redistributions in binary form must reproduce the above copyright
12.\"    notice, this list of conditions and the following disclaimer in the
13.\"    documentation and/or other materials provided with the distribution.
14.\"
15.\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
16.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
17.\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
18.\" PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
19.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
20.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
21.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
22.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
23.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
24.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
25.\" POSSIBILITY OF SUCH DAMAGE.
26.\"
27.Dd June 30, 2017
28.Dt WSBELL 9
29.Os
30.Sh NAME
31.Nm wsbell ,
32.Nm wsbelldevprint
33.Nd wscons system bell support
34.Sh SYNOPSIS
35.In dev/wscons/wsconsio.h
36.In dev/wscons/wsbellvar.h
37.Ft int
38.Fn wsbelldevprint "void *aux" "const char *pnp"
39.Sh DESCRIPTION
40The
41.Nm
42module is a component of the
43.Xr wscons 9
44framework, providing keyboard-independent bell support.
45All of the support is provided by the
46.Xr wsbell 4
47device driver, which must be a child of the hardware device driver.
48The only hardware device drivers that can provide a
49.Nm
50facility are
51.Xr speaker 4
52devices.
53.Sh DATA TYPES
54Speaker drivers providing support for wscons bell devices will make use
55of the following data types:
56.Bl -tag -width compact
57.It Fa struct wsbelldev_attach_args
58A structure used to attach the
59.Xr wsbell 4
60child device.
61It has the following members:
62.Bd -literal
63	void *accesscookie;
64.Ed
65.El
66.Sh FUNCTIONS
67.Bl -tag -width compact
68.It Fn wsbelldevprint "aux" "pnp"
69The default wsbell printing routine used by
70.Fn config_found .
71(see
72.Xr autoconf 9 ) .
73.El
74.Sh AUTOCONFIGURATION
75Speaker drivers which want to use the wsbell module must be a
76parent to the
77.Xr wsbell 4
78device and provide an attachment interface.
79To attach the
80.Xr wsbell 4
81device, the speaker driver must allocate and populate a
82.Fa wsbelldev_attach_args
83structure with a pointer to the parent's device structure as an access cookie
84and call
85.Fn config_found
86to perform the attach (see
87.Xr autoconf 9 ) .
88.Sh OPERATION
89When a bell event is received on a
90.Xr wsdisplay 4
91device the system bell is sounded.
92.Sh CODE REFERENCES
93The wscons subsystem is implemented within the directory
94.Pa sys/dev/wscons .
95The
96.Nm
97module itself is implement within the file
98.Pa sys/dev/wscons/wsbell.c .
99.Xr ioctl 2
100operations are listed in
101.Pa sys/dev/wscons/wsconsio.h .
102.Sh SEE ALSO
103.Xr ioctl 2 ,
104.Xr wsbell 4 ,
105.Xr wscons 4 ,
106.Xr wskbd 4 ,
107.Xr autoconf 9 ,
108.Xr driver 9 ,
109.Xr intro 9 ,
110.Xr wscons 9 ,
111.Xr wsdisplay 9 ,
112.Xr wskbd 9
113