Annotation of kernel/bsd/dev/adb.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: /*
        !            26:  * Copyright (c) 1991 NeXT Computer, Inc.
        !            27:  *
        !            28:  * adb.h -- ADB driver header.
        !            29:  *
        !            30:  * Author: ?
        !            31:  */
        !            32: 
        !            33: #ifdef KERNEL_PRIVATE
        !            34: 
        !            35: #ifndef                _NEXTDEV_ADB_H_
        !            36: #define                _NEXTDEV_ADB_H_
        !            37: 
        !            38: #import <bsd/dev/ev_types.h>
        !            39: 
        !            40: typedef union {
        !            41:     struct {
        !            42:        unsigned char   cmd;
        !            43:     } cmd;
        !            44:     struct {
        !            45:        unsigned char   addr:4,
        !            46:                         cmd:4;
        !            47: #define ADB_reset      0
        !            48: #define ADB_flush      1
        !            49:     } gen;
        !            50:     struct {
        !            51:        unsigned char   addr:4,
        !            52:                         cmd:2,
        !            53: #define ADB_listen     2
        !            54: #define ADB_talk       3
        !            55:                         reg:2;
        !            56:     } reg;
        !            57: } adb_cmd_t;
        !            58: 
        !            59: typedef union {
        !            60:     struct {
        !            61:        unsigned        data0;
        !            62:        unsigned        data1;
        !            63:     } longword;
        !            64:     struct {
        !            65:        unsigned char   data[8];
        !            66:     } byte;
        !            67:     struct {
        !            68:        unsigned short  :1,
        !            69:                        exceptionalEvent:1,
        !            70:                        serviceReqEnb:1,
        !            71:                        :1,
        !            72:                        addr:4,
        !            73:                        devHandlerID:8;
        !            74:     } reg3;
        !            75:     struct {
        !            76:        unsigned short  left_up:1,
        !            77:                        Y_delta:7,
        !            78:                        right_up:1,     /* Reserved in Apple mouse */
        !            79:                        X_delta:7;
        !            80:     } m_reg0;
        !            81:     struct {
        !            82:        unsigned int    left_up:1,
        !            83:                        Y_delta:7,
        !            84:                        :1,
        !            85:                        X_delta:7,
        !            86:                        :5,
        !            87:                        left_down:1,
        !            88:                        middle_down:1,
        !            89:                        right_down:1,
        !            90:                        :8;
        !            91:     } logitech_s13_m_reg0;
        !            92:     struct {
        !            93:        unsigned short  key1_up:1,
        !            94:                        key1_code:7,
        !            95:                        key2_up:1,
        !            96:                        key2_code:7;
        !            97:     } k_reg0;
        !            98:     struct {
        !            99:        unsigned short  :1,
        !           100:                        key_delete:1,
        !           101:                        key_cap_lock:1,
        !           102:                        key_reset:1,
        !           103:                        key_control:1,
        !           104:                        key_shift:1,
        !           105:                        key_alt:1,
        !           106:                        key_command:1,
        !           107:                        key_num_lock:1,
        !           108:                        key_scroll_lock:1,
        !           109:                        :3,
        !           110:                        led_scroll_lock:1,
        !           111:                        led_cap_lock:1,
        !           112:                        led_num_lock:1;
        !           113:     } k_reg2;
        !           114:     struct {
        !           115:        unsigned char   byteaddr;       /* Logitech Reg 1 byte mapping. */
        !           116:        unsigned char   byteval;
        !           117:        unsigned char   _unknown1_;
        !           118:        unsigned char   _unknown2_;
        !           119:        unsigned char   right_button;
        !           120:        unsigned char   middle_button;
        !           121:        unsigned char   left_button;
        !           122:        unsigned char   _unknown3_;
        !           123:     } logitech_s13_m_reg1;
        !           124: } adb_data_t;
        !           125: 
        !           126: #define ADB_ADDR_INVALID       0
        !           127: #define ADB_ADDR_LOW           1
        !           128: #define ADB_ADDR_KEYBOARD      2
        !           129: #define ADB_ADDR_MOUSE         3
        !           130: #define ADB_ADDR_TABLET                4
        !           131: 
        !           132: #define ADB_ADDR_SOFT          8
        !           133: #define ADB_ADDR_HIGH          15
        !           134: 
        !           135: extern void            adb_initialize(void);
        !           136: extern void            adb_talk(int, int, adb_data_t *, int *);
        !           137: extern void            adb_listen(int, int, adb_data_t *, int);
        !           138: extern boolean_t       adb_poll_keyboard(adb_data_t *);
        !           139: extern void            adb_force_NMI(void);
        !           140: extern void            adb_watchdog(boolean_t);
        !           141: extern int             adb_system_info(NXEventSystemDevice *, int);
        !           142: 
        !           143: #endif         /* _NEXTDEV_ADB_H_ */
        !           144: 
        !           145: #endif

unix.superglobalmegacorp.com

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