Annotation of kernel/bsd/dev/i386/PS2KeyboardPriv.h, revision 1.1

1.1     ! root        1: /*
        !             2:  * Copyright (c) 1999 Apple Computer, Inc. All rights reserved.
        !             3:  *
        !             4:  * @APPLE_LICENSE_HEADER_START@
        !             5:  * 
        !             6:  * Portions Copyright (c) 1999 Apple Computer, Inc.  All Rights
        !             7:  * Reserved.  This file contains Original Code and/or Modifications of
        !             8:  * Original Code as defined in and that are subject to the Apple Public
        !             9:  * Source License Version 1.1 (the "License").  You may not use this file
        !            10:  * except in compliance with the License.  Please obtain a copy of the
        !            11:  * License at http://www.apple.com/publicsource and read it before using
        !            12:  * this file.
        !            13:  * 
        !            14:  * The Original Code and all software distributed under the License are
        !            15:  * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
        !            16:  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
        !            17:  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
        !            18:  * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
        !            19:  * License for the specific language governing rights and limitations
        !            20:  * under the License.
        !            21:  * 
        !            22:  * @APPLE_LICENSE_HEADER_END@
        !            23:  */
        !            24: 
        !            25: #ifdef DRIVER_PRIVATE
        !            26: 
        !            27: // Ports used to control the PS/2 keyboard/mouse and read data from it
        !            28: #define K_RDWR                 0x60            // keyboard data & cmds (read/write)
        !            29: #define K_STATUS       0x64            // keybd status (read-only)
        !            30: #define K_CMD          0x64            // keybd ctlr command (write-only)
        !            31: 
        !            32: //
        !            33: // Bit definitions for K_STATUS port.
        !            34: //
        !            35: #define K_OBUF_FUL     0x01            // output (from keybd) buffer full
        !            36: #define K_IBUF_FUL     0x02            // input (to keybd) buffer full
        !            37: #define K_SYSFLAG      0x04            // "System Flag"
        !            38: #define K_CMD_DATA     0x08            // 1 = input buf has cmd, 0 = data
        !            39: #define K_KBD_INHBT    0x10            // 0 if keyboard inhibited
        !            40: #define M_OBUF_FUL     0x20            // mouse data available
        !            41: 
        !            42: // 
        !            43: // Keyboard controller commands (sent to K_CMD port).
        !            44: //
        !            45: #define KC_CMD_READ    0x20            // read controller command byte
        !            46: #define KC_CMD_WRITE   0x60            // write controller command byte
        !            47: #define KC_CMD_TEST    0xab            // test interface
        !            48: #define KC_CMD_DUMP    0xac            // diagnostic dump
        !            49: #define KC_CMD_DISBLE  0xad            // disable keyboard
        !            50: #define KC_CMD_ENBLE   0xae            // enable keyboard
        !            51: #define KC_CMD_RDKBD   0xc4            // read keyboard ID
        !            52: #define KC_CMD_MOUSE   0xd4            // send next data to mouse
        !            53: #define KC_CMD_ECHO    0xee            // used for diagnostic testing
        !            54: #define        KC_REBOOT       0xfe            // cause a reboot to occur
        !            55: // 
        !            56: // Keyboard/mouse commands (send to K_RDWR).
        !            57: //
        !            58: #define K_CMD_LEDS     0xed            // set status LEDs (caps lock, etc.)
        !            59: #define M_CMD_SETRES   0xe8            // set mouse resolution to 2**N/mm
        !            60: #define M_CMD_SAMPLING 0xf3            // set mouse sampling rate
        !            61: #define M_CMD_POLL     0xf4            // enable mouse polling
        !            62: 
        !            63: // 
        !            64: // Bit definitions for controller command byte (sent following 
        !            65: // K_CMD_WRITE command).
        !            66: //
        !            67: #define K_CB_ENBLIRQ   0x01            // enable data-ready intrpt
        !            68: #define M_CB_ENBLIRQ   0x02            // enable data-ready intrpt
        !            69: #define K_CB_SETSYSF   0x04            // Set System Flag
        !            70: #define K_CB_INHBOVR   0x08            // Inhibit Override
        !            71: #define K_CB_DISBLE    0x10            // disable keyboard
        !            72: #define M_CB_DISBLE    0x20            // disable mouse
        !            73: #define        K_CB_TRANSLATE  0x40            // keyboard translate mode
        !            74: 
        !            75: // 
        !            76: // Bit definitions for "Indicator Status Byte" (sent after a 
        !            77: // K_CMD_LEDS command).  If the bit is on, the LED is on.  Undefined 
        !            78: // bit positions must be 0.
        !            79: //
        !            80: #define K_LED_SCRLLK   0x1             // scroll lock
        !            81: #define K_LED_NUMLK    0x2             // num lock
        !            82: #define K_LED_CAPSLK   0x4             // caps lock
        !            83: 
        !            84: //
        !            85: // Special Codes: These codes do not represent actual keys. theyare generated
        !            86: // under special circumstances to indicate some sort of status.
        !            87: //
        !            88: #define K_UP           0x80            // OR'd in if key below is released
        !            89: #define K_EXTEND       0xe0            // marker for "extended" sequence
        !            90: #define        K_PAUSE         0xe1            // marker for pause key sequence
        !            91: #define K_ACKSC                0xfa            // ack for keyboard command
        !            92: #define K_RESEND       0xfe            // request to resend keybd cmd
        !            93: 
        !            94: #define K_DATA_DELAY   7               // usec to delay before data is valid
        !            95: 
        !            96: #endif /* DRIVER_PRIVATE */

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.