1/*
2 * spkr.c -- device driver for console speaker
3 *
4 * v1.4 by Eric S. Raymond (esr@snark.thyrsus.com) Aug 1993
5 * modified for FreeBSD by Andrew A. Chernov <ache@astral.msk.su>
6 * modified for PC98 by Kakefuda
7 *
8 * $FreeBSD: head/sys/dev/speaker/spkr.c 111815 2003-03-03 12:15:54Z phk $
9 */
10
11#include <sys/param.h>
12#include <sys/systm.h>
13#include <sys/bus.h>
14#include <sys/kernel.h>
15#include <sys/module.h>
16#include <sys/uio.h>
--- 12 unchanged lines hidden (view full) ---
29
30static d_open_t spkropen;
31static d_close_t spkrclose;
32static d_write_t spkrwrite;
33static d_ioctl_t spkrioctl;
34
35#define CDEV_MAJOR 26
36static struct cdevsw spkr_cdevsw = {
37 .d_open = spkropen,
38 .d_close = spkrclose,
39 .d_write = spkrwrite,
40 .d_ioctl = spkrioctl,
41 .d_name = "spkr",
42 .d_maj = CDEV_MAJOR,
43};
44
45static MALLOC_DEFINE(M_SPKR, "spkr", "Speaker buffer");
46
47/**************** MACHINE DEPENDENT PART STARTS HERE *************************
48 *
49 * This section defines a function tone() which causes a tone of given
50 * frequency and duration from the ISA console speaker.
--- 631 unchanged lines hidden ---
2 * spkr.c -- device driver for console speaker
3 *
4 * v1.4 by Eric S. Raymond (esr@snark.thyrsus.com) Aug 1993
5 * modified for FreeBSD by Andrew A. Chernov <ache@astral.msk.su>
6 * modified for PC98 by Kakefuda
7 *
8 * $FreeBSD: head/sys/dev/speaker/spkr.c 111815 2003-03-03 12:15:54Z phk $
9 */
10
11#include <sys/param.h>
12#include <sys/systm.h>
13#include <sys/bus.h>
14#include <sys/kernel.h>
15#include <sys/module.h>
16#include <sys/uio.h>
--- 12 unchanged lines hidden (view full) ---
29
30static d_open_t spkropen;
31static d_close_t spkrclose;
32static d_write_t spkrwrite;
33static d_ioctl_t spkrioctl;
34
35#define CDEV_MAJOR 26
36static struct cdevsw spkr_cdevsw = {
37 .d_open = spkropen,
38 .d_close = spkrclose,
39 .d_write = spkrwrite,
40 .d_ioctl = spkrioctl,
41 .d_name = "spkr",
42 .d_maj = CDEV_MAJOR,
43};
44
45static MALLOC_DEFINE(M_SPKR, "spkr", "Speaker buffer");
46
47/**************** MACHINE DEPENDENT PART STARTS HERE *************************
48 *
49 * This section defines a function tone() which causes a tone of given
50 * frequency and duration from the ISA console speaker.
--- 631 unchanged lines hidden ---