1*9b6bd2d9Srmind /* $NetBSD: cons.h,v 1.5 2011/02/08 20:20:22 rmind Exp $ */ 237eb9eebSnonaka 337eb9eebSnonaka /* 4*9b6bd2d9Srmind * Copyright (c) 1988 University of Utah. 537eb9eebSnonaka * Copyright (c) 1990, 1993 637eb9eebSnonaka * The Regents of the University of California. All rights reserved. 737eb9eebSnonaka * 837eb9eebSnonaka * This code is derived from software contributed to Berkeley by 937eb9eebSnonaka * the Systems Programming Group of the University of Utah Computer 1037eb9eebSnonaka * Science Department. 1137eb9eebSnonaka * 1237eb9eebSnonaka * Redistribution and use in source and binary forms, with or without 1337eb9eebSnonaka * modification, are permitted provided that the following conditions 1437eb9eebSnonaka * are met: 1537eb9eebSnonaka * 1. Redistributions of source code must retain the above copyright 1637eb9eebSnonaka * notice, this list of conditions and the following disclaimer. 1737eb9eebSnonaka * 2. Redistributions in binary form must reproduce the above copyright 1837eb9eebSnonaka * notice, this list of conditions and the following disclaimer in the 1937eb9eebSnonaka * documentation and/or other materials provided with the distribution. 20aad01611Sagc * 3. Neither the name of the University nor the names of its contributors 21aad01611Sagc * may be used to endorse or promote products derived from this software 22aad01611Sagc * without specific prior written permission. 23aad01611Sagc * 24aad01611Sagc * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 25aad01611Sagc * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 26aad01611Sagc * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 27aad01611Sagc * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 28aad01611Sagc * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 29aad01611Sagc * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 30aad01611Sagc * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 31aad01611Sagc * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 32aad01611Sagc * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 33aad01611Sagc * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 34aad01611Sagc * SUCH DAMAGE. 35aad01611Sagc * 36aad01611Sagc * from: Utah $Hdr: cons.h 1.6 92/01/21$ 37aad01611Sagc * 38aad01611Sagc * @(#)cons.h 8.1 (Berkeley) 6/10/93 39aad01611Sagc */ 4037eb9eebSnonaka 4137eb9eebSnonaka struct consdev { 4237eb9eebSnonaka char *cn_name; /* console device name */ 4337eb9eebSnonaka int address; /* address */ 4437eb9eebSnonaka int speed; /* speed(serial only) */ 4537eb9eebSnonaka void (*cn_probe) /* probe hardware and fill in consdev info */ 4678fba760Sgarbled (struct consdev *); 4737eb9eebSnonaka void (*cn_init) /* turn on as console */ 4878fba760Sgarbled (struct consdev *); 4937eb9eebSnonaka int (*cn_getc) /* getchar interface */ 5078fba760Sgarbled (void *); 5137eb9eebSnonaka void (*cn_putc) /* putchar interface */ 5278fba760Sgarbled (void *, int); 5337eb9eebSnonaka int (*cn_scan) /* scan interface */ 5478fba760Sgarbled (void *); 5537eb9eebSnonaka int cn_pri; /* pecking order; the higher the better */ 5637eb9eebSnonaka void *cn_dev; /* device data tag */ 5737eb9eebSnonaka }; 5837eb9eebSnonaka 5937eb9eebSnonaka /* values for cn_pri - reflect our policy for console selection */ 6037eb9eebSnonaka #define CN_DEAD 0 /* device doesn't exist */ 6137eb9eebSnonaka #define CN_NORMAL 1 /* device exists but is nothing special */ 6237eb9eebSnonaka #define CN_INTERNAL 2 /* "internal" bit-mapped display */ 6337eb9eebSnonaka #define CN_REMOTE 3 /* serial interface with remote bit set */ 64