1240616Sjimharris/* $NetBSD: cons.h,v 1.4 2009/03/14 14:45:58 dsl Exp $ */ 2253112Sjimharris 3240616Sjimharris/* 4240616Sjimharris * Copyright (c) 1990, 1993 5240616Sjimharris * The Regents of the University of California. All rights reserved. 6240616Sjimharris * 7240616Sjimharris * This code is derived from software contributed to Berkeley by 8240616Sjimharris * the Systems Programming Group of the University of Utah Computer 9240616Sjimharris * Science Department. 10240616Sjimharris * 11240616Sjimharris * Redistribution and use in source and binary forms, with or without 12240616Sjimharris * modification, are permitted provided that the following conditions 13240616Sjimharris * are met: 14240616Sjimharris * 1. Redistributions of source code must retain the above copyright 15240616Sjimharris * notice, this list of conditions and the following disclaimer. 16240616Sjimharris * 2. Redistributions in binary form must reproduce the above copyright 17240616Sjimharris * notice, this list of conditions and the following disclaimer in the 18240616Sjimharris * documentation and/or other materials provided with the distribution. 19240616Sjimharris * 3. Neither the name of the University nor the names of its contributors 20240616Sjimharris * may be used to endorse or promote products derived from this software 21240616Sjimharris * without specific prior written permission. 22240616Sjimharris * 23240616Sjimharris * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 24240616Sjimharris * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 25240616Sjimharris * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 26240616Sjimharris * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 27240616Sjimharris * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 28240616Sjimharris * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 29240616Sjimharris * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 30240616Sjimharris * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 31240616Sjimharris * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 32240616Sjimharris * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 33240616Sjimharris * SUCH DAMAGE. 34240616Sjimharris * 35240616Sjimharris * from: Utah $Hdr: cons.h 1.6 92/01/21$ 36240616Sjimharris * 37240616Sjimharris * @(#)cons.h 8.1 (Berkeley) 6/10/93 38240616Sjimharris */ 39240616Sjimharris/* 40240616Sjimharris * Copyright (c) 1988 University of Utah. 41240616Sjimharris * 42240616Sjimharris * This code is derived from software contributed to Berkeley by 43240616Sjimharris * the Systems Programming Group of the University of Utah Computer 44240616Sjimharris * Science Department. 45240616Sjimharris * 46240616Sjimharris * Redistribution and use in source and binary forms, with or without 47240616Sjimharris * modification, are permitted provided that the following conditions 48240616Sjimharris * are met: 49240616Sjimharris * 1. Redistributions of source code must retain the above copyright 50240616Sjimharris * notice, this list of conditions and the following disclaimer. 51240616Sjimharris * 2. Redistributions in binary form must reproduce the above copyright 52240616Sjimharris * notice, this list of conditions and the following disclaimer in the 53240616Sjimharris * documentation and/or other materials provided with the distribution. 54240616Sjimharris * 3. All advertising materials mentioning features or use of this software 55240616Sjimharris * must display the following acknowledgement: 56240616Sjimharris * This product includes software developed by the University of 57240616Sjimharris * California, Berkeley and its contributors. 58240616Sjimharris * 4. Neither the name of the University nor the names of its contributors 59240616Sjimharris * may be used to endorse or promote products derived from this software 60240616Sjimharris * without specific prior written permission. 61240616Sjimharris * 62240616Sjimharris * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 63240616Sjimharris * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 64240616Sjimharris * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 65240616Sjimharris * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 66240616Sjimharris * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 67240616Sjimharris * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 68240616Sjimharris * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 69240616Sjimharris * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 70240616Sjimharris * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 71240616Sjimharris * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 72240616Sjimharris * SUCH DAMAGE. 73240616Sjimharris * 74240616Sjimharris * from: Utah $Hdr: cons.h 1.6 92/01/21$ 75240616Sjimharris * 76240616Sjimharris * @(#)cons.h 8.1 (Berkeley) 6/10/93 77240616Sjimharris */ 78240616Sjimharris 79240616Sjimharrisstruct consdev { 80240616Sjimharris char *cn_name; /* console device name */ 81240616Sjimharris int address; /* address */ 82240616Sjimharris int speed; /* speed(serial only) */ 83240616Sjimharris void (*cn_probe) /* probe hardware and fill in consdev info */ 84240616Sjimharris(struct consdev *); 85240616Sjimharris void (*cn_init) /* turn on as console */ 86240616Sjimharris(struct consdev *); 87240616Sjimharris int (*cn_getc) /* getchar interface */ 88240616Sjimharris(void *); 89240616Sjimharris void (*cn_putc) /* putchar interface */ 90240616Sjimharris(void *, int); 91240616Sjimharris int (*cn_scan) /* scan interface */ 92240616Sjimharris(void *); 93240616Sjimharris int cn_pri; /* pecking order; the higher the better */ 94240616Sjimharris void *cn_dev; /* device data tag */ 95240616Sjimharris}; 96240616Sjimharris 97240616Sjimharris/* values for cn_pri - reflect our policy for console selection */ 98240616Sjimharris#define CN_DEAD 0 /* device doesn't exist */ 99248770Sjimharris#define CN_NORMAL 1 /* device exists but is nothing special */ 100240616Sjimharris#define CN_INTERNAL 2 /* "internal" bit-mapped display */ 101240616Sjimharris#define CN_REMOTE 3 /* serial interface with remote bit set */ 102240616Sjimharris