Annotation of kernel/bsd/dev/ppc/drvPMU/pmu.h, revision 1.1.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: #import <mach/std_types.h>
                     26: #import <driverkit/IODirectDevice.h>
                     27: 
                     28: #ifndef __APPLE_TYPES_DEFINED__
                     29: #define __APPLE_TYPES_DEFINED__ 1
                     30: 
                     31:         typedef unsigned int    UInt32;                        // A 32-bit unsigned integer
                     32:         typedef unsigned char   UInt8;                 // A "byte-sized" integer
                     33:        typedef signed char     SInt8;
                     34:         typedef signed int      SInt32;                        // A 32-bit signed integer
                     35:         typedef boolean_t       Boolean;               // TRUE/FALSE value (YES/NO in NeXT)
                     36:        typedef signed int      OSErr;
                     37:        typedef signed int      OSStatus;
                     38: 
                     39: #endif /* __APPLE_TYPES_DEFINED__ */
                     40: 
                     41: 
                     42: typedef void (*pmCallback_func)(id obj_id, UInt32 refNum, UInt32 length, UInt8 * buffer);
                     43: typedef void (*pmADBinput_func)(id obj_id, UInt32 refNum, UInt32 devNum, UInt32 length, UInt8 * buffer);
                     44: 
                     45: typedef OSStatus PMUStatus;
                     46: 
                     47: enum {
                     48:         kPMUNoError             = 0,
                     49:         kPMUInitError           = 1,    // PMU failed to initialize
                     50:         kPMUParameterError      = 2,    // Bad parameters
                     51:        kPMUNotSupported        = 3,    // PMU don't do that (Cuda does, though)
                     52:         kPMUIOError             = 4     // Nonspecific I/O failure
                     53:        };
                     54: 
                     55: 
                     56: // **********************************************************************************
                     57: //
                     58: // exported protocols
                     59: //
                     60: // **********************************************************************************
                     61: 
                     62: @protocol ADBservice
                     63: 
                     64: - (void)registerForADBAutopoll :(pmADBinput_func)InputHandler
                     65:                                :(id)caller;
                     66: 
                     67: - (PMUStatus)ADBWrite   :(UInt32)DevAddr
                     68:                        :(UInt32)DevReg
                     69:                        :(UInt32)ByteCount
                     70:                        :(UInt8*)Buffer
                     71:                        :(UInt32)RefNum
                     72:                         :(id)Id
                     73:                        :(pmCallback_func)Callback;
                     74: 
                     75: - (PMUStatus)ADBRead    :(UInt32)DevAddr
                     76:                        :(UInt32)DevReg
                     77:                        :(UInt32)RefNum
                     78:                         :(id)Id
                     79:                        :(pmCallback_func)Callback;
                     80: 
                     81: - (PMUStatus)ADBReset   :(UInt32)Refnum
                     82:                         :(id)Id
                     83:                        :(pmCallback_func)Callback;
                     84: 
                     85: - (PMUStatus)ADBFlush   :(UInt32)DevAddr
                     86:                        :(UInt32)RefNum
                     87:                         :(id)Id
                     88:                        :(pmCallback_func)Callback;
                     89: 
                     90: - (PMUStatus)ADBSetPollList     :(UInt32)PollBitField
                     91:                                :(UInt32)RefNum
                     92:                                :(id)Id
                     93:                                :(pmCallback_func)Callback;
                     94: 
                     95: - (PMUStatus)ADBPollDisable     :(UInt32)RefNum
                     96:                                :(id)Id
                     97:                                :(pmCallback_func)Callback;
                     98: 
                     99: - (PMUStatus)ADBSetFileServerMode:(UInt32)RefNum
                    100:                                :(id)Id
                    101:                                :(pmCallback_func)Callback;
                    102: 
                    103: 
                    104: 
                    105: - (PMUStatus)ADBPollEnable      :(UInt32)RefNum
                    106:                                :(id)Id
                    107:                                :(pmCallback_func)Callback;
                    108: 
                    109: - (PMUStatus)ADBSetPollRate     :(UInt32)newRate
                    110:                                :(UInt32)RefNum
                    111:                                :(id)Id
                    112:                                :(pmCallback_func)Callback;
                    113: 
                    114: - (PMUStatus)ADBGetPollRate     :(UInt32 *)currentRate
                    115:                                :(UInt32)RefNum
                    116:                                :(id)Id
                    117:                                :(pmCallback_func)Callback;
                    118: 
                    119: - (PMUStatus)ADBSetAlternateKeyboard    :(UInt32)DevAddr
                    120:                                        :(UInt32)RefNum
                    121:                                        :(id)Id
                    122:                                        :(pmCallback_func)Callback;
                    123: - (void)poll_device;
                    124: 
                    125: @end
                    126: 
                    127: 
                    128: 
                    129: @protocol RTCservice
                    130: 
                    131: - (void) registerForClockTicks :(pmCallback_func)tickHandler
                    132:                                :(id)caller;
                    133: 
                    134: - (PMUStatus)setRealTimeClock   :(UInt8 *)newTime
                    135:                                :(UInt32)RefNum
                    136:                                :(id)Id
                    137:                                :(pmCallback_func)Callback;
                    138: 
                    139: - (PMUStatus)getRealTimeClock   :(UInt8 *)currentTime
                    140:                                :(UInt32)RefNum
                    141:                                :(id)Id
                    142:                                :(pmCallback_func)Callback;
                    143: 
                    144: @end
                    145: 
                    146: 
                    147: 
                    148: @protocol NVRAMservice
                    149: 
                    150: - (PMUStatus) readNVRAM        :(UInt32)Offset
                    151:                        :(UInt32)Length
                    152:                        :(UInt8 *)Buffer
                    153:                        :(UInt32)RefNum
                    154:                         :(id)Id
                    155:                        :(pmCallback_func)Callback;
                    156: 
                    157: - (PMUStatus) writeNVRAM:(UInt32)Offset
                    158:                        :(UInt32)Length
                    159:                        :(UInt8 *)Buffer
                    160:                        :(UInt32)RefNum
                    161:                         :(id)Id
                    162:                        :(pmCallback_func)Callback;
                    163: 
                    164: @end
                    165: 
                    166: 
                    167: 
                    168: @protocol PowerService
                    169: 
                    170: - (void) registerForPowerInterrupts    :(pmCallback_func)buttonHandler
                    171:                                        :(id)caller;
                    172: 
                    173: @end
                    174: 
                    175: 
                    176: 
                    177: 
                    178: 
                    179: 
                    180: 
                    181: 
                    182: 
                    183: 
                    184: 
                    185: 
                    186: 
                    187: 
                    188: 

unix.superglobalmegacorp.com

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