System Features
EPM-15 Reference Manual
26
SetSystemPowerState Function
The “Power Management Reference” in the MSDN Library
(
http://msdn.microsoft.com/library/default.asp
) contains complete information on the API
available for power control under Windows. The “Power Management Functions” section
provides complete information on the use of the API.
The function used to set the system power state is SetSystemPowerState. This function suspends
the system by shutting power down. Depending on the
ForceFlag
parameter, the function either
suspends operation immediately or requests permission from all applications and device drivers
before doing so.
BOOL SetSystemPowerState(
BOOL
fSuspend
,
BOOL
fForce
);
Parameters:
fSuspend
[in] If this parameter is TRUE, the system is suspended. If the parameter is FALSE, the
system hibernates. This parameter is ignored in Windows Me/98/95.
fForce
[in] If this parameter is TRUE, the function broadcasts a PBT_APMSUSPEND event to
each application and driver, then immediately suspends operation. If the parameter is
FALSE, the function broadcasts a PBT_APMQUERYSUSPEND event to each
application to request permission to suspend operation.
W
AKEUP
Wakeup is accomplished by grounding pin 39 to pin 40 on connector J8 or via pushbutton (or
relay attached to the pushbutton interface). A pushbutton or relay can be attached to connector J2
on the CBR-5010 utility board. Pin 3 is ground, and pin 4 is the pushbutton input. This circuit on
the EPM-15 motherboard has a 10k pull-up resistor.