1*81ea19bcSandvar /* $NetBSD: kbcreg.h,v 1.3 2022/10/31 20:30:23 andvar Exp $ */ 208f4daf2Stsutsui 308f4daf2Stsutsui /*- 4b87210faStsutsui * Copyright (c) 2001 Izumi Tsutsui. All rights reserved. 508f4daf2Stsutsui * 608f4daf2Stsutsui * Redistribution and use in source and binary forms, with or without 708f4daf2Stsutsui * modification, are permitted provided that the following conditions 808f4daf2Stsutsui * are met: 908f4daf2Stsutsui * 1. Redistributions of source code must retain the above copyright 1008f4daf2Stsutsui * notice, this list of conditions and the following disclaimer. 1108f4daf2Stsutsui * 2. Redistributions in binary form must reproduce the above copyright 1208f4daf2Stsutsui * notice, this list of conditions and the following disclaimer in the 1308f4daf2Stsutsui * documentation and/or other materials provided with the distribution. 1408f4daf2Stsutsui * 1508f4daf2Stsutsui * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 1608f4daf2Stsutsui * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 1708f4daf2Stsutsui * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 1808f4daf2Stsutsui * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 1908f4daf2Stsutsui * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 2008f4daf2Stsutsui * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 2108f4daf2Stsutsui * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 2208f4daf2Stsutsui * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23b87210faStsutsui * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 24b87210faStsutsui * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 2508f4daf2Stsutsui */ 2608f4daf2Stsutsui 2708f4daf2Stsutsui /* register port offsets */ 2808f4daf2Stsutsui #define KBC_KBREG_DATA 0 2908f4daf2Stsutsui #define KBC_KBREG_STAT 1 3008f4daf2Stsutsui #define KBC_KBREG_INTE 2 3108f4daf2Stsutsui #define KBC_KBREG_RESET 3 3208f4daf2Stsutsui #define KBC_KBREG_BUZZ 4 3308f4daf2Stsutsui 3408f4daf2Stsutsui #define KBC_MSREG_DATA 5 3508f4daf2Stsutsui #define KBC_MSREG_STAT KBC_KBREG_STAT 3608f4daf2Stsutsui #define KBC_MSREG_INTE 6 3708f4daf2Stsutsui #define KBC_MSREG_RESET 7 3808f4daf2Stsutsui 3908f4daf2Stsutsui #define KBC_INTE 0x01 /* interrupt enable */ 4008f4daf2Stsutsui 4108f4daf2Stsutsui /* status port definitions */ 4208f4daf2Stsutsui #define KBCSTAT_MSINT 0x04 /* mouse interrupt flag */ 43*81ea19bcSandvar #define KBCSTAT_KBINT 0x08 /* keyboard interrupt flag */ 4408f4daf2Stsutsui #define KBCSTAT_MSBUF 0x10 /* mouse buffer full */ 4508f4daf2Stsutsui #define KBCSTAT_KBBUF 0x20 /* keyboard buffer full */ 4608f4daf2Stsutsui #define KBCSTAT_MSRDY 0x40 /* mouse Rx data ready */ 4708f4daf2Stsutsui #define KBCSTAT_KBRDY 0x80 /* keyboard Rx data ready */ 48