157080Sakito /* 257080Sakito * Copyright (c) 1992 OMRON Corporation. 3*63199Sbostic * Copyright (c) 1992, 1993 4*63199Sbostic * The Regents of the University of California. All rights reserved. 557080Sakito * 657080Sakito * This code is derived from software contributed to Berkeley by 757080Sakito * OMRON Corporation. 857080Sakito * 957080Sakito * %sccs.include.redist.c% 1057080Sakito * 11*63199Sbostic * @(#)bmc.c 8.1 (Berkeley) 06/10/93 1257080Sakito */ 1357080Sakito 1457080Sakito /* 1557080Sakito * bmc.c -- bitmap console driver 1657080Sakito * by A.Fujita, JUL-06-1992 1757080Sakito */ 1857080Sakito 1957080Sakito #include <sys/param.h> 2057080Sakito #include <sys/systm.h> 2157080Sakito #include <luna68k/stand/rcvbuf.h> 2257080Sakito #include <luna68k/stand/preset.h> 2357080Sakito 2457080Sakito extern int dipsw1; 2557616Sakito extern int nplane; 2657616Sakito 2757080Sakito extern struct rcvbuf rcvbuf[]; 2857080Sakito bmcintr()2957080Sakitobmcintr() 3057080Sakito { 3157080Sakito } 3257080Sakito 3357080Sakito /* 3457080Sakito * Following are all routines needed for SIO to act as console 3557080Sakito */ 3657080Sakito #include <luna68k/luna68k/cons.h> 3757080Sakito 3857080Sakito bmccnprobe(cp) 3957080Sakito struct consdev *cp; 4057080Sakito { 4157080Sakito if ((dipsw1 & PS_BMC_CONS) == 0) { 4257080Sakito cp->cn_pri = CN_DEAD; 4357080Sakito return; 4457080Sakito } 4557080Sakito 4657616Sakito if (nplane == 0) { 4757616Sakito cp->cn_pri = CN_DEAD; 4857616Sakito return; 4957616Sakito } 5057616Sakito 5157080Sakito /* initialize required fields */ 5257080Sakito cp->cn_dev = 1; 5357080Sakito cp->cn_tp = 0; 5457080Sakito cp->cn_pri = CN_NORMAL; 5557080Sakito } 5657080Sakito 5757080Sakito bmccninit(cp) 5857080Sakito struct consdev *cp; 5957080Sakito { 6057080Sakito sioinit(); 6157080Sakito bmdinit(); 6257080Sakito } 6357080Sakito bmccngetc(dev)6457080Sakitobmccngetc(dev) 6557080Sakito dev_t dev; 6657080Sakito { 6757080Sakito register int c; 6857080Sakito register int unit = 1; 6957080Sakito 7057080Sakito while (RBUF_EMPTY(unit)) { 7157080Sakito DELAY(10); 7257080Sakito } 7357080Sakito 7457080Sakito POP_RBUF(unit, c); 7557080Sakito 7657080Sakito return(c); 7757080Sakito /* 7857080Sakito return(siocngetc(dev)); 7957080Sakito */ 8057080Sakito } 8157080Sakito bmccnputc(dev,c)8257080Sakitobmccnputc(dev, c) 8357080Sakito dev_t dev; 8457080Sakito int c; 8557080Sakito { 8657080Sakito bmdputc(c); 8757080Sakito } 88