xref: /netbsd-src/sys/dev/spkrvar.h (revision 2e2322c9c07009df921d11b1268f8506affbb8ba)
1 /* $NetBSD: spkrvar.h,v 1.4 2016/12/13 20:20:34 christos Exp $ */
2 
3 #ifndef _SYS_DEV_SPKRVAR_H
4 #define _SYS_DEV_SPKRVAR_H
5 
6 #include <sys/module.h>
7 
8 struct spkr_softc {
9 	device_t sc_dev;
10 	int sc_octave;	/* currently selected octave */
11 	int sc_whole;	/* whole-note time at current tempo, in ticks */
12 	int sc_value;	/* whole divisor for note time, quarter note = 1 */
13 	int sc_fill;	/* controls spacing of notes */
14 	bool sc_octtrack;	/* octave-tracking on? */
15 	bool sc_octprefix;	/* override current octave-tracking state? */
16 	char *sc_inbuf;
17 
18 	/* attachment-specific hooks */
19 	void (*sc_tone)(device_t, u_int, u_int);
20 	void (*sc_rest)(device_t, int);
21 };
22 
23 int spkr__modcmd(modcmd_t, void *);
24 void spkr_attach(device_t,
25     void (*)(device_t, u_int, u_int), void (*)(device_t, int));
26 
27 #endif /* _SYS_DEV_SPKRVAR_H */
28