-/* $OpenBSD: kbd.c,v 1.5 1996/12/03 07:36:32 kstailey Exp $ */
+/* $OpenBSD: kbd.c,v 1.6 1997/01/15 07:09:29 kstailey Exp $ */
/* $NetBSD: kbd.c,v 1.8 1996/05/17 19:32:06 gwr Exp $ */
/*
#include <sys/conf.h>
#include <sys/file.h>
#include <sys/ioctl.h>
+#include <sys/signalvar.h>
#include <sys/time.h>
#include <sys/kernel.h>
#include <sys/syslog.h>
* Definition of the driver for autoconfig.
****************************************************************/
-static int kbd_match(struct device *, void *, void *);
-static void kbd_attach(struct device *, struct device *, void *);
+static int kbd_match __P((struct device *, void *, void *));
+static void kbd_attach __P((struct device *, struct device *, void *));
+
+static int kbd_drain_tx __P((struct kbd_softc *));
+static void kbd_input_string __P((struct kbd_softc *, char *str));
+static void kbd_input_funckey __P((struct kbd_softc *,register int));
+static void kbd_input_keysym __P((struct kbd_softc *,register int));
+static void kbd_input_raw __P((struct kbd_softc *,register int));
+static void kbd_rxint __P((register struct zs_chanstate *));
+static void kbd_txint __P((register struct zs_chanstate *));
+static void kbd_stint __P((register struct zs_chanstate *));
+static void kbd_softint __P((register struct zs_chanstate *));
struct cfattach kbd_ca = {
sizeof(struct kbd_softc), kbd_match, kbd_attach
struct proc *p;
{
struct kbd_softc *k;
- int error, s, unit;
+ int error, unit;
unit = minor(dev);
if (unit >= kbd_cd.cd_ndevs)
struct kbd_softc *k;
int *data;
{
- struct kbd_state *ks = &k->k_state;
int leds, error, s;
leds = *data;
return (keysym);
}
-void
+static void
kbd_input_string(k, str)
struct kbd_softc *k;
char *str;
}
}
-void
+static void
kbd_input_funckey(k, keysym)
struct kbd_softc *k;
register int keysym;
* This is called by kbd_input_raw() or by kb_repeat()
* to deliver ASCII input. Called at spltty().
*/
-void
+static void
kbd_input_keysym(k, keysym)
struct kbd_softc *k;
register int keysym;
register int get, c, s;
int intr_flags;
register u_short ring_data;
- register u_char rr0, rr1;
k = cs->cs_private;
* Wait for output to finish.
* Called at spltty(). Has user context.
*/
-int
+static int
kbd_drain_tx(k)
struct kbd_softc *k;
{
struct kbd_softc *k;
int c; /* the data */
{
- struct zs_chanstate *cs = k->k_cs;
int put;
put = k->k_tbput;
+/* $OpenBSD: kbd_xlate.h,v 1.2 1997/01/15 07:09:31 kstailey Exp $ */
/* $NetBSD: kbd_xlate.h,v 1.1.1.1 1996/01/24 01:15:35 gwr Exp $ */
/*
extern void kbd_xlate_init __P((struct kbd_state *ks));
extern int kbd_code_to_keysym __P((struct kbd_state *ks, int c));
+/*
+ * XXX: kd/kbd interface... Does this belong elsewhere?
+ * This is the only header shared between them...
+ */
+
+extern int kbd_iopen __P((int unit));
+extern void kd_init __P((int unit));
+extern void kd_input __P((int c));
-/* $OpenBSD: ms.c,v 1.5 1996/12/03 07:36:29 kstailey Exp $ */
+/* $OpenBSD: ms.c,v 1.6 1997/01/15 07:09:33 kstailey Exp $ */
/* $NetBSD: ms.c,v 1.6 1996/05/17 19:32:09 gwr Exp $ */
/*
#include <sys/conf.h>
#include <sys/ioctl.h>
#include <sys/kernel.h>
+#include <sys/signalvar.h>
#include <sys/syslog.h>
#include <dev/ic/z8530reg.h>
* Definition of the driver for autoconfig.
****************************************************************/
-static int ms_match(struct device *, void *, void *);
-static void ms_attach(struct device *, struct device *, void *);
+static int ms_match __P((struct device *, void *, void *));
+static void ms_attach __P((struct device *, struct device *, void *));
+
+static void ms_input __P((register struct ms_softc *, register int));
+static void ms_rxint __P((register struct zs_chanstate *));
+static void ms_txint __P((register struct zs_chanstate *));
+static void ms_stint __P((register struct zs_chanstate *));
+static void ms_softint __P((struct zs_chanstate *));
struct cfattach ms_ca = {
sizeof(struct ms_softc), ms_match, ms_attach
struct proc *p;
{
struct ms_softc *ms;
- int error, s, unit;
+ int unit;
unit = minor(dev);
if (unit >= ms_cd.cd_ndevs)
register int get, c, s;
int intr_flags;
register u_short ring_data;
- register u_char rr0, rr1;
ms = cs->cs_private;