Annotation of XNU/iokit/IOKit/adb/IOADBBus.h, revision 1.1.1.1

1.1       root        1: /*
                      2:  * Copyright (c) 1998-2000 Apple Computer, Inc. All rights reserved.
                      3:  *
                      4:  * @APPLE_LICENSE_HEADER_START@
                      5:  * 
                      6:  * The contents of this file constitute Original Code as defined in and
                      7:  * are subject to the Apple Public Source License Version 1.1 (the
                      8:  * "License").  You may not use this file except in compliance with the
                      9:  * License.  Please obtain a copy of the License at
                     10:  * http://www.apple.com/publicsource and read it before using this file.
                     11:  * 
                     12:  * This Original Code and all software distributed under the License are
                     13:  * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
                     14:  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
                     15:  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
                     16:  * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
                     17:  * License for the specific language governing rights and limitations
                     18:  * under the License.
                     19:  * 
                     20:  * @APPLE_LICENSE_HEADER_END@
                     21:  */
                     22: /*
                     23:  * Copyright 1996 1995 by Open Software Foundation, Inc. 1997 1996 1995 1994 1993 1992 1991  
                     24:  *              All Rights Reserved 
                     25:  *  
                     26:  * Permission to use, copy, modify, and distribute this software and 
                     27:  * its documentation for any purpose and without fee is hereby granted, 
                     28:  * provided that the above copyright notice appears in all copies and 
                     29:  * that both the copyright notice and this permission notice appear in 
                     30:  * supporting documentation. 
                     31:  *  
                     32:  * OSF DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE 
                     33:  * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS 
                     34:  * FOR A PARTICULAR PURPOSE. 
                     35:  *  
                     36:  * IN NO EVENT SHALL OSF BE LIABLE FOR ANY SPECIAL, INDIRECT, OR 
                     37:  * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM 
                     38:  * LOSS OF USE, DATA OR PROFITS, WHETHER IN ACTION OF CONTRACT, 
                     39:  * NEGLIGENCE, OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION 
                     40:  * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 
                     41:  * 
                     42:  */
                     43: /*
                     44:  * Copyright 1996 1995 by Apple Computer, Inc. 1997 1996 1995 1994 1993 1992 1991  
                     45:  *              All Rights Reserved 
                     46:  *  
                     47:  * Permission to use, copy, modify, and distribute this software and 
                     48:  * its documentation for any purpose and without fee is hereby granted, 
                     49:  * provided that the above copyright notice appears in all copies and 
                     50:  * that both the copyright notice and this permission notice appear in 
                     51:  * supporting documentation. 
                     52:  *  
                     53:  * APPLE COMPUTER DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE 
                     54:  * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS 
                     55:  * FOR A PARTICULAR PURPOSE. 
                     56:  *  
                     57:  * IN NO EVENT SHALL APPLE COMPUTER BE LIABLE FOR ANY SPECIAL, INDIRECT, OR 
                     58:  * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM 
                     59:  * LOSS OF USE, DATA OR PROFITS, WHETHER IN ACTION OF CONTRACT, 
                     60:  * NEGLIGENCE, OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION 
                     61:  * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 
                     62:  */
                     63: /*
                     64:  * MKLINUX-1.0DR2
                     65:  */
                     66: /*
                     67:  * 18 June 1998 sdouglas  Start IOKit version.
                     68:  * 23 Nov  1998 suurballe Port to C++
                     69:  */
                     70: 
                     71: #ifndef _IOKIT_IOADBBUS_H
                     72: #define _IOKIT_IOADBBUS_H
                     73: 
                     74: #include <IOKit/IOService.h>
                     75: #include <IOKit/adb/adb.h>
                     76: 
                     77: #define ADB_DEVICE_COUNT       16
                     78: 
                     79: #define ADB_FLAGS_PRESENT      0x00000001  /* Device is present */
                     80: #define ADB_FLAGS_REGISTERED    0x00000002  /* Device has a handler */
                     81: #define ADB_FLAGS_UNRESOLVED    0x00000004  /* Device has not been fully probed */
                     82: 
                     83: /*
                     84:  * ADB Commands
                     85:  */
                     86: 
                     87: #define ADB_DEVCMD_SELF_TEST        0xff
                     88: #define ADB_DEVCMD_CHANGE_ID        0xfe
                     89: #define ADB_DEVCMD_CHANGE_ID_AND_ACT    0xfd
                     90: #define ADB_DEVCMD_CHANGE_ID_AND_ENABLE 0x00
                     91: 
                     92: /*
                     93:  * ADB IORegistryEntry properties
                     94:  */
                     95: 
                     96: #define ADBaddressProperty "address"
                     97: #define ADBhandlerIDProperty "handler id"
                     98: #define ADBdefAddressProperty "default address"
                     99: #define ADBdefHandlerProperty "default handler id"
                    100: #define ADBnameProperty "name"
                    101: 
                    102: 
                    103: struct ADBDeviceControl {
                    104:     IOADBAddress       address;
                    105:     IOADBAddress       defaultAddress;
                    106:     UInt8              handlerID;
                    107:     UInt8              defaultHandlerID;
                    108:     UInt32             flags;
                    109:     IOService *                owner;
                    110:     ADB_callback_func  handler;
                    111: };
                    112: 
                    113: typedef struct ADBDeviceControl ADBDeviceControl;
                    114: 
                    115: 
                    116: class IOADBBus: public IOService
                    117: {
                    118: OSDeclareAbstractStructors(IOADBBus)
                    119: 
                    120: public:
                    121: 
                    122: ADBDeviceControl * adbDevices[ ADB_DEVICE_COUNT ];
                    123: 
                    124: virtual bool init ( OSDictionary * properties = 0 );
                    125: virtual bool matchNubWithPropertyTable( IOService * device, OSDictionary *  propertyTable ) = 0;
                    126: virtual IOReturn setOwner ( void * device, IOService * client, ADB_callback_func handler ) = 0;
                    127: virtual IOReturn clearOwner ( void * device ) = 0;
                    128: virtual IOReturn flush ( ADBDeviceControl * busRef ) = 0;
                    129: virtual IOReturn readRegister ( ADBDeviceControl * busRef, IOADBRegister adbRegister,
                    130:                UInt8 * data, IOByteCount * length ) = 0;
                    131: virtual IOReturn writeRegister ( ADBDeviceControl * busRef, IOADBRegister adbRegister,
                    132:                UInt8 * data, IOByteCount * length ) = 0;
                    133: virtual IOADBAddress address ( ADBDeviceControl * busRef ) = 0;
                    134: virtual IOADBAddress defaultAddress ( ADBDeviceControl * busRef ) = 0;
                    135: virtual UInt8 handlerID ( ADBDeviceControl * busRef ) = 0;
                    136: virtual UInt8 defaultHandlerID ( ADBDeviceControl * busRef ) = 0;
                    137: virtual IOReturn setHandlerID ( ADBDeviceControl * busRef, UInt8 handlerID ) = 0;
                    138: 
                    139: };
                    140: 
                    141: #endif /* ! _IOKIT_IOADBBUS_H */
                    142: 

unix.superglobalmegacorp.com

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