<!-- Copyright (C) 2003 Red Hat, Inc. -->
|
<!-- Copyright (C) 2003 Red Hat, Inc. -->
|
<!-- This material may be distributed only subject to the terms -->
|
<!-- This material may be distributed only subject to the terms -->
|
<!-- and conditions set forth in the Open Publication License, v1.0 -->
|
<!-- and conditions set forth in the Open Publication License, v1.0 -->
|
<!-- or later (the latest version is presently available at -->
|
<!-- or later (the latest version is presently available at -->
|
<!-- http://www.opencontent.org/openpub/). -->
|
<!-- http://www.opencontent.org/openpub/). -->
|
<!-- Distribution of the work or derivative of the work in any -->
|
<!-- Distribution of the work or derivative of the work in any -->
|
<!-- standard (paper) book form is prohibited unless prior -->
|
<!-- standard (paper) book form is prohibited unless prior -->
|
<!-- permission is obtained from the copyright holder. -->
|
<!-- permission is obtained from the copyright holder. -->
|
<HTML
|
<HTML
|
><HEAD
|
><HEAD
|
><TITLE
|
><TITLE
|
>Power Management Information</TITLE
|
>Power Management Information</TITLE
|
><meta name="MSSmartTagsPreventParsing" content="TRUE">
|
><meta name="MSSmartTagsPreventParsing" content="TRUE">
|
<META
|
<META
|
NAME="GENERATOR"
|
NAME="GENERATOR"
|
CONTENT="Modular DocBook HTML Stylesheet Version 1.76b+
|
CONTENT="Modular DocBook HTML Stylesheet Version 1.76b+
|
"><LINK
|
"><LINK
|
REL="HOME"
|
REL="HOME"
|
TITLE="eCos Reference Manual"
|
TITLE="eCos Reference Manual"
|
HREF="ecos-ref.html"><LINK
|
HREF="ecos-ref.html"><LINK
|
REL="UP"
|
REL="UP"
|
TITLE="eCos Power Management Support"
|
TITLE="eCos Power Management Support"
|
HREF="services-power.html"><LINK
|
HREF="services-power.html"><LINK
|
REL="PREVIOUS"
|
REL="PREVIOUS"
|
TITLE="Introduction"
|
TITLE="Introduction"
|
HREF="power-intro.html"><LINK
|
HREF="power-intro.html"><LINK
|
REL="NEXT"
|
REL="NEXT"
|
TITLE="Changing Power Modes"
|
TITLE="Changing Power Modes"
|
HREF="power-change.html"></HEAD
|
HREF="power-change.html"></HEAD
|
><BODY
|
><BODY
|
CLASS="REFENTRY"
|
CLASS="REFENTRY"
|
BGCOLOR="#FFFFFF"
|
BGCOLOR="#FFFFFF"
|
TEXT="#000000"
|
TEXT="#000000"
|
LINK="#0000FF"
|
LINK="#0000FF"
|
VLINK="#840084"
|
VLINK="#840084"
|
ALINK="#0000FF"
|
ALINK="#0000FF"
|
><DIV
|
><DIV
|
CLASS="NAVHEADER"
|
CLASS="NAVHEADER"
|
><TABLE
|
><TABLE
|
SUMMARY="Header navigation table"
|
SUMMARY="Header navigation table"
|
WIDTH="100%"
|
WIDTH="100%"
|
BORDER="0"
|
BORDER="0"
|
CELLPADDING="0"
|
CELLPADDING="0"
|
CELLSPACING="0"
|
CELLSPACING="0"
|
><TR
|
><TR
|
><TH
|
><TH
|
COLSPAN="3"
|
COLSPAN="3"
|
ALIGN="center"
|
ALIGN="center"
|
>eCos Reference Manual</TH
|
>eCos Reference Manual</TH
|
></TR
|
></TR
|
><TR
|
><TR
|
><TD
|
><TD
|
WIDTH="10%"
|
WIDTH="10%"
|
ALIGN="left"
|
ALIGN="left"
|
VALIGN="bottom"
|
VALIGN="bottom"
|
><A
|
><A
|
HREF="power-intro.html"
|
HREF="power-intro.html"
|
ACCESSKEY="P"
|
ACCESSKEY="P"
|
>Prev</A
|
>Prev</A
|
></TD
|
></TD
|
><TD
|
><TD
|
WIDTH="80%"
|
WIDTH="80%"
|
ALIGN="center"
|
ALIGN="center"
|
VALIGN="bottom"
|
VALIGN="bottom"
|
></TD
|
></TD
|
><TD
|
><TD
|
WIDTH="10%"
|
WIDTH="10%"
|
ALIGN="right"
|
ALIGN="right"
|
VALIGN="bottom"
|
VALIGN="bottom"
|
><A
|
><A
|
HREF="power-change.html"
|
HREF="power-change.html"
|
ACCESSKEY="N"
|
ACCESSKEY="N"
|
>Next</A
|
>Next</A
|
></TD
|
></TD
|
></TR
|
></TR
|
></TABLE
|
></TABLE
|
><HR
|
><HR
|
ALIGN="LEFT"
|
ALIGN="LEFT"
|
WIDTH="100%"></DIV
|
WIDTH="100%"></DIV
|
><H1
|
><H1
|
><A
|
><A
|
NAME="POWER-INFO">Power Management Information</H1
|
NAME="POWER-INFO">Power Management Information</H1
|
><DIV
|
><DIV
|
CLASS="REFNAMEDIV"
|
CLASS="REFNAMEDIV"
|
><A
|
><A
|
NAME="AEN15678"
|
NAME="AEN15678"
|
></A
|
></A
|
><H2
|
><H2
|
>Name</H2
|
>Name</H2
|
>Obtaining Power Management Information -- finding out about the various power controllers in the system</DIV
|
>Obtaining Power Management Information -- finding out about the various power controllers in the system</DIV
|
><DIV
|
><DIV
|
CLASS="REFSYNOPSISDIV"
|
CLASS="REFSYNOPSISDIV"
|
><A
|
><A
|
NAME="AEN15681"><H2
|
NAME="AEN15681"><H2
|
>Synopsis</H2
|
>Synopsis</H2
|
><DIV
|
><DIV
|
CLASS="FUNCSYNOPSIS"
|
CLASS="FUNCSYNOPSIS"
|
><A
|
><A
|
NAME="AEN15682"><P
|
NAME="AEN15682"><P
|
></P
|
></P
|
><TABLE
|
><TABLE
|
BORDER="5"
|
BORDER="5"
|
BGCOLOR="#E0E0F0"
|
BGCOLOR="#E0E0F0"
|
WIDTH="70%"
|
WIDTH="70%"
|
><TR
|
><TR
|
><TD
|
><TD
|
><PRE
|
><PRE
|
CLASS="FUNCSYNOPSISINFO"
|
CLASS="FUNCSYNOPSISINFO"
|
>#include <cyg/power/power.h>
|
>#include <cyg/power/power.h>
|
|
|
extern PowerController __POWER__[], __POWER_END__;
|
extern PowerController __POWER__[], __POWER_END__;
|
extern PowerController power_controller_cpu;
|
extern PowerController power_controller_cpu;
|
extern cyg_handle_t power_thread_handle;</PRE
|
extern cyg_handle_t power_thread_handle;</PRE
|
></TD
|
></TD
|
></TR
|
></TR
|
></TABLE
|
></TABLE
|
><P
|
><P
|
><CODE
|
><CODE
|
><CODE
|
><CODE
|
CLASS="FUNCDEF"
|
CLASS="FUNCDEF"
|
> PowerMode power_get_mode
|
> PowerMode power_get_mode
|
</CODE
|
</CODE
|
>(void);</CODE
|
>(void);</CODE
|
></P
|
></P
|
><P
|
><P
|
><CODE
|
><CODE
|
><CODE
|
><CODE
|
CLASS="FUNCDEF"
|
CLASS="FUNCDEF"
|
> PowerMode power_get_desired_mode
|
> PowerMode power_get_desired_mode
|
</CODE
|
</CODE
|
>(void);</CODE
|
>(void);</CODE
|
></P
|
></P
|
><P
|
><P
|
><CODE
|
><CODE
|
><CODE
|
><CODE
|
CLASS="FUNCDEF"
|
CLASS="FUNCDEF"
|
> PowerMode power_get_controller_mode
|
> PowerMode power_get_controller_mode
|
</CODE
|
</CODE
|
>( PowerController* controller
|
>( PowerController* controller
|
);</CODE
|
);</CODE
|
></P
|
></P
|
><P
|
><P
|
><CODE
|
><CODE
|
><CODE
|
><CODE
|
CLASS="FUNCDEF"
|
CLASS="FUNCDEF"
|
> PowerMode power_get_controller_desired_mode
|
> PowerMode power_get_controller_desired_mode
|
</CODE
|
</CODE
|
>( PowerController* controller
|
>( PowerController* controller
|
);</CODE
|
);</CODE
|
></P
|
></P
|
><P
|
><P
|
><CODE
|
><CODE
|
><CODE
|
><CODE
|
CLASS="FUNCDEF"
|
CLASS="FUNCDEF"
|
> const char* power_get_controller_id
|
> const char* power_get_controller_id
|
</CODE
|
</CODE
|
>( PowerController* controller
|
>( PowerController* controller
|
);</CODE
|
);</CODE
|
></P
|
></P
|
><P
|
><P
|
></P
|
></P
|
></DIV
|
></DIV
|
></DIV
|
></DIV
|
><DIV
|
><DIV
|
CLASS="REFSECT1"
|
CLASS="REFSECT1"
|
><A
|
><A
|
NAME="POWER-INFO-ACCESS"
|
NAME="POWER-INFO-ACCESS"
|
></A
|
></A
|
><H2
|
><H2
|
>Accessing Power Controllers</H2
|
>Accessing Power Controllers</H2
|
><P
|
><P
|
>All the power controllers in a system are held in a table, filled in
|
>All the power controllers in a system are held in a table, filled in
|
at link-time. The symbols <TT
|
at link-time. The symbols <TT
|
CLASS="VARNAME"
|
CLASS="VARNAME"
|
>__POWER__</TT
|
>__POWER__</TT
|
> and
|
> and
|
<TT
|
<TT
|
CLASS="VARNAME"
|
CLASS="VARNAME"
|
>__POWER_END</TT
|
>__POWER_END</TT
|
> can be used to iterate through this
|
> can be used to iterate through this
|
table, for example:</P
|
table, for example:</P
|
><TABLE
|
><TABLE
|
BORDER="5"
|
BORDER="5"
|
BGCOLOR="#E0E0F0"
|
BGCOLOR="#E0E0F0"
|
WIDTH="70%"
|
WIDTH="70%"
|
><TR
|
><TR
|
><TD
|
><TD
|
><PRE
|
><PRE
|
CLASS="PROGRAMLISTING"
|
CLASS="PROGRAMLISTING"
|
>PowerController* controller;
|
>PowerController* controller;
|
for (controller = &(__POWER__[0]);
|
for (controller = &(__POWER__[0]);
|
controller != &(__POWER_END__);
|
controller != &(__POWER_END__);
|
controller++) {
|
controller++) {
|
|
|
…
|
…
|
}</PRE
|
}</PRE
|
></TD
|
></TD
|
></TR
|
></TR
|
></TABLE
|
></TABLE
|
><P
|
><P
|
>Each controller has an associated priority, controlling the order in
|
>Each controller has an associated priority, controlling the order in
|
which they appear in the table. Typically a software-only component
|
which they appear in the table. Typically a software-only component
|
such as a TCP/IP stack would use a small number for the priority, so
|
such as a TCP/IP stack would use a small number for the priority, so
|
that it appears near the start of the table, whereas a device driver
|
that it appears near the start of the table, whereas a device driver
|
would be nearer the back of the table. When switching to a
|
would be nearer the back of the table. When switching to a
|
lower-powered mode the power management package will iterate through
|
lower-powered mode the power management package will iterate through
|
this table from front to back, thus ensuring that for example the
|
this table from front to back, thus ensuring that for example the
|
TCP/IP stack gets a chance to shut down before the underlying ethernet
|
TCP/IP stack gets a chance to shut down before the underlying ethernet
|
or other hardware that the stack depends on. Similarly when switching
|
or other hardware that the stack depends on. Similarly when switching
|
to a higher-powered mode the power management package will iterate
|
to a higher-powered mode the power management package will iterate
|
through this table from back to front.</P
|
through this table from back to front.</P
|
><P
|
><P
|
>In most systems there will be one special controller,
|
>In most systems there will be one special controller,
|
<TT
|
<TT
|
CLASS="VARNAME"
|
CLASS="VARNAME"
|
>power_controller_cpu</TT
|
>power_controller_cpu</TT
|
>, which should be provided by
|
>, which should be provided by
|
one of the architectural, variant or platform HAL packages. This
|
one of the architectural, variant or platform HAL packages. This
|
controller will always be the last entry in the table. It is
|
controller will always be the last entry in the table. It is
|
responsible for the final power down operation when switching to
|
responsible for the final power down operation when switching to
|
<SPAN
|
<SPAN
|
CLASS="TYPE"
|
CLASS="TYPE"
|
>off</SPAN
|
>off</SPAN
|
> mode. Other packages such as device drivers may or
|
> mode. Other packages such as device drivers may or
|
may not declare variable identifiers for their power controllers,
|
may not declare variable identifiers for their power controllers,
|
allowing those controllers to be accessed by name as well as by their
|
allowing those controllers to be accessed by name as well as by their
|
entries in the global table.</P
|
entries in the global table.</P
|
></DIV
|
></DIV
|
><DIV
|
><DIV
|
CLASS="REFSECT1"
|
CLASS="REFSECT1"
|
><A
|
><A
|
NAME="POWER-INFO-GLOBAL"
|
NAME="POWER-INFO-GLOBAL"
|
></A
|
></A
|
><H2
|
><H2
|
>Global Power Modes</H2
|
>Global Power Modes</H2
|
><P
|
><P
|
>The function <TT
|
>The function <TT
|
CLASS="FUNCTION"
|
CLASS="FUNCTION"
|
>power_get_mode</TT
|
>power_get_mode</TT
|
> can be called at any
|
> can be called at any
|
time to determine the current power mode for the system as a whole.
|
time to determine the current power mode for the system as a whole.
|
The return value will be one of <TT
|
The return value will be one of <TT
|
CLASS="LITERAL"
|
CLASS="LITERAL"
|
>PowerMode_Active</TT
|
>PowerMode_Active</TT
|
>,
|
>,
|
<TT
|
<TT
|
CLASS="LITERAL"
|
CLASS="LITERAL"
|
>PowerMode_Idle</TT
|
>PowerMode_Idle</TT
|
>, <TT
|
>, <TT
|
CLASS="LITERAL"
|
CLASS="LITERAL"
|
>PowerMode_Sleep</TT
|
>PowerMode_Sleep</TT
|
>
|
>
|
or <TT
|
or <TT
|
CLASS="LITERAL"
|
CLASS="LITERAL"
|
>PowerMode_Off</TT
|
>PowerMode_Off</TT
|
>. In normal circumstances it is
|
>. In normal circumstances it is
|
unlikely that <TT
|
unlikely that <TT
|
CLASS="LITERAL"
|
CLASS="LITERAL"
|
>PowerMode_Off</TT
|
>PowerMode_Off</TT
|
> would be returned since
|
> would be returned since
|
that mode generally means that the cpu is no longer running.</P
|
that mode generally means that the cpu is no longer running.</P
|
><P
|
><P
|
>The function <TT
|
>The function <TT
|
CLASS="FUNCTION"
|
CLASS="FUNCTION"
|
>power_get_desired_mode</TT
|
>power_get_desired_mode</TT
|
> returns the
|
> returns the
|
power mode that the system should be running at. Most of the time this
|
power mode that the system should be running at. Most of the time this
|
will be the same value as returned by
|
will be the same value as returned by
|
<TT
|
<TT
|
CLASS="FUNCTION"
|
CLASS="FUNCTION"
|
>power_get_mode</TT
|
>power_get_mode</TT
|
>. However a different value may be
|
>. However a different value may be
|
returned when in the middle of changing power modes. For example, if
|
returned when in the middle of changing power modes. For example, if
|
the current thread runs at a higher priority than the power management
|
the current thread runs at a higher priority than the power management
|
thread then the latter may have been pre-empted in the middle of a
|
thread then the latter may have been pre-empted in the middle of a
|
mode change: <TT
|
mode change: <TT
|
CLASS="FUNCTION"
|
CLASS="FUNCTION"
|
>power_get_mode</TT
|
>power_get_mode</TT
|
> will return the mode
|
> will return the mode
|
the system was running at before the mode change started, and
|
the system was running at before the mode change started, and
|
<TT
|
<TT
|
CLASS="FUNCTION"
|
CLASS="FUNCTION"
|
>power_get_desired_mode</TT
|
>power_get_desired_mode</TT
|
> will return the mode the
|
> will return the mode the
|
system should end up in when the mode change completes, barring
|
system should end up in when the mode change completes, barring
|
further calls to <TT
|
further calls to <TT
|
CLASS="FUNCTION"
|
CLASS="FUNCTION"
|
>power_set_mode</TT
|
>power_set_mode</TT
|
>.</P
|
>.</P
|
></DIV
|
></DIV
|
><DIV
|
><DIV
|
CLASS="REFSECT1"
|
CLASS="REFSECT1"
|
><A
|
><A
|
NAME="POWER-INFO-INDIVIDUAL"
|
NAME="POWER-INFO-INDIVIDUAL"
|
></A
|
></A
|
><H2
|
><H2
|
>Individual Controller Power Modes</H2
|
>Individual Controller Power Modes</H2
|
><P
|
><P
|
>The power management package keeps track of the current and desired
|
>The power management package keeps track of the current and desired
|
modes for each power controller, as well as the modes for the system as
|
modes for each power controller, as well as the modes for the system as
|
a whole. The function <TT
|
a whole. The function <TT
|
CLASS="FUNCTION"
|
CLASS="FUNCTION"
|
>power_get_controller_mode</TT
|
>power_get_controller_mode</TT
|
>
|
>
|
takes a single argument, a pointer to a power controller, and returns
|
takes a single argument, a pointer to a power controller, and returns
|
the power mode that controller is currently running at. Similarly
|
the power mode that controller is currently running at. Similarly
|
<TT
|
<TT
|
CLASS="FUNCTION"
|
CLASS="FUNCTION"
|
>power_get_controller_desired_mode</TT
|
>power_get_controller_desired_mode</TT
|
> returns the
|
> returns the
|
power mode that controller should be running at. Most of the time the
|
power mode that controller should be running at. Most of the time the
|
current and desired modes for a given controller will be the same, and
|
current and desired modes for a given controller will be the same, and
|
will also be the same as the global power mode. However if the power
|
will also be the same as the global power mode. However if the power
|
management thread is preeempted in the middle of a mode change then
|
management thread is preeempted in the middle of a mode change then
|
some of the controllers will have been updated to the desired global
|
some of the controllers will have been updated to the desired global
|
mode, whereas others will still be at the old mode. The power
|
mode, whereas others will still be at the old mode. The power
|
management package also provides functionality for manipulating
|
management package also provides functionality for manipulating
|
<A
|
<A
|
HREF="power-change.html#POWER-CHANGE-CONTROLLER"
|
HREF="power-change.html#POWER-CHANGE-CONTROLLER"
|
>individual controllers</A
|
>individual controllers</A
|
>, and for <A
|
>, and for <A
|
HREF="power-attached.html"
|
HREF="power-attached.html"
|
>detaching</A
|
>detaching</A
|
> controllers from
|
> controllers from
|
global mode changes.</P
|
global mode changes.</P
|
></DIV
|
></DIV
|
><DIV
|
><DIV
|
CLASS="REFSECT1"
|
CLASS="REFSECT1"
|
><A
|
><A
|
NAME="POWER-INFO-IDS"
|
NAME="POWER-INFO-IDS"
|
></A
|
></A
|
><H2
|
><H2
|
>Power Controller Identification</H2
|
>Power Controller Identification</H2
|
><P
|
><P
|
>In some scenarios the power management package will run completely
|
>In some scenarios the power management package will run completely
|
automated, and there is no need to identify individual power
|
automated, and there is no need to identify individual power
|
controllers. Any form of identification such as a string
|
controllers. Any form of identification such as a string
|
description would serve no purpose, but would still consume memory in
|
description would serve no purpose, but would still consume memory in
|
the final system. In other scenarios it may be very desirable to
|
the final system. In other scenarios it may be very desirable to
|
provide some means of identification. For example, while still
|
provide some means of identification. For example, while still
|
debugging it may be useful to see a simple string when printing the
|
debugging it may be useful to see a simple string when printing the
|
contents of a power controller structure. Alternatively, if the
|
contents of a power controller structure. Alternatively, if the
|
application is expected to provide some sort of user interface that
|
application is expected to provide some sort of user interface that
|
gives control over which parts of the system are enabled or disabled,
|
gives control over which parts of the system are enabled or disabled,
|
a string identifier for each controller would be useful. To cope with
|
a string identifier for each controller would be useful. To cope with
|
these scenarios the power management package provides a configuration
|
these scenarios the power management package provides a configuration
|
option <TT
|
option <TT
|
CLASS="VARNAME"
|
CLASS="VARNAME"
|
>CYGIMP_POWER_PROVIDE_STRINGS</TT
|
>CYGIMP_POWER_PROVIDE_STRINGS</TT
|
>. When enabled,
|
>. When enabled,
|
each power controller will contain a pointer to a constant string
|
each power controller will contain a pointer to a constant string
|
which can be accessed via a function
|
which can be accessed via a function
|
<TT
|
<TT
|
CLASS="FUNCTION"
|
CLASS="FUNCTION"
|
>power_get_controller_id</TT
|
>power_get_controller_id</TT
|
>. When disabled the system
|
>. When disabled the system
|
will not contain these strings, and the function will not be provided.
|
will not contain these strings, and the function will not be provided.
|
The following code illustrates how to use this function.</P
|
The following code illustrates how to use this function.</P
|
><TABLE
|
><TABLE
|
BORDER="5"
|
BORDER="5"
|
BGCOLOR="#E0E0F0"
|
BGCOLOR="#E0E0F0"
|
WIDTH="70%"
|
WIDTH="70%"
|
><TR
|
><TR
|
><TD
|
><TD
|
><PRE
|
><PRE
|
CLASS="PROGRAMLISTING"
|
CLASS="PROGRAMLISTING"
|
>#include <stdio.h>
|
>#include <stdio.h>
|
#include <pkgconf/system.h>
|
#include <pkgconf/system.h>
|
#ifndef CYGPKG_POWER
|
#ifndef CYGPKG_POWER
|
# error The power management package is not present.
|
# error The power management package is not present.
|
#endif
|
#endif
|
#include <pkgconf/power.h>
|
#include <pkgconf/power.h>
|
#ifndef CYGIMP_POWER_PROVIDE_STRINGS
|
#ifndef CYGIMP_POWER_PROVIDE_STRINGS
|
# error Power controller identifiers are not available.
|
# error Power controller identifiers are not available.
|
#endif
|
#endif
|
#include <cyg/power/power.h>
|
#include <cyg/power/power.h>
|
|
|
static const char*
|
static const char*
|
mode_to_string(PowerMode mode)
|
mode_to_string(PowerMode mode)
|
{
|
{
|
const char* result;
|
const char* result;
|
switch(mode) {
|
switch(mode) {
|
case PowerMode_Active : result = "active"; break;
|
case PowerMode_Active : result = "active"; break;
|
case PowerMode_Idle : result = "idle"; break;
|
case PowerMode_Idle : result = "idle"; break;
|
case PowerMode_Sleep : result = "sleep"; break;
|
case PowerMode_Sleep : result = "sleep"; break;
|
case PowerMode_Off : result = "off"; break;
|
case PowerMode_Off : result = "off"; break;
|
default : result = "<unknown>"; break;
|
default : result = "<unknown>"; break;
|
}
|
}
|
return result;
|
return result;
|
}
|
}
|
|
|
int
|
int
|
main(int argc, char** argv)
|
main(int argc, char** argv)
|
{
|
{
|
PowerController* controller;
|
PowerController* controller;
|
|
|
for (controller = &(__POWER__[0]);
|
for (controller = &(__POWER__[0]);
|
controller != &(__POWER_END__);
|
controller != &(__POWER_END__);
|
controller++) {
|
controller++) {
|
printf("Controller @ %p: %s, %s\n", controller,
|
printf("Controller @ %p: %s, %s\n", controller,
|
power_get_controller_id(controller),
|
power_get_controller_id(controller),
|
mode_to_string(power_get_controller_mode(controller)));
|
mode_to_string(power_get_controller_mode(controller)));
|
}
|
}
|
return 0;
|
return 0;
|
}</PRE
|
}</PRE
|
></TD
|
></TD
|
></TR
|
></TR
|
></TABLE
|
></TABLE
|
></DIV
|
></DIV
|
><DIV
|
><DIV
|
CLASS="REFSECT1"
|
CLASS="REFSECT1"
|
><A
|
><A
|
NAME="POWER-INFO-THREAD"
|
NAME="POWER-INFO-THREAD"
|
></A
|
></A
|
><H2
|
><H2
|
>The Power Management Thread</H2
|
>The Power Management Thread</H2
|
><P
|
><P
|
>If the power management package is configured to use a separate thread
|
>If the power management package is configured to use a separate thread
|
then a handle for that thread is made available to higher-level code
|
then a handle for that thread is made available to higher-level code
|
via the variable <TT
|
via the variable <TT
|
CLASS="VARNAME"
|
CLASS="VARNAME"
|
>power_thread_handle</TT
|
>power_thread_handle</TT
|
>. This handle
|
>. This handle
|
can be used for a variety of purposes, including manipulating that
|
can be used for a variety of purposes, including manipulating that
|
thread's priority.</P
|
thread's priority.</P
|
></DIV
|
></DIV
|
><DIV
|
><DIV
|
CLASS="NAVFOOTER"
|
CLASS="NAVFOOTER"
|
><HR
|
><HR
|
ALIGN="LEFT"
|
ALIGN="LEFT"
|
WIDTH="100%"><TABLE
|
WIDTH="100%"><TABLE
|
SUMMARY="Footer navigation table"
|
SUMMARY="Footer navigation table"
|
WIDTH="100%"
|
WIDTH="100%"
|
BORDER="0"
|
BORDER="0"
|
CELLPADDING="0"
|
CELLPADDING="0"
|
CELLSPACING="0"
|
CELLSPACING="0"
|
><TR
|
><TR
|
><TD
|
><TD
|
WIDTH="33%"
|
WIDTH="33%"
|
ALIGN="left"
|
ALIGN="left"
|
VALIGN="top"
|
VALIGN="top"
|
><A
|
><A
|
HREF="power-intro.html"
|
HREF="power-intro.html"
|
ACCESSKEY="P"
|
ACCESSKEY="P"
|
>Prev</A
|
>Prev</A
|
></TD
|
></TD
|
><TD
|
><TD
|
WIDTH="34%"
|
WIDTH="34%"
|
ALIGN="center"
|
ALIGN="center"
|
VALIGN="top"
|
VALIGN="top"
|
><A
|
><A
|
HREF="ecos-ref.html"
|
HREF="ecos-ref.html"
|
ACCESSKEY="H"
|
ACCESSKEY="H"
|
>Home</A
|
>Home</A
|
></TD
|
></TD
|
><TD
|
><TD
|
WIDTH="33%"
|
WIDTH="33%"
|
ALIGN="right"
|
ALIGN="right"
|
VALIGN="top"
|
VALIGN="top"
|
><A
|
><A
|
HREF="power-change.html"
|
HREF="power-change.html"
|
ACCESSKEY="N"
|
ACCESSKEY="N"
|
>Next</A
|
>Next</A
|
></TD
|
></TD
|
></TR
|
></TR
|
><TR
|
><TR
|
><TD
|
><TD
|
WIDTH="33%"
|
WIDTH="33%"
|
ALIGN="left"
|
ALIGN="left"
|
VALIGN="top"
|
VALIGN="top"
|
>Introduction</TD
|
>Introduction</TD
|
><TD
|
><TD
|
WIDTH="34%"
|
WIDTH="34%"
|
ALIGN="center"
|
ALIGN="center"
|
VALIGN="top"
|
VALIGN="top"
|
><A
|
><A
|
HREF="services-power.html"
|
HREF="services-power.html"
|
ACCESSKEY="U"
|
ACCESSKEY="U"
|
>Up</A
|
>Up</A
|
></TD
|
></TD
|
><TD
|
><TD
|
WIDTH="33%"
|
WIDTH="33%"
|
ALIGN="right"
|
ALIGN="right"
|
VALIGN="top"
|
VALIGN="top"
|
>Changing Power Modes</TD
|
>Changing Power Modes</TD
|
></TR
|
></TR
|
></TABLE
|
></TABLE
|
></DIV
|
></DIV
|
></BODY
|
></BODY
|
></HTML
|
></HTML
|
|
|