xref: /original-bsd/sys/luna68k/stand/bmc.c (revision a6d8c59f)
1 /*
2  * Copyright (c) 1992 OMRON Corporation.
3  * Copyright (c) 1992 The Regents of the University of California.
4  * All rights reserved.
5  *
6  * This code is derived from software contributed to Berkeley by
7  * OMRON Corporation.
8  *
9  * %sccs.include.redist.c%
10  *
11  *	@(#)bmc.c	7.1 (Berkeley) 12/13/92
12  */
13 
14 /*
15  * bmc.c -- bitmap console driver
16  *   by A.Fujita, JUL-06-1992
17  */
18 
19 #include <sys/param.h>
20 #include <sys/systm.h>
21 #include <luna68k/stand/rcvbuf.h>
22 #include <luna68k/stand/preset.h>
23 
24 extern	int dipsw1;
25 extern	struct rcvbuf	rcvbuf[];
26 
27 bmcintr()
28 {
29 }
30 
31 /*
32  * Following are all routines needed for SIO to act as console
33  */
34 #include <luna68k/luna68k/cons.h>
35 
36 bmccnprobe(cp)
37 	struct consdev *cp;
38 {
39 	if ((dipsw1 & PS_BMC_CONS) == 0) {
40 		cp->cn_pri = CN_DEAD;
41 		return;
42 	}
43 
44 	/* initialize required fields */
45 	cp->cn_dev = 1;
46 	cp->cn_tp  = 0;
47 	cp->cn_pri = CN_NORMAL;
48 }
49 
50 bmccninit(cp)
51 	struct consdev *cp;
52 {
53 	sioinit();
54 	bmdinit();
55 }
56 
57 bmccngetc(dev)
58 	dev_t dev;
59 {
60 	register int c;
61 	register int unit = 1;
62 
63 	while (RBUF_EMPTY(unit)) {
64 		DELAY(10);
65 	}
66 
67 	POP_RBUF(unit, c);
68 
69 	return(c);
70 /*
71 	return(siocngetc(dev));
72  */
73 }
74 
75 bmccnputc(dev, c)
76 	dev_t dev;
77 	int c;
78 {
79 	bmdputc(c);
80 }
81