1 /* 2 * Copyright (c) 1992 OMRON Corporation. 3 * Copyright (c) 1992, 1993 4 * The Regents of the University of California. 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 8.1 (Berkeley) 06/10/93 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 int nplane; 26 27 extern struct rcvbuf rcvbuf[]; 28 29 bmcintr() 30 { 31 } 32 33 /* 34 * Following are all routines needed for SIO to act as console 35 */ 36 #include <luna68k/luna68k/cons.h> 37 38 bmccnprobe(cp) 39 struct consdev *cp; 40 { 41 if ((dipsw1 & PS_BMC_CONS) == 0) { 42 cp->cn_pri = CN_DEAD; 43 return; 44 } 45 46 if (nplane == 0) { 47 cp->cn_pri = CN_DEAD; 48 return; 49 } 50 51 /* initialize required fields */ 52 cp->cn_dev = 1; 53 cp->cn_tp = 0; 54 cp->cn_pri = CN_NORMAL; 55 } 56 57 bmccninit(cp) 58 struct consdev *cp; 59 { 60 sioinit(); 61 bmdinit(); 62 } 63 64 bmccngetc(dev) 65 dev_t dev; 66 { 67 register int c; 68 register int unit = 1; 69 70 while (RBUF_EMPTY(unit)) { 71 DELAY(10); 72 } 73 74 POP_RBUF(unit, c); 75 76 return(c); 77 /* 78 return(siocngetc(dev)); 79 */ 80 } 81 82 bmccnputc(dev, c) 83 dev_t dev; 84 int c; 85 { 86 bmdputc(c); 87 } 88