1*cbab9cadSchs /* $NetBSD: akbdvar.h,v 1.10 2012/10/27 17:17:59 chs Exp $ */ 28a007407Sscottr 38a007407Sscottr /* 48a007407Sscottr * Copyright (C) 1998 Colin Wood 58a007407Sscottr * All rights reserved. 68a007407Sscottr * 78a007407Sscottr * Redistribution and use in source and binary forms, with or without 88a007407Sscottr * modification, are permitted provided that the following conditions 98a007407Sscottr * are met: 108a007407Sscottr * 1. Redistributions of source code must retain the above copyright 118a007407Sscottr * notice, this list of conditions and the following disclaimer. 128a007407Sscottr * 2. Redistributions in binary form must reproduce the above copyright 138a007407Sscottr * notice, this list of conditions and the following disclaimer in the 148a007407Sscottr * documentation and/or other materials provided with the distribution. 158a007407Sscottr * 3. All advertising materials mentioning features or use of this software 168a007407Sscottr * must display the following acknowledgement: 178a007407Sscottr * This product includes software developed by Colin Wood. 188a007407Sscottr * 4. The name of the author may not be used to endorse or promote products 198a007407Sscottr * derived from this software without specific prior written permission. 208a007407Sscottr * 218a007407Sscottr * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 228a007407Sscottr * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 238a007407Sscottr * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 248a007407Sscottr * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 258a007407Sscottr * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 268a007407Sscottr * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 278a007407Sscottr * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 288a007407Sscottr * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 298a007407Sscottr * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 308a007407Sscottr * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 318a007407Sscottr */ 328a007407Sscottr 338a007407Sscottr #ifndef _MAC68K_KBDVAR_H_ 348a007407Sscottr #define _MAC68K_KBDVAR_H_ 358a007407Sscottr 368a007407Sscottr #include <machine/adbsys.h> 378a007407Sscottr 388a007407Sscottr /* 398a007407Sscottr * State info, per keyboard instance. 408a007407Sscottr */ 418a007407Sscottr struct akbd_softc { 428a007407Sscottr /* ADB info */ 438a007407Sscottr int origaddr; /* ADB device type (ADBADDR_KBD) */ 448a007407Sscottr int adbaddr; /* current ADB address */ 458a007407Sscottr int handler_id; /* type of keyboard */ 468a007407Sscottr 478a007407Sscottr u_int8_t sc_leds; /* current LED state */ 48*cbab9cadSchs device_t sc_wskbddev; 498a007407Sscottr }; 508a007407Sscottr 518a007407Sscottr /* LED register bits, inverse of actual register value */ 528a007407Sscottr #define LED_NUMLOCK 0x1 538a007407Sscottr #define LED_CAPSLOCK 0x2 548a007407Sscottr #define LED_SCROLL_LOCK 0x4 558a007407Sscottr 567acd68b1Schs int akbd_cnattach(void); 5790670ac8Shauke void kbd_adbcomplete(uint8_t *, void *, int); 588a007407Sscottr 598a007407Sscottr #endif /* _MAC68K_KBDVAR_H_ */ 60