📄 battery_8h.html
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"><title>BlueLab: battery.h File Reference</title><link href="doxygen.css" rel="stylesheet" type="text/css"></head><body><!-- Generated by Doxygen 1.3.8 --><div class="qindex"><a class="qindex" href="index.html">Main Page</a> | <a class="qindex" href="annotated.html">Data Structures</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="functions.html">Data Fields</a> | <a class="qindex" href="globals.html">Globals</a></div><h1>battery.h File Reference</h1>Take battery readings and return them in millivolts. <a href="#_details">More...</a><p><h2>Data Structures</h2><ul><li>struct <a class="el" href="struct_battery_state.html">BatteryState</a><dl class="el"><dd class="mdescRight">The internal state of each instance of the battery library. <a href="struct_battery_state.html#_details">More...</a><br></dl></ul><h2>Defines</h2><ul><li>#define <a class="el" href="battery_8h.html#a0">BATTERY_READING_MESSAGE</a> 0x6800</ul><h2>Enumerations</h2><ul><li>enum <a class="el" href="battery_8h.html#a8">battery_reading_source</a> { <br> <a class="el" href="battery_8h.html#a8a1">AIO0</a>, <br> <a class="el" href="battery_8h.html#a8a2">AIO1</a>, <br> <a class="el" href="battery_8h.html#a8a3">VDD</a>, <br> <a class="el" href="battery_8h.html#a8a4">AIO2</a>, <br> <a class="el" href="battery_8h.html#a8a5">AIO3</a>, <br> <a class="el" href="battery_8h.html#a8a6">BATTERY_INTERNAL</a><br> }<dl class="el"><dd class="mdescRight">The source from which we wish to take a battery reading. <a href="#a8">More...</a><br></dl></ul><h2>Functions</h2><ul><li>void <a class="el" href="battery_8h.html#a7">BatteryInit</a> (<a class="el" href="struct_battery_state.html">BatteryState</a> *state, <a class="el" href="struct_task_data.html">Task</a> client, <a class="el" href="battery_8h.html#a8">battery_reading_source</a> source, <a class="el" href="csrtypes_8h.html#a4">uint16</a> period)<dl class="el"><dd class="mdescRight">Initialise an instance of the battery library. <a href="#a7"></a><br></dl></ul><hr><a name="_details"></a><h2>Detailed Description</h2>Take battery readings and return them in millivolts. <p>Allows readings of the test pins and supply voltage to be taken, either once or at regular intervals. The readings are sent to a Task as messages.<hr><h2>Define Documentation</h2><a class="anchor" name="a0" doxytag="battery.h::BATTERY_READING_MESSAGE" ></a><p><table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> <tr> <td class="mdRow"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"> #define BATTERY_READING_MESSAGE 0x6800 </td> </tr> </table> </td> </tr></table><table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td><p> </td> </tr></table><hr><h2>Enumeration Type Documentation</h2><a class="anchor" name="a8" doxytag="battery.h::battery_reading_source" ></a><p><table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> <tr> <td class="mdRow"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"> enum <a class="el" href="battery_8h.html#a8">battery_reading_source</a> </td> </tr> </table> </td> </tr></table><table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td><p>The source from which we wish to take a battery reading. <p><dl compact><dt><b>Enumeration values: </b></dt><dd><table border=0 cellspacing=2 cellpadding=0><tr><td valign=top><em><a class="anchor" name="a8a1" doxytag="AIO0" ></a>AIO0</em> </td><td></td></tr><tr><td valign=top><em><a class="anchor" name="a8a2" doxytag="AIO1" ></a>AIO1</em> </td><td></td></tr><tr><td valign=top><em><a class="anchor" name="a8a3" doxytag="VDD" ></a>VDD</em> </td><td></td></tr><tr><td valign=top><em><a class="anchor" name="a8a4" doxytag="AIO2" ></a>AIO2</em> </td><td></td></tr><tr><td valign=top><em><a class="anchor" name="a8a5" doxytag="AIO3" ></a>AIO3</em> </td><td></td></tr><tr><td valign=top><em><a class="anchor" name="a8a6" doxytag="BATTERY_INTERNAL" ></a>BATTERY_INTERNAL</em> </td><td></td></tr></table></dl> </td> </tr></table><hr><h2>Function Documentation</h2><a class="anchor" name="a7" doxytag="battery.h::BatteryInit" ></a><p><table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> <tr> <td class="mdRow"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"> void BatteryInit </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top"><a class="el" href="struct_battery_state.html">BatteryState</a> * </td> <td class="mdname" nowrap> <em>state</em>, </td> </tr> <tr> <td class="md" nowrap align="right"></td> <td></td> <td class="md" nowrap><a class="el" href="struct_task_data.html">Task</a> </td> <td class="mdname" nowrap> <em>client</em>, </td> </tr> <tr> <td class="md" nowrap align="right"></td> <td></td> <td class="md" nowrap><a class="el" href="battery_8h.html#a8">battery_reading_source</a> </td> <td class="mdname" nowrap> <em>source</em>, </td> </tr> <tr> <td class="md" nowrap align="right"></td> <td></td> <td class="md" nowrap><a class="el" href="csrtypes_8h.html#a4">uint16</a> </td> <td class="mdname" nowrap> <em>period</em></td> </tr> <tr> <td></td> <td class="md">) </td> <td class="md" colspan="2"></td> </tr> </table> </td> </tr></table><table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td><p>Initialise an instance of the battery library. <p><dl compact><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td></td><td valign=top><em>state</em> </td><td>The state to be initialised.</td></tr> <tr><td></td><td valign=top><em>client</em> </td><td>The client task to which to deliver the readings.</td></tr> <tr><td></td><td valign=top><em>source</em> </td><td>The source from which the readings should be made.</td></tr> <tr><td></td><td valign=top><em>period</em> </td><td>The delay in milliseconds between the messages sent to the client.</td></tr> </table></dl>If the period passed is zero, then only one reading will be taken and sent. </td> </tr></table></body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -