11.1Skiyohara/* $NetBSD: cons.h,v 1.1 2011/03/03 05:59:37 kiyohara Exp $ */ 21.1Skiyohara 31.1Skiyohara/* 41.1Skiyohara * Copyright (c) 1990, 1993 51.1Skiyohara * The Regents of the University of California. All rights reserved. 61.1Skiyohara * 71.1Skiyohara * This code is derived from software contributed to Berkeley by 81.1Skiyohara * the Systems Programming Group of the University of Utah Computer 91.1Skiyohara * Science Department. 101.1Skiyohara * 111.1Skiyohara * Redistribution and use in source and binary forms, with or without 121.1Skiyohara * modification, are permitted provided that the following conditions 131.1Skiyohara * are met: 141.1Skiyohara * 1. Redistributions of source code must retain the above copyright 151.1Skiyohara * notice, this list of conditions and the following disclaimer. 161.1Skiyohara * 2. Redistributions in binary form must reproduce the above copyright 171.1Skiyohara * notice, this list of conditions and the following disclaimer in the 181.1Skiyohara * documentation and/or other materials provided with the distribution. 191.1Skiyohara * 3. Neither the name of the University nor the names of its contributors 201.1Skiyohara * may be used to endorse or promote products derived from this software 211.1Skiyohara * without specific prior written permission. 221.1Skiyohara * 231.1Skiyohara * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 241.1Skiyohara * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 251.1Skiyohara * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 261.1Skiyohara * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 271.1Skiyohara * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 281.1Skiyohara * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 291.1Skiyohara * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 301.1Skiyohara * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 311.1Skiyohara * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 321.1Skiyohara * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 331.1Skiyohara * SUCH DAMAGE. 341.1Skiyohara * 351.1Skiyohara * from: Utah $Hdr: cons.h 1.6 92/01/21$ 361.1Skiyohara * 371.1Skiyohara * @(#)cons.h 8.1 (Berkeley) 6/10/93 381.1Skiyohara */ 391.1Skiyohara/* 401.1Skiyohara * Copyright (c) 1988 University of Utah. 411.1Skiyohara * 421.1Skiyohara * This code is derived from software contributed to Berkeley by 431.1Skiyohara * the Systems Programming Group of the University of Utah Computer 441.1Skiyohara * Science Department. 451.1Skiyohara * 461.1Skiyohara * Redistribution and use in source and binary forms, with or without 471.1Skiyohara * modification, are permitted provided that the following conditions 481.1Skiyohara * are met: 491.1Skiyohara * 1. Redistributions of source code must retain the above copyright 501.1Skiyohara * notice, this list of conditions and the following disclaimer. 511.1Skiyohara * 2. Redistributions in binary form must reproduce the above copyright 521.1Skiyohara * notice, this list of conditions and the following disclaimer in the 531.1Skiyohara * documentation and/or other materials provided with the distribution. 541.1Skiyohara * 3. All advertising materials mentioning features or use of this software 551.1Skiyohara * must display the following acknowledgement: 561.1Skiyohara * This product includes software developed by the University of 571.1Skiyohara * California, Berkeley and its contributors. 581.1Skiyohara * 4. Neither the name of the University nor the names of its contributors 591.1Skiyohara * may be used to endorse or promote products derived from this software 601.1Skiyohara * without specific prior written permission. 611.1Skiyohara * 621.1Skiyohara * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 631.1Skiyohara * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 641.1Skiyohara * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 651.1Skiyohara * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 661.1Skiyohara * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 671.1Skiyohara * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 681.1Skiyohara * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 691.1Skiyohara * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 701.1Skiyohara * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 711.1Skiyohara * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 721.1Skiyohara * SUCH DAMAGE. 731.1Skiyohara * 741.1Skiyohara * from: Utah $Hdr: cons.h 1.6 92/01/21$ 751.1Skiyohara * 761.1Skiyohara * @(#)cons.h 8.1 (Berkeley) 6/10/93 771.1Skiyohara */ 781.1Skiyohara 791.1Skiyoharastruct consdev { 801.1Skiyohara char *cn_name; /* console device name */ 811.1Skiyohara int address; /* address */ 821.1Skiyohara int speed; /* speed(serial only) */ 831.1Skiyohara void (*cn_probe) /* probe hardware and fill in consdev info */ 841.1Skiyohara(struct consdev *); 851.1Skiyohara void (*cn_init) /* turn on as console */ 861.1Skiyohara(struct consdev *); 871.1Skiyohara int (*cn_getc) /* getchar interface */ 881.1Skiyohara(void *); 891.1Skiyohara void (*cn_putc) /* putchar interface */ 901.1Skiyohara(void *, int); 911.1Skiyohara int (*cn_scan) /* scan interface */ 921.1Skiyohara(void *); 931.1Skiyohara int cn_pri; /* pecking order; the higher the better */ 941.1Skiyohara void *cn_dev; /* device data tag */ 951.1Skiyohara}; 961.1Skiyohara 971.1Skiyohara/* values for cn_pri - reflect our policy for console selection */ 981.1Skiyohara#define CN_DEAD 0 /* device doesn't exist */ 991.1Skiyohara#define CN_NORMAL 1 /* device exists but is nothing special */ 1001.1Skiyohara#define CN_INTERNAL 2 /* "internal" bit-mapped display */ 1011.1Skiyohara#define CN_REMOTE 3 /* serial interface with remote bit set */ 102