1*9b6bd2d9Srmind /* $NetBSD: cons.h,v 1.8 2011/02/08 20:20:10 rmind Exp $ */ 2b1bde3fcSsakamoto 3b1bde3fcSsakamoto /* 4*9b6bd2d9Srmind * Copyright (c) 1988 University of Utah. 5b1bde3fcSsakamoto * Copyright (c) 1990, 1993 6b1bde3fcSsakamoto * The Regents of the University of California. All rights reserved. 7b1bde3fcSsakamoto * 8b1bde3fcSsakamoto * This code is derived from software contributed to Berkeley by 9b1bde3fcSsakamoto * the Systems Programming Group of the University of Utah Computer 10b1bde3fcSsakamoto * Science Department. 11b1bde3fcSsakamoto * 12b1bde3fcSsakamoto * Redistribution and use in source and binary forms, with or without 13b1bde3fcSsakamoto * modification, are permitted provided that the following conditions 14b1bde3fcSsakamoto * are met: 15b1bde3fcSsakamoto * 1. Redistributions of source code must retain the above copyright 16b1bde3fcSsakamoto * notice, this list of conditions and the following disclaimer. 17b1bde3fcSsakamoto * 2. Redistributions in binary form must reproduce the above copyright 18b1bde3fcSsakamoto * notice, this list of conditions and the following disclaimer in the 19b1bde3fcSsakamoto * 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 */ 40b1bde3fcSsakamoto 41b1bde3fcSsakamoto struct consdev { 42709dd80eSsakamoto char *cn_name; /* console device name */ 4395dac230Ssakamoto int address; /* address */ 4495dac230Ssakamoto int speed; /* speed(serial only) */ 45b1bde3fcSsakamoto void (*cn_probe) /* probe hardware and fill in consdev info */ 4602cdf4d2Sdsl (struct consdev *); 47b1bde3fcSsakamoto void (*cn_init) /* turn on as console */ 4802cdf4d2Sdsl (struct consdev *); 49b1bde3fcSsakamoto int (*cn_getc) /* getchar interface */ 5002cdf4d2Sdsl (void *); 51b1bde3fcSsakamoto void (*cn_putc) /* putchar interface */ 5202cdf4d2Sdsl (void *, int); 53b1bde3fcSsakamoto int (*cn_scan) /* scan interface */ 5402cdf4d2Sdsl (void *); 55b1bde3fcSsakamoto int cn_pri; /* pecking order; the higher the better */ 5695dac230Ssakamoto void *cn_dev; /* device data tag */ 57b1bde3fcSsakamoto }; 58b1bde3fcSsakamoto 59b1bde3fcSsakamoto /* values for cn_pri - reflect our policy for console selection */ 60b1bde3fcSsakamoto #define CN_DEAD 0 /* device doesn't exist */ 61b1bde3fcSsakamoto #define CN_NORMAL 1 /* device exists but is nothing special */ 62b1bde3fcSsakamoto #define CN_INTERNAL 2 /* "internal" bit-mapped display */ 63b1bde3fcSsakamoto #define CN_REMOTE 3 /* serial interface with remote bit set */ 64