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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [rtos/] [ecos-2.0/] [doc/] [html/] [ref/] [power-attached.html] - Blame information for rev 588

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

Line No. Rev Author Line
1 28 unneback
<!-- 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.               -->
9
<HTML
10
><HEAD
11
><TITLE
12
>Attached and Detached Controllers</TITLE
13
><meta name="MSSmartTagsPreventParsing" content="TRUE">
14
<META
15
NAME="GENERATOR"
16
CONTENT="Modular DocBook HTML Stylesheet Version 1.76b+
17
"><LINK
18
REL="HOME"
19
TITLE="eCos Reference Manual"
20
HREF="ecos-ref.html"><LINK
21
REL="UP"
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
SUMMARY="Header navigation table"
41
WIDTH="100%"
42
BORDER="0"
43
CELLPADDING="0"
44
CELLSPACING="0"
45
><TR
46
><TH
47
COLSPAN="3"
48
ALIGN="center"
49
>eCos Reference Manual</TH
50
></TR
51
><TR
52
><TD
53
WIDTH="10%"
54
ALIGN="left"
55
VALIGN="bottom"
56
><A
57
HREF="power-policy.html"
58
ACCESSKEY="P"
59
>Prev</A
60
></TD
61
><TD
62
WIDTH="80%"
63
ALIGN="center"
64
VALIGN="bottom"
65
></TD
66
><TD
67
WIDTH="10%"
68
ALIGN="right"
69
VALIGN="bottom"
70
><A
71
HREF="power-controller.html"
72
ACCESSKEY="N"
73
>Next</A
74
></TD
75
></TR
76
></TABLE
77
><HR
78
ALIGN="LEFT"
79
WIDTH="100%"></DIV
80
><H1
81
><A
82
NAME="POWER-ATTACHED">Attached and Detached Controllers</H1
83
><DIV
84
CLASS="REFNAMEDIV"
85
><A
86
NAME="AEN15902"
87
></A
88
><H2
89
>Name</H2
90
>Attached and Detached Controllers&nbsp;--&nbsp;control which power controllers are affected by global changes</DIV
91
><DIV
92
CLASS="REFSYNOPSISDIV"
93
><A
94
NAME="AEN15905"><H2
95
>Synopsis</H2
96
><DIV
97
CLASS="FUNCSYNOPSIS"
98
><A
99
NAME="AEN15906"><P
100
></P
101
><TABLE
102
BORDER="5"
103
BGCOLOR="#E0E0F0"
104
WIDTH="70%"
105
><TR
106
><TD
107
><PRE
108
CLASS="FUNCSYNOPSISINFO"
109
>#include &lt;cyg/power/power.h&gt;</PRE
110
></TD
111
></TR
112
></TABLE
113
><P
114
><CODE
115
><CODE
116
CLASS="FUNCDEF"
117
>    cyg_bool power_get_controller_attached
118
  </CODE
119
>(    PowerController* controller
120
  );</CODE
121
></P
122
><P
123
><CODE
124
><CODE
125
CLASS="FUNCDEF"
126
>    void power_set_controller_attached
127
  </CODE
128
>(    PowerController* controller
129
  ,     cyg_bool new_state
130
  );</CODE
131
></P
132
><P
133
></P
134
></DIV
135
></DIV
136
><DIV
137
CLASS="REFSECT1"
138
><A
139
NAME="AEN15920"
140
></A
141
><H2
142
>Detaching Power Controllers</H2
143
><P
144
>By default the global operation <TT
145
CLASS="FUNCTION"
146
>power_set_mode</TT
147
>
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
152
CLASS="TYPE"
153
>active</SPAN
154
>, <SPAN
155
CLASS="TYPE"
156
>idle</SPAN
157
> and
158
<SPAN
159
CLASS="TYPE"
160
>sleep</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
166
function <TT
167
CLASS="FUNCTION"
168
>power_set_controller_attached</TT
169
>. This
170
function takes two arguments, one to specify a particular controller
171
and another to specify the desired new state.
172
<TT
173
CLASS="FUNCTION"
174
>power_get_controller_attached</TT
175
> can be used to
176
determine whether or not a specific controller is currently attached.</P
177
><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
180
to <TT
181
CLASS="FUNCTION"
182
>power_set_mode</TT
183
>. It is still possible to
184
manipulate a detached controller using
185
<TT
186
CLASS="FUNCTION"
187
>power_set_controller_mode</TT
188
> or
189
<TT
190
CLASS="FUNCTION"
191
>power_set_controller_mode_now</TT
192
>.</P
193
></DIV
194
><DIV
195
CLASS="NAVFOOTER"
196
><HR
197
ALIGN="LEFT"
198
WIDTH="100%"><TABLE
199
SUMMARY="Footer navigation table"
200
WIDTH="100%"
201
BORDER="0"
202
CELLPADDING="0"
203
CELLSPACING="0"
204
><TR
205
><TD
206
WIDTH="33%"
207
ALIGN="left"
208
VALIGN="top"
209
><A
210
HREF="power-policy.html"
211
ACCESSKEY="P"
212
>Prev</A
213
></TD
214
><TD
215
WIDTH="34%"
216
ALIGN="center"
217
VALIGN="top"
218
><A
219
HREF="ecos-ref.html"
220
ACCESSKEY="H"
221
>Home</A
222
></TD
223
><TD
224
WIDTH="33%"
225
ALIGN="right"
226
VALIGN="top"
227
><A
228
HREF="power-controller.html"
229
ACCESSKEY="N"
230
>Next</A
231
></TD
232
></TR
233
><TR
234
><TD
235
WIDTH="33%"
236
ALIGN="left"
237
VALIGN="top"
238
>Support for Policy Modules</TD
239
><TD
240
WIDTH="34%"
241
ALIGN="center"
242
VALIGN="top"
243
><A
244
HREF="services-power.html"
245
ACCESSKEY="U"
246
>Up</A
247
></TD
248
><TD
249
WIDTH="33%"
250
ALIGN="right"
251
VALIGN="top"
252
>Implementing a Power Controller</TD
253
></TR
254
></TABLE
255
></DIV
256
></BODY
257
></HTML
258
>

powered by: WebSVN 2.1.0

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