1 <!-- Copyright (C) 2003 Red Hat, Inc. -->
2 <!-- This material may be distributed only subject to the terms -->
3 <!-- and conditions set forth in the Open Publication License, v1.0 -->
4 <!-- or later (the latest version is presently available at -->
5 <!-- http://www.opencontent.org/openpub/). -->
6 <!-- Distribution of the work or derivative of the work in any -->
7 <!-- standard (paper) book form is prohibited unless prior -->
8 <!-- permission is obtained from the copyright holder. -->
12 >Attached and Detached Controllers</TITLE
13 ><meta name="MSSmartTagsPreventParsing" content="TRUE">
16 CONTENT="Modular DocBook HTML Stylesheet Version 1.76b+
19 TITLE="eCos Reference Manual"
20 HREF="ecos-ref.html"><LINK
22 TITLE="eCos Power Management Support"
23 HREF="services-power.html"><LINK
25 TITLE="Support for Policy Modules"
26 HREF="power-policy.html"><LINK
28 TITLE="Implementing a Power Controller"
29 HREF="power-controller.html"></HEAD
40 SUMMARY="Header navigation table"
49 >eCos Reference Manual</TH
57 HREF="power-policy.html"
71 HREF="power-controller.html"
82 NAME="POWER-ATTACHED">Attached and Detached Controllers</H1
90 >Attached and Detached Controllers -- control which power controllers are affected by global changes</DIV
92 CLASS="REFSYNOPSISDIV"
108 CLASS="FUNCSYNOPSISINFO"
109 >#include <cyg/power/power.h></PRE
117 > cyg_bool power_get_controller_attached
119 >( PowerController* controller
126 > void power_set_controller_attached
128 >( PowerController* controller
142 >Detaching Power Controllers</H2
144 >By default the global operation <TT
148 affects all power controllers. There may be circumstances when this is
149 not desirable. For example if a particular device is not currently
150 being used then it can be left switched off: the rest of the system
151 could be moving between <SPAN
161 > modes, but there is no point in invoking the power
162 controller for the unused device. To support this the power management
163 package supports the concept of attached and detached controllers. By
164 default all controllers are attached, and hence will be affected by
165 global mode changes. A specific controller can be detached using the
168 >power_set_controller_attached</TT
170 function takes two arguments, one to specify a particular controller
171 and another to specify the desired new state.
174 >power_get_controller_attached</TT
176 determine whether or not a specific controller is currently attached.</P
178 >The attached or detached state of a controller only affects what
179 happens during a global mode change, in other words following a call
183 >. It is still possible to
184 manipulate a detached controller using
187 >power_set_controller_mode</TT
191 >power_set_controller_mode_now</TT
199 SUMMARY="Footer navigation table"
210 HREF="power-policy.html"
228 HREF="power-controller.html"
238 >Support for Policy Modules</TD
244 HREF="services-power.html"
252 >Implementing a Power Controller</TD