OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [rtos/] [ecos-2.0/] [packages/] [services/] [power/] [common/] [v2_0/] [doc/] [power-attached.html] - Blame information for rev 631

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 27 unneback
<!-- Copyright (C) 2001 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 substantively modified versions of this         -->
7
<!-- document is prohibited without the explicit permission of the   -->
8
<!-- copyright holder.                                               -->
9
<!-- Distribution of the work or derivative of the work in any       -->
10
<!-- standard (paper) book form is prohibited unless prior           -->
11
<!-- permission is obtained from the copyright holder.               -->
12
<HTML
13
><HEAD
14
><TITLE
15
>Attached and Detached Controllers</TITLE
16
><meta name="MSSmartTagsPreventParsing" content="TRUE">
17
<META
18
NAME="GENERATOR"
19
CONTENT="Modular DocBook HTML Stylesheet Version 1.64
20
"><LINK
21
REL="HOME"
22
TITLE="eCos Power Management Support"
23
HREF="services-power.html"><LINK
24
REL="PREVIOUS"
25
TITLE="Support for Policy Modules"
26
HREF="power-policy.html"><LINK
27
REL="NEXT"
28
TITLE="Implementing a Power Controller"
29
HREF="power-controller.html"></HEAD
30
><BODY
31
CLASS="REFENTRY"
32
BGCOLOR="#FFFFFF"
33
TEXT="#000000"
34
LINK="#0000FF"
35
VLINK="#840084"
36
ALINK="#0000FF"
37
><DIV
38
CLASS="NAVHEADER"
39
><TABLE
40
WIDTH="100%"
41
BORDER="0"
42
CELLPADDING="0"
43
CELLSPACING="0"
44
><TR
45
><TH
46
COLSPAN="3"
47
ALIGN="center"
48
>eCos Power Management Support</TH
49
></TR
50
><TR
51
><TD
52
WIDTH="10%"
53
ALIGN="left"
54
VALIGN="bottom"
55
><A
56
HREF="power-policy.html"
57
>Prev</A
58
></TD
59
><TD
60
WIDTH="80%"
61
ALIGN="center"
62
VALIGN="bottom"
63
></TD
64
><TD
65
WIDTH="10%"
66
ALIGN="right"
67
VALIGN="bottom"
68
><A
69
HREF="power-controller.html"
70
>Next</A
71
></TD
72
></TR
73
></TABLE
74
><HR
75
ALIGN="LEFT"
76
WIDTH="100%"></DIV
77
><H1
78
><A
79
NAME="POWER-ATTACHED"
80
>Attached and Detached Controllers</A
81
></H1
82
><DIV
83
CLASS="REFNAMEDIV"
84
><A
85
NAME="AEN321"
86
></A
87
><H2
88
>Name</H2
89
>Attached and Detached Controllers&nbsp;--&nbsp;control which power controllers are affected by global changes</DIV
90
><DIV
91
CLASS="REFSYNOPSISDIV"
92
><A
93
NAME="AEN324"
94
></A
95
><H2
96
>Synopsis</H2
97
><DIV
98
CLASS="FUNCSYNOPSIS"
99
><A
100
NAME="AEN325"
101
></A
102
><P
103
></P
104
><TABLE
105
BORDER="0"
106
BGCOLOR="#E0E0E0"
107
WIDTH="100%"
108
><TR
109
><TD
110
><PRE
111
CLASS="FUNCSYNOPSISINFO"
112
>#include &lt;cyg/power/power.h&gt;</PRE
113
></TD
114
></TR
115
></TABLE
116
><P
117
><CODE
118
><CODE
119
CLASS="FUNCDEF"
120
>    cyg_bool power_get_controller_attached
121
  </CODE
122
>(    PowerController* controller
123
  );</CODE
124
></P
125
><P
126
><CODE
127
><CODE
128
CLASS="FUNCDEF"
129
>    void power_set_controller_attached
130
  </CODE
131
>(    PowerController* controller
132
  ,     cyg_bool new_state
133
  );</CODE
134
></P
135
><P
136
></P
137
></DIV
138
></DIV
139
><DIV
140
CLASS="REFSECT1"
141
><A
142
NAME="AEN339"
143
></A
144
><H2
145
>Detaching Power Controllers</H2
146
><P
147
>By default the global operation <TT
148
CLASS="FUNCTION"
149
>power_set_mode</TT
150
>
151
affects all power controllers. There may be circumstances when this is
152
not desirable. For example if a particular device is not currently
153
being used then it can be left switched off: the rest of the system
154
could be moving between <SPAN
155
CLASS="TYPE"
156
>active</SPAN
157
>, <SPAN
158
CLASS="TYPE"
159
>idle</SPAN
160
> and
161
<SPAN
162
CLASS="TYPE"
163
>sleep</SPAN
164
> modes, but there is no point in invoking the power
165
controller for the unused device. To support this the power management
166
package supports the concept of attached and detached controllers. By
167
default all controllers are attached, and hence will be affected by
168
global mode changes. A specific controller can be detached using the
169
function <TT
170
CLASS="FUNCTION"
171
>power_set_controller_attached</TT
172
>. This
173
function takes two arguments, one to specify a particular controller
174
and another to specify the desired new state.
175
<TT
176
CLASS="FUNCTION"
177
>power_get_controller_attached</TT
178
> can be used to
179
determine whether or not a specific controller is currently attached.</P
180
><P
181
>The attached or detached state of a controller only affects what
182
happens during a global mode change, in other words following a call
183
to <TT
184
CLASS="FUNCTION"
185
>power_set_mode</TT
186
>. It is still possible to
187
manipulate a detached controller using
188
<TT
189
CLASS="FUNCTION"
190
>power_set_controller_mode</TT
191
> or
192
<TT
193
CLASS="FUNCTION"
194
>power_set_controller_mode_now</TT
195
>.</P
196
></DIV
197
><DIV
198
CLASS="NAVFOOTER"
199
><HR
200
ALIGN="LEFT"
201
WIDTH="100%"><TABLE
202
WIDTH="100%"
203
BORDER="0"
204
CELLPADDING="0"
205
CELLSPACING="0"
206
><TR
207
><TD
208
WIDTH="33%"
209
ALIGN="left"
210
VALIGN="top"
211
><A
212
HREF="power-policy.html"
213
>Prev</A
214
></TD
215
><TD
216
WIDTH="34%"
217
ALIGN="center"
218
VALIGN="top"
219
><A
220
HREF="services-power.html"
221
>Home</A
222
></TD
223
><TD
224
WIDTH="33%"
225
ALIGN="right"
226
VALIGN="top"
227
><A
228
HREF="power-controller.html"
229
>Next</A
230
></TD
231
></TR
232
><TR
233
><TD
234
WIDTH="33%"
235
ALIGN="left"
236
VALIGN="top"
237
>Support for Policy Modules</TD
238
><TD
239
WIDTH="34%"
240
ALIGN="center"
241
VALIGN="top"
242
>&nbsp;</TD
243
><TD
244
WIDTH="33%"
245
ALIGN="right"
246
VALIGN="top"
247
>Implementing a Power Controller</TD
248
></TR
249
></TABLE
250
></DIV
251
></BODY
252
></HTML
253
>

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.