; ; File: Power.a ; ; Copyright: © 1991-1992 by Apple Computer, Inc., all rights reserved. ; ; Change History (most recent first): ; ; 7/7/92 CSS Changes rolled in from Reality. Renamed file from ; PowerEqu.a to Power.a per <7>. ; <7> 7/1/92 DCL This file is the replacement for the now obsolete PowerEqu.a. ; Changed the 'including' name to match the new file name. ; 5/17/92 kc Roll in changes from Horror. ; <6> 1/30/91 gbm sab, #38: Change the Ôalready including this fileÕ variable to ; all uppercase (for security reasons) ; <5> 1/22/91 MSH MSH: Removed Power Manager parameter block definition. Moved ; command equates to Power.a. ; <4> 1/22/91 ag MSH - Removed Power Manager parameter block definition. Moved ; command equates to Power.a. ; <3> 1/18/91 ag MSH - Removed private Power Manager equates so as not to have ; them published. Also added one additional equate. sleepRevoke. ; ; IF &TYPE('__INCLUDINGPOWER__') = 'UNDEFINED' THEN __INCLUDINGPOWER__ SET 1 ; Bit Positions for ModemByte modemOnBit EQU 0 ringWakeUpBit EQU 2 modemInstalledBit EQU 3 ringDetectBit EQU 4 modemOnHookBit EQU 5 ; masks for ModemByte modemOnMask EQU $1 ringWakeUpMask EQU $4 modemInstalledMask EQU $8 ringDetectMask EQU $10 modemOnHookMask EQU $20 ; bit positions for BatteryByte chargerConnBit EQU 0 hiChargeBit EQU 1 chargeOverFlowBit EQU 2 batteryDeadBit EQU 3 batteryLowBit EQU 4 connChangedBit EQU 5 ; masks for BatteryByte chargerConnMask EQU $1 hiChargeMask EQU $2 chargeOverFlowMask EQU $4 batteryDeadMask EQU $8 batteryLowMask EQU $10 connChangedMask EQU $20 ; sleep queue commands SleepRequest EQU 1 ; sleep request SleepDemand EQU 2 ; Sleep Demand SleepWakeUp EQU 3 ; wake up SleepUnlock EQU 4 ; sleep unlock SleepRevoke EQU 4 ; revoke sleep request ¥¥??¥¥ SleepDeny EQU 5 ; sleep not allowed SleepNow EQU 6 ; sleep now - low power ;SleepQRec - sleepQFlags noCalls EQU 1 ; no need to call noRequest EQU 2 ; no need to send sleep request SleepqRec RECORD 0,Increment ; Sleep Queue Element SleepqLink DS.L 1 ; qLink SleepqType DS.W 1 ; qType SleepqProc DS.L 1 ; procPtr SleepqFlags DS.W 1 ; flags SleepqSize EQU *-SleepqRec sleepQRecSize EQU * ; size of SleepQRec Record ENDR ; selectors for _IdleState trap getCPUSpeed EQU -1 enableIdle EQU 0 disableIdle EQU 1 ; macros for _IdleState trap MACRO _GetCPUSpeed move.l #getCPUSpeed,D0 DC.W $A485 ENDM MACRO _EnableIdle move.l #enableIdle,D0 DC.W $A485 ENDM MACRO _DisableIdle move.l #disableIdle,D0 DC.W $A485 ENDM ; selectors for _SerialPowerTrap aOn EQU $4 aOnIgnoreModem EQU $5 bOn EQU $0 aOff EQU $84 bOff EQU $80 ; macros for _SerialPowerTrap MACRO _AOn move.l #aOn,D0 DC.W $A685 ENDM MACRO _AOnIgnoreModem move.l #aOnIgnoreModem,D0 DC.W $A685 ENDM MACRO _BOn move.l #bOn,D0 DC.W $A685 ENDM MACRO _AOff move.l #aOff,D0 DC.W $A685 ENDM MACRO _BOff move.l #bOff,D0 DC.W $A685 ENDM ENDIF ; ...already included