1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<title>libacpi: libacpi.c File Reference</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
<link href="tabs.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.5.2 -->
<div class="tabs">
<ul>
<li><a href="index.html"><span>Main Page</span></a></li>
<li><a href="annotated.html"><span>Classes</span></a></li>
<li class="current"><a href="files.html"><span>Files</span></a></li>
</ul>
</div>
<div class="tabs">
<ul>
<li><a href="files.html"><span>File List</span></a></li>
<li><a href="globals.html"><span>File Members</span></a></li>
</ul>
</div>
<h1>libacpi.c File Reference</h1><code>#include <stdio.h></code><br>
<code>#include <stdlib.h></code><br>
<code>#include <unistd.h></code><br>
<code>#include <string.h></code><br>
<code>#include <dirent.h></code><br>
<code>#include <ctype.h></code><br>
<code>#include <stddef.h></code><br>
<code>#include "<a class="el" href="libacpi_8h-source.html">libacpi.h</a>"</code><br>
<code>#include "<a class="el" href="list_8h-source.html">list.h</a>"</code><br>
<p>
Include dependency graph for libacpi.c:<p><center><img src="libacpi_8c__incl.png" border="0" usemap="#libacpi.c_map" alt=""></center>
<map name="libacpi.c_map">
<area shape="rect" href="libacpi_8h.html" title="libacpi.h" alt="" coords="121,360,188,387"><area shape="rect" href="list_8h.html" title="list.h" alt="" coords="131,411,179,437"></map>
<p>
<a href="libacpi_8c-source.html">Go to the source code of this file.</a><table border="0" cellpadding="0" cellspacing="0">
<tr><td></td></tr>
<tr><td colspan="2"><br><h2>Classes</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">struct </td><td class="memItemRight" valign="bottom"><a class="el" href="structacpi__value__t.html">acpi_value_t</a></td></tr>
<tr><td colspan="2"><br><h2>Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="libacpi_8c.html#8954ea2d1a2dc9a7991132d1f4323c78">check_acpi_support</a> (void)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="libacpi_8c.html#b63d686528f867234559a0bd829f9a33">init_acpi_batt</a> (<a class="el" href="structglobal__t.html">global_t</a> *globals)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="libacpi_8c.html#baf0f122878f23b4cc8a5cb2dea8bf71">read_acpi_acstate</a> (<a class="el" href="structglobal__t.html">global_t</a> *globals)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="libacpi_8c.html#027286cd397157bdbf9e551ef510cb59">init_acpi_acadapt</a> (<a class="el" href="structglobal__t.html">global_t</a> *globals)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="libacpi_8c.html#f9608343ea3b2cbd693b009978e0d8c3">read_acpi_fan</a> (const int num)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="libacpi_8c.html#3ee17a37e660f31b7b7e5f2f0896851b">init_acpi_fan</a> (<a class="el" href="structglobal__t.html">global_t</a> *globals)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="libacpi_8c.html#b46f89c7d7ff338842d7619c7392c0bf">init_acpi_thermal</a> (<a class="el" href="structglobal__t.html">global_t</a> *globals)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="libacpi_8c.html#ca686b7af0b4935ece6342c6e020b586">read_acpi_zone</a> (const int num, <a class="el" href="structglobal__t.html">global_t</a> *globals)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="libacpi_8c.html#ed850c96630f208168a5408435f022d6">read_acpi_batt</a> (const int num)</td></tr>
</table>
<hr><h2>Function Documentation</h2>
<a class="anchor" name="8954ea2d1a2dc9a7991132d1f4323c78"></a><!-- doxytag: member="libacpi.c::check_acpi_support" ref="8954ea2d1a2dc9a7991132d1f4323c78" args="(void)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int check_acpi_support </td>
<td>(</td>
<td class="paramtype">void </td>
<td class="paramname"> </td>
<td> ) </td>
<td width="100%"></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Checks if the system does support ACPI or not <dl class="return" compact><dt><b>Returns:</b></dt><dd>SUCCESS if the system supports ACPI or, NOT_SUPPORTED </dd></dl>
<p>
Definition at line <a class="el" href="libacpi_8c-source.html#l00127">127</a> of file <a class="el" href="libacpi_8c-source.html">libacpi.c</a>.
<p>
References <a class="el" href="libacpi_8h-source.html#l00029">NOT_SUPPORTED</a>, and <a class="el" href="libacpi_8h-source.html#l00030">SUCCESS</a>.
</div>
</div><p>
<a class="anchor" name="027286cd397157bdbf9e551ef510cb59"></a><!-- doxytag: member="libacpi.c::init_acpi_acadapt" ref="027286cd397157bdbf9e551ef510cb59" args="(global_t *globals)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int init_acpi_acadapt </td>
<td>(</td>
<td class="paramtype"><a class="el" href="structglobal__t.html">global_t</a> * </td>
<td class="paramname"> <em>globals</em> </td>
<td> ) </td>
<td width="100%"></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Finds existing ac adapter and fills the adapt structure with the paths of the important to parse files <dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>globals</em> </td><td>pointer to global acpi structure </td></tr>
</table>
</dl>
<p>
Definition at line <a class="el" href="libacpi_8c-source.html#l00211">211</a> of file <a class="el" href="libacpi_8c-source.html">libacpi.c</a>.
<p>
References <a class="el" href="libacpi_8h-source.html#l00179">global_t::adapt</a>, <a class="el" href="libacpi_8h-source.html#l00028">ALLOC_ERR</a>, <a class="el" href="list_8c-source.html#l00046">delete_list()</a>, <a class="el" href="list_8c-source.html#l00061">dir_list()</a>, <a class="el" href="libacpi_8h-source.html#l00016">MAX_NAME</a>, <a class="el" href="libacpi_8h-source.html#l00165">adapter_t::name</a>, <a class="el" href="libacpi_8h-source.html#l00029">NOT_SUPPORTED</a>, <a class="el" href="libacpi_8h-source.html#l00014">PROC_ACPI</a>, <a class="el" href="libacpi_8c-source.html#l00190">read_acpi_acstate()</a>, <a class="el" href="libacpi_8h-source.html#l00166">adapter_t::state_file</a>, <a class="el" href="libacpi_8h-source.html#l00030">SUCCESS</a>, and <a class="el" href="list_8h-source.html#l00026">list_t::top</a>.
<p>
Here is the call graph for this function:<p><center><img src="libacpi_8c_027286cd397157bdbf9e551ef510cb59_cgraph.png" border="0" usemap="#libacpi_8c_027286cd397157bdbf9e551ef510cb59_cgraph_map" alt=""></center>
<map name="libacpi_8c_027286cd397157bdbf9e551ef510cb59_cgraph_map">
<area shape="rect" href="list_8c.html#8779934af9269ac85b5eda546da2285c" title="delete_list" alt="" coords="192,5,267,32"><area shape="rect" href="list_8c.html#ac821e6d16d9494f9b8ffc3f9cd0aec4" title="dir_list" alt="" coords="200,56,259,83"><area shape="rect" href="libacpi_8c.html#baf0f122878f23b4cc8a5cb2dea8bf71" title="read_acpi_acstate" alt="" coords="172,107,287,133"></map>
</div>
</div><p>
<a class="anchor" name="b63d686528f867234559a0bd829f9a33"></a><!-- doxytag: member="libacpi.c::init_acpi_batt" ref="b63d686528f867234559a0bd829f9a33" args="(global_t *globals)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int init_acpi_batt </td>
<td>(</td>
<td class="paramtype"><a class="el" href="structglobal__t.html">global_t</a> * </td>
<td class="paramname"> <em>globals</em> </td>
<td> ) </td>
<td width="100%"></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Finds existing batteries and fills the corresponding batteries structures with the paths of the important to parse files <dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>globals</em> </td><td>pointer to global acpi structure </td></tr>
</table>
</dl>
<p>
Definition at line <a class="el" href="libacpi_8c-source.html#l00139">139</a> of file <a class="el" href="libacpi_8c-source.html">libacpi.c</a>.
<p>
References <a class="el" href="libacpi_8h-source.html#l00120">battery_t::alarm_file</a>, <a class="el" href="libacpi_8h-source.html#l00028">ALLOC_ERR</a>, <a class="el" href="libacpi_8h-source.html#l00175">global_t::batt_count</a>, <a class="el" href="libacpi_8h-source.html#l00186">batteries</a>, <a class="el" href="list_8c-source.html#l00046">delete_list()</a>, <a class="el" href="list_8c-source.html#l00061">dir_list()</a>, <a class="el" href="libacpi_8h-source.html#l00119">battery_t::info_file</a>, <a class="el" href="libacpi_8h-source.html#l00025">ITEM_EXCEED</a>, <a class="el" href="libacpi_8h-source.html#l00018">MAX_ITEMS</a>, <a class="el" href="libacpi_8h-source.html#l00016">MAX_NAME</a>, <a class="el" href="libacpi_8h-source.html#l00117">battery_t::name</a>, <a class="el" href="libacpi_8h-source.html#l00029">NOT_SUPPORTED</a>, <a class="el" href="libacpi_8h-source.html#l00014">PROC_ACPI</a>, <a class="el" href="libacpi_8h-source.html#l00118">battery_t::state_file</a>, <a class="el" href="libacpi_8h-source.html#l00030">SUCCESS</a>, and <a class="el" href="list_8h-source.html#l00026">list_t::top</a>.
<p>
Here is the call graph for this function:<p><center><img src="libacpi_8c_b63d686528f867234559a0bd829f9a33_cgraph.png" border="0" usemap="#libacpi_8c_b63d686528f867234559a0bd829f9a33_cgraph_map" alt=""></center>
<map name="libacpi_8c_b63d686528f867234559a0bd829f9a33_cgraph_map">
<area shape="rect" href="list_8c.html#8779934af9269ac85b5eda546da2285c" title="delete_list" alt="" coords="151,5,225,32"><area shape="rect" href="list_8c.html#ac821e6d16d9494f9b8ffc3f9cd0aec4" title="dir_list" alt="" coords="159,56,217,83"></map>
</div>
</div><p>
<a class="anchor" name="3ee17a37e660f31b7b7e5f2f0896851b"></a><!-- doxytag: member="libacpi.c::init_acpi_fan" ref="3ee17a37e660f31b7b7e5f2f0896851b" args="(global_t *globals)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int init_acpi_fan </td>
<td>(</td>
<td class="paramtype"><a class="el" href="structglobal__t.html">global_t</a> * </td>
<td class="paramname"> <em>globals</em> </td>
<td> ) </td>
<td width="100%"></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Finds existing fans and fills corresponding fan structures with the paths of the important to parse files for fan information <dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>globals</em> </td><td>pointer to global acpi structure </td></tr>
</table>
</dl>
<p>
Definition at line <a class="el" href="libacpi_8c-source.html#l00264">264</a> of file <a class="el" href="libacpi_8c-source.html">libacpi.c</a>.
<p>
References <a class="el" href="libacpi_8h-source.html#l00028">ALLOC_ERR</a>, <a class="el" href="list_8c-source.html#l00046">delete_list()</a>, <a class="el" href="list_8c-source.html#l00061">dir_list()</a>, <a class="el" href="libacpi_8h-source.html#l00177">global_t::fan_count</a>, <a class="el" href="libacpi_8h-source.html#l00196">fans</a>, <a class="el" href="libacpi_8h-source.html#l00025">ITEM_EXCEED</a>, <a class="el" href="libacpi_8h-source.html#l00018">MAX_ITEMS</a>, <a class="el" href="libacpi_8h-source.html#l00016">MAX_NAME</a>, <a class="el" href="libacpi_8h-source.html#l00107">fan_t::name</a>, <a class="el" href="libacpi_8h-source.html#l00029">NOT_SUPPORTED</a>, <a class="el" href="libacpi_8h-source.html#l00014">PROC_ACPI</a>, <a class="el" href="libacpi_8h-source.html#l00108">fan_t::state_file</a>, <a class="el" href="libacpi_8h-source.html#l00030">SUCCESS</a>, and <a class="el" href="list_8h-source.html#l00026">list_t::top</a>.
<p>
Here is the call graph for this function:<p><center><img src="libacpi_8c_3ee17a37e660f31b7b7e5f2f0896851b_cgraph.png" border="0" usemap="#libacpi_8c_3ee17a37e660f31b7b7e5f2f0896851b_cgraph_map" alt=""></center>
<map name="libacpi_8c_3ee17a37e660f31b7b7e5f2f0896851b_cgraph_map">
<area shape="rect" href="list_8c.html#8779934af9269ac85b5eda546da2285c" title="delete_list" alt="" coords="148,5,223,32"><area shape="rect" href="list_8c.html#ac821e6d16d9494f9b8ffc3f9cd0aec4" title="dir_list" alt="" coords="156,56,215,83"></map>
</div>
</div><p>
<a class="anchor" name="b46f89c7d7ff338842d7619c7392c0bf"></a><!-- doxytag: member="libacpi.c::init_acpi_thermal" ref="b46f89c7d7ff338842d7619c7392c0bf" args="(global_t *globals)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int init_acpi_thermal </td>
<td>(</td>
<td class="paramtype"><a class="el" href="structglobal__t.html">global_t</a> * </td>
<td class="paramname"> <em>globals</em> </td>
<td> ) </td>
<td width="100%"></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Finds existing thermal zones and fills corresponding thermal structures with the paths of the important to parse files for thermal information <dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>globals</em> </td><td>pointer to global acpi structure </td></tr>
</table>
</dl>
<p>
Definition at line <a class="el" href="libacpi_8c-source.html#l00298">298</a> of file <a class="el" href="libacpi_8c-source.html">libacpi.c</a>.
<p>
References <a class="el" href="libacpi_8h-source.html#l00028">ALLOC_ERR</a>, <a class="el" href="libacpi_8h-source.html#l00152">thermal_t::cooling_file</a>, <a class="el" href="list_8c-source.html#l00046">delete_list()</a>, <a class="el" href="list_8c-source.html#l00061">dir_list()</a>, <a class="el" href="libacpi_8h-source.html#l00153">thermal_t::freq_file</a>, <a class="el" href="libacpi_8h-source.html#l00025">ITEM_EXCEED</a>, <a class="el" href="libacpi_8h-source.html#l00018">MAX_ITEMS</a>, <a class="el" href="libacpi_8h-source.html#l00016">MAX_NAME</a>, <a class="el" href="libacpi_8h-source.html#l00148">thermal_t::name</a>, <a class="el" href="libacpi_8h-source.html#l00029">NOT_SUPPORTED</a>, <a class="el" href="libacpi_8h-source.html#l00014">PROC_ACPI</a>, <a class="el" href="libacpi_8h-source.html#l00151">thermal_t::state_file</a>, <a class="el" href="libacpi_8h-source.html#l00030">SUCCESS</a>, <a class="el" href="libacpi_8h-source.html#l00155">thermal_t::temp_file</a>, <a class="el" href="libacpi_8h-source.html#l00176">global_t::thermal_count</a>, <a class="el" href="libacpi_8h-source.html#l00191">thermals</a>, <a class="el" href="list_8h-source.html#l00026">list_t::top</a>, and <a class="el" href="libacpi_8h-source.html#l00154">thermal_t::trips_file</a>.
<p>
Here is the call graph for this function:<p><center><img src="libacpi_8c_b46f89c7d7ff338842d7619c7392c0bf_cgraph.png" border="0" usemap="#libacpi_8c_b46f89c7d7ff338842d7619c7392c0bf_cgraph_map" alt=""></center>
<map name="libacpi_8c_b46f89c7d7ff338842d7619c7392c0bf_cgraph_map">
<area shape="rect" href="list_8c.html#8779934af9269ac85b5eda546da2285c" title="delete_list" alt="" coords="172,5,247,32"><area shape="rect" href="list_8c.html#ac821e6d16d9494f9b8ffc3f9cd0aec4" title="dir_list" alt="" coords="180,56,239,83"></map>
</div>
</div><p>
<a class="anchor" name="baf0f122878f23b4cc8a5cb2dea8bf71"></a><!-- doxytag: member="libacpi.c::read_acpi_acstate" ref="baf0f122878f23b4cc8a5cb2dea8bf71" args="(global_t *globals)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void read_acpi_acstate </td>
<td>(</td>
<td class="paramtype"><a class="el" href="structglobal__t.html">global_t</a> * </td>
<td class="paramname"> <em>globals</em> </td>
<td> ) </td>
<td width="100%"></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Looks up if the ac adapter is plugged in or not and sets the values in a struct <dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>globals</em> </td><td>pointer to the global acpi structure </td></tr>
</table>
</dl>
<p>
Definition at line <a class="el" href="libacpi_8c-source.html#l00190">190</a> of file <a class="el" href="libacpi_8c-source.html">libacpi.c</a>.
<p>
References <a class="el" href="libacpi_8h-source.html#l00167">adapter_t::ac_state</a>, <a class="el" href="libacpi_8h-source.html#l00179">global_t::adapt</a>, <a class="el" href="libacpi_8h-source.html#l00038">P_AC</a>, <a class="el" href="libacpi_8h-source.html#l00039">P_BATT</a>, <a class="el" href="libacpi_8h-source.html#l00040">P_ERR</a>, and <a class="el" href="libacpi_8h-source.html#l00166">adapter_t::state_file</a>.
<p>
Referenced by <a class="el" href="libacpi_8c-source.html#l00211">init_acpi_acadapt()</a>.
<p>
Here is the caller graph for this function:<p><center><img src="libacpi_8c_baf0f122878f23b4cc8a5cb2dea8bf71_icgraph.png" border="0" usemap="#libacpi_8c_baf0f122878f23b4cc8a5cb2dea8bf71_icgraph_map" alt=""></center>
<map name="libacpi_8c_baf0f122878f23b4cc8a5cb2dea8bf71_icgraph_map">
<area shape="rect" href="libacpi_8h.html#027286cd397157bdbf9e551ef510cb59" title="init_acpi_acadapt" alt="" coords="172,5,287,32"></map>
</div>
</div><p>
<a class="anchor" name="ed850c96630f208168a5408435f022d6"></a><!-- doxytag: member="libacpi.c::read_acpi_batt" ref="ed850c96630f208168a5408435f022d6" args="(const int num)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int read_acpi_batt </td>
<td>(</td>
<td class="paramtype">const int </td>
<td class="paramname"> <em>num</em> </td>
<td> ) </td>
<td width="100%"></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Gathers all information of a given battery and filling a struct with it <dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>num</em> </td><td>number of battery </td></tr>
</table>
</dl>
<p>
Definition at line <a class="el" href="libacpi_8c-source.html#l00608">608</a> of file <a class="el" href="libacpi_8c-source.html">libacpi.c</a>.
<p>
References <a class="el" href="libacpi_8h-source.html#l00025">ITEM_EXCEED</a>, <a class="el" href="libacpi_8h-source.html#l00018">MAX_ITEMS</a>, and <a class="el" href="libacpi_8h-source.html#l00030">SUCCESS</a>.
</div>
</div><p>
<a class="anchor" name="f9608343ea3b2cbd693b009978e0d8c3"></a><!-- doxytag: member="libacpi.c::read_acpi_fan" ref="f9608343ea3b2cbd693b009978e0d8c3" args="(const int num)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int read_acpi_fan </td>
<td>(</td>
<td class="paramtype">const int </td>
<td class="paramname"> <em>num</em> </td>
<td> ) </td>
<td width="100%"></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Gathers all information about given fan and sets the corresponding values in a struct <dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>num</em> </td><td>number for the fan to read </td></tr>
</table>
</dl>
<p>
Definition at line <a class="el" href="libacpi_8c-source.html#l00230">230</a> of file <a class="el" href="libacpi_8c-source.html">libacpi.c</a>.
<p>
References <a class="el" href="libacpi_8h-source.html#l00099">F_ERR</a>, <a class="el" href="libacpi_8h-source.html#l00098">F_OFF</a>, <a class="el" href="libacpi_8h-source.html#l00097">F_ON</a>, <a class="el" href="libacpi_8h-source.html#l00109">fan_t::fan_state</a>, <a class="el" href="libacpi_8h-source.html#l00196">fans</a>, <a class="el" href="libacpi_8h-source.html#l00025">ITEM_EXCEED</a>, <a class="el" href="libacpi_8h-source.html#l00018">MAX_ITEMS</a>, <a class="el" href="libacpi_8h-source.html#l00029">NOT_SUPPORTED</a>, <a class="el" href="libacpi_8h-source.html#l00108">fan_t::state_file</a>, and <a class="el" href="libacpi_8h-source.html#l00030">SUCCESS</a>.
</div>
</div><p>
<a class="anchor" name="ca686b7af0b4935ece6342c6e020b586"></a><!-- doxytag: member="libacpi.c::read_acpi_zone" ref="ca686b7af0b4935ece6342c6e020b586" args="(const int num, global_t *globals)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int read_acpi_zone </td>
<td>(</td>
<td class="paramtype">const int </td>
<td class="paramname"> <em>num</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="structglobal__t.html">global_t</a> * </td>
<td class="paramname"> <em>globals</em></td><td> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td width="100%"></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Gathers all information of a given thermal zone and sets the corresponding values in a struct <dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>num</em> </td><td>zone </td></tr>
<tr><td valign="top"></td><td valign="top"><em>globals</em> </td><td>pointer to global acpi struct, needed if there is just one zone </td></tr>
</table>
</dl>
<p>
Definition at line <a class="el" href="libacpi_8c-source.html#l00359">359</a> of file <a class="el" href="libacpi_8c-source.html">libacpi.c</a>.
<p>
References <a class="el" href="libacpi_8h-source.html#l00089">CO_ERR</a>, <a class="el" href="libacpi_8h-source.html#l00152">thermal_t::cooling_file</a>, <a class="el" href="libacpi_8h-source.html#l00026">DISABLED</a>, <a class="el" href="libacpi_8h-source.html#l00153">thermal_t::freq_file</a>, <a class="el" href="libacpi_8h-source.html#l00150">thermal_t::frequency</a>, <a class="el" href="libacpi_8h-source.html#l00025">ITEM_EXCEED</a>, <a class="el" href="libacpi_8h-source.html#l00018">MAX_ITEMS</a>, <a class="el" href="libacpi_8h-source.html#l00029">NOT_SUPPORTED</a>, <a class="el" href="libacpi_8h-source.html#l00151">thermal_t::state_file</a>, <a class="el" href="libacpi_8h-source.html#l00030">SUCCESS</a>, <a class="el" href="libacpi_8h-source.html#l00053">T_ERR</a>, <a class="el" href="libacpi_8h-source.html#l00155">thermal_t::temp_file</a>, <a class="el" href="libacpi_8h-source.html#l00149">thermal_t::temperature</a>, <a class="el" href="libacpi_8h-source.html#l00178">global_t::temperature</a>, <a class="el" href="libacpi_8h-source.html#l00156">thermal_t::therm_mode</a>, <a class="el" href="libacpi_8h-source.html#l00157">thermal_t::therm_state</a>, <a class="el" href="libacpi_8h-source.html#l00176">global_t::thermal_count</a>, and <a class="el" href="libacpi_8h-source.html#l00191">thermals</a>.
</div>
</div><p>
<hr size="1"><address style="text-align: right;"><small>Generated on Sun Jul 29 14:09:39 2007 for libacpi by
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.2 </small></address>
</body>
</html>
|