Home | History | Annotate | Line # | Download | only in dev
spkrvar.h revision 1.6
      1 /* $NetBSD: spkrvar.h,v 1.6 2017/01/06 09:32:08 pgoyette 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 void spkr_attach(device_t,
     24     void (*)(device_t, u_int, u_int), void (*)(device_t, int));
     25 
     26 int spkr_detach(device_t, int);
     27 
     28 #endif /* _SYS_DEV_SPKRVAR_H */
     29