1*9b6bd2d9Srmind /* $NetBSD: cons.h,v 1.2 2011/02/08 20:20:23 rmind Exp $ */ 268fe5b6fSgarbled 368fe5b6fSgarbled /* 4*9b6bd2d9Srmind * Copyright (c) 1988 University of Utah. 568fe5b6fSgarbled * Copyright (c) 1990, 1993 668fe5b6fSgarbled * The Regents of the University of California. All rights reserved. 768fe5b6fSgarbled * 868fe5b6fSgarbled * This code is derived from software contributed to Berkeley by 968fe5b6fSgarbled * the Systems Programming Group of the University of Utah Computer 1068fe5b6fSgarbled * Science Department. 1168fe5b6fSgarbled * 1268fe5b6fSgarbled * Redistribution and use in source and binary forms, with or without 1368fe5b6fSgarbled * modification, are permitted provided that the following conditions 1468fe5b6fSgarbled * are met: 1568fe5b6fSgarbled * 1. Redistributions of source code must retain the above copyright 1668fe5b6fSgarbled * notice, this list of conditions and the following disclaimer. 1768fe5b6fSgarbled * 2. Redistributions in binary form must reproduce the above copyright 1868fe5b6fSgarbled * notice, this list of conditions and the following disclaimer in the 1968fe5b6fSgarbled * documentation and/or other materials provided with the distribution. 2068fe5b6fSgarbled * 3. Neither the name of the University nor the names of its contributors 2168fe5b6fSgarbled * may be used to endorse or promote products derived from this software 2268fe5b6fSgarbled * without specific prior written permission. 2368fe5b6fSgarbled * 2468fe5b6fSgarbled * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 2568fe5b6fSgarbled * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 2668fe5b6fSgarbled * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 2768fe5b6fSgarbled * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 2868fe5b6fSgarbled * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 2968fe5b6fSgarbled * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 3068fe5b6fSgarbled * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 3168fe5b6fSgarbled * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 3268fe5b6fSgarbled * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 3368fe5b6fSgarbled * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 3468fe5b6fSgarbled * SUCH DAMAGE. 3568fe5b6fSgarbled * 3668fe5b6fSgarbled * from: Utah $Hdr: cons.h 1.6 92/01/21$ 3768fe5b6fSgarbled * 3868fe5b6fSgarbled * @(#)cons.h 8.1 (Berkeley) 6/10/93 3968fe5b6fSgarbled */ 4068fe5b6fSgarbled 4168fe5b6fSgarbled struct consdev { 4268fe5b6fSgarbled char *cn_name; /* console device name */ 4368fe5b6fSgarbled int address; /* address */ 4468fe5b6fSgarbled int speed; /* speed(serial only) */ 4568fe5b6fSgarbled void (*cn_probe) /* probe hardware and fill in consdev info */ 4668fe5b6fSgarbled (struct consdev *); 4768fe5b6fSgarbled void (*cn_init) /* turn on as console */ 4868fe5b6fSgarbled (struct consdev *); 4968fe5b6fSgarbled int (*cn_getc) /* getchar interface */ 5068fe5b6fSgarbled (void *); 5168fe5b6fSgarbled void (*cn_putc) /* putchar interface */ 5268fe5b6fSgarbled (void *, int); 5368fe5b6fSgarbled int (*cn_scan) /* scan interface */ 5468fe5b6fSgarbled (void *); 5568fe5b6fSgarbled int cn_pri; /* pecking order; the higher the better */ 5668fe5b6fSgarbled void *cn_dev; /* device data tag */ 5768fe5b6fSgarbled }; 5868fe5b6fSgarbled 5968fe5b6fSgarbled /* values for cn_pri - reflect our policy for console selection */ 6068fe5b6fSgarbled #define CN_DEAD 0 /* device doesn't exist */ 6168fe5b6fSgarbled #define CN_NORMAL 1 /* device exists but is nothing special */ 6268fe5b6fSgarbled #define CN_INTERNAL 2 /* "internal" bit-mapped display */ 6368fe5b6fSgarbled #define CN_REMOTE 3 /* serial interface with remote bit set */ 64