[BACK]Return to spkrvar.h CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / src / sys / dev

File: [cvs.NetBSD.org] / src / sys / dev / spkrvar.h (download)

Revision 1.9, Sun Jun 11 21:54:22 2017 UTC (15 months, 1 week ago) by pgoyette
Branch: MAIN
CVS Tags: tls-maxphys-base-20171202, phil-wifi-base, phil-wifi, pgoyette-compat-base, pgoyette-compat-0906, pgoyette-compat-0728, pgoyette-compat-0625, pgoyette-compat-0521, pgoyette-compat-0502, pgoyette-compat-0422, pgoyette-compat-0415, pgoyette-compat-0407, pgoyette-compat-0330, pgoyette-compat-0322, pgoyette-compat-0315, pgoyette-compat, perseant-stdc-iso10646-base, perseant-stdc-iso10646, nick-nhusb-base-20170825, jdolecek-ncqfixes-base, jdolecek-ncqfixes, HEAD
Branch point for: tls-maxphys
Changes since 1.8: +5 -1 lines

Implement xxx_rescan() and xxx_childdet() functions; these will be
needed when child device wsbell(4) becomes a separately-loadable
module.

/* $NetBSD: spkrvar.h,v 1.9 2017/06/11 21:54:22 pgoyette Exp $ */

#ifndef _SYS_DEV_SPKRVAR_H
#define _SYS_DEV_SPKRVAR_H

#include <sys/module.h>

struct spkr_softc {
	device_t sc_dev;
	device_t sc_wsbelldev;
	int sc_octave;	/* currently selected octave */
	int sc_whole;	/* whole-note time at current tempo, in ticks */
	int sc_value;	/* whole divisor for note time, quarter note = 1 */
	int sc_fill;	/* controls spacing of notes */
	bool sc_octtrack;	/* octave-tracking on? */
	bool sc_octprefix;	/* override current octave-tracking state? */
	char *sc_inbuf;

	/* attachment-specific hooks */
	void (*sc_tone)(device_t, u_int, u_int);
	void (*sc_rest)(device_t, int);
	u_int sc_vol;	/* volume - only for audio skpr */
};

void spkr_attach(device_t,
    void (*)(device_t, u_int, u_int), void (*)(device_t, int));

int spkr_detach(device_t, int);

int spkr_rescan(device_t, const char *, const int *);

int spkr_childdet(device_t, device_t);

#endif /* _SYS_DEV_SPKRVAR_H */