xref: /netbsd-src/sys/arch/news68k/dev/kb_hbreg.h (revision 81ea19bc4d23db803cc23e6789529b48ba718e26)
1*81ea19bcSandvar /*	$NetBSD: kb_hbreg.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 KB_REG_DATA		0
2908f4daf2Stsutsui #define KB_REG_STAT		1
3008f4daf2Stsutsui #define KB_REG_INTE		2
3108f4daf2Stsutsui #define KB_REG_RESET		3
3208f4daf2Stsutsui #define KB_REG_INIT1		4
3308f4daf2Stsutsui #define KB_REG_INIT2		5
3408f4daf2Stsutsui #define KB_REG_BUZZ		6
3508f4daf2Stsutsui #define KB_REG_BUZZF		7
3608f4daf2Stsutsui 
3708f4daf2Stsutsui #define KB_INTE			0x01	/* interrupt enable */
3808f4daf2Stsutsui 
3908f4daf2Stsutsui /* status port definitions */
40*81ea19bcSandvar #define KBSTAT_INT		0x08	/* keyboard interrupt flag */
4108f4daf2Stsutsui #define KBSTAT_BUF		0x20	/* keyboard buffer full */
4208f4daf2Stsutsui #define KBSTAT_RDY		0x80	/* keyboard Rx data ready */
43