spkrvar.h revision 1.7 1 1.7 nat /* $NetBSD: spkrvar.h,v 1.7 2017/06/11 03:33:48 nat Exp $ */
2 1.1 nat
3 1.1 nat #ifndef _SYS_DEV_SPKRVAR_H
4 1.1 nat #define _SYS_DEV_SPKRVAR_H
5 1.1 nat
6 1.3 christos #include <sys/module.h>
7 1.3 christos
8 1.4 christos struct spkr_softc {
9 1.4 christos device_t sc_dev;
10 1.4 christos int sc_octave; /* currently selected octave */
11 1.4 christos int sc_whole; /* whole-note time at current tempo, in ticks */
12 1.4 christos int sc_value; /* whole divisor for note time, quarter note = 1 */
13 1.4 christos int sc_fill; /* controls spacing of notes */
14 1.4 christos bool sc_octtrack; /* octave-tracking on? */
15 1.4 christos bool sc_octprefix; /* override current octave-tracking state? */
16 1.4 christos char *sc_inbuf;
17 1.4 christos
18 1.4 christos /* attachment-specific hooks */
19 1.4 christos void (*sc_tone)(device_t, u_int, u_int);
20 1.4 christos void (*sc_rest)(device_t, int);
21 1.7 nat u_int sc_vol; /* volume - only for audio skpr */
22 1.4 christos };
23 1.1 nat
24 1.4 christos void spkr_attach(device_t,
25 1.4 christos void (*)(device_t, u_int, u_int), void (*)(device_t, int));
26 1.2 christos
27 1.6 pgoyette int spkr_detach(device_t, int);
28 1.6 pgoyette
29 1.1 nat #endif /* _SYS_DEV_SPKRVAR_H */
30