⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 charger_8h.html

📁 BlueLab3 bluetooth API 说明文档
💻 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: charger.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&nbsp;Page</a> | <a class="qindex" href="annotated.html">Data&nbsp;Structures</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Data&nbsp;Fields</a> | <a class="qindex" href="globals.html">Globals</a></div><h1>charger.h File Reference</h1>Access to the charger hardware. <a href="#_details">More...</a><p><h2>Functions</h2><ul><li><a class="el" href="charger__if_8h.html#a25">charger_status</a> <a class="el" href="charger_8h.html#a0">ChargerStatus</a> (void)<dl class="el"><dd class="mdescRight">Get the status of the charging hardware.  <a href="#a0"></a><br></dl><li><a class="el" href="csrtypes_8h.html#a9">bool</a> <a class="el" href="charger_8h.html#a1">ChargerEnable</a> (<a class="el" href="csrtypes_8h.html#a9">bool</a> enabled)<dl class="el"><dd class="mdescRight">Enable or disable the charging hardware.  <a href="#a1"></a><br></dl><li><a class="el" href="csrtypes_8h.html#a9">bool</a> <a class="el" href="charger_8h.html#a2">ChargerSupressLed0</a> (<a class="el" href="csrtypes_8h.html#a9">bool</a> supress)<dl class="el"><dd class="mdescRight">Force LED0 to be disabled when charging.  <a href="#a2"></a><br></dl><li><a class="el" href="csrtypes_8h.html#a9">bool</a> <a class="el" href="charger_8h.html#a3">ChargerSetCurrent</a> (<a class="el" href="charger__if_8h.html#a26">charger_current</a> current)<dl class="el"><dd class="mdescRight">Set the charger current in mA.  <a href="#a3"></a><br></dl><li><a class="el" href="csrtypes_8h.html#a4">uint16</a> <a class="el" href="charger_8h.html#a4">ChargerDebounce</a> (<a class="el" href="csrtypes_8h.html#a4">uint16</a> events_to_enable, <a class="el" href="csrtypes_8h.html#a4">uint16</a> count, <a class="el" href="csrtypes_8h.html#a4">uint16</a> period)<dl class="el"><dd class="mdescRight">Enables charger events and configures their debouncing.  <a href="#a4"></a><br></dl></ul><hr><a name="_details"></a><h2>Detailed Description</h2>Access to the charger hardware. <p>Certain BlueCore variants have on chip charger hardware.<hr><h2>Function Documentation</h2><a class="anchor" name="a0" doxytag="charger.h::ChargerStatus" ></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"> <a class="el" href="charger__if_8h.html#a25">charger_status</a> ChargerStatus           </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="md" nowrap valign="top">void&nbsp;</td>          <td class="mdname1" valign="top" nowrap>          </td>          <td class="md" valign="top">&nbsp;)&nbsp;</td>          <td class="md" nowrap></td>        </tr>      </table>    </td>  </tr></table><table cellspacing=5 cellpadding=0 border=0>  <tr>    <td>      &nbsp;    </td>    <td><p>Get the status of the charging hardware. <p>BC3-audio can only tell us if we are charging or not. Other BlueCore variants can provide more detailed charging status information.<p>This is only supported on BlueCore variants with charger hardware.     </td>  </tr></table><a class="anchor" name="a1" doxytag="charger.h::ChargerEnable" ></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"> <a class="el" href="csrtypes_8h.html#a9">bool</a> ChargerEnable           </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="md" nowrap valign="top"><a class="el" href="csrtypes_8h.html#a9">bool</a>&nbsp;</td>          <td class="mdname1" valign="top" nowrap> <em>enabled</em>          </td>          <td class="md" valign="top">&nbsp;)&nbsp;</td>          <td class="md" nowrap></td>        </tr>      </table>    </td>  </tr></table><table cellspacing=5 cellpadding=0 border=0>  <tr>    <td>      &nbsp;    </td>    <td><p>Enable or disable the charging hardware. <p><dl compact><dt><b>Parameters:</b></dt><dd>  <table border="0" cellspacing="2" cellpadding="0">    <tr><td></td><td valign=top><em>Enable(TRUE)</em>&nbsp;</td><td>or Disable(FALSE);</td></tr>  </table></dl>Returns the previously set value. Hardware defaults to having the charger enabled.<p>This is only supported on BlueCore variants with charger hardware (excluding BC3-audio).     </td>  </tr></table><a class="anchor" name="a2" doxytag="charger.h::ChargerSupressLed0" ></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"> <a class="el" href="csrtypes_8h.html#a9">bool</a> ChargerSupressLed0           </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="md" nowrap valign="top"><a class="el" href="csrtypes_8h.html#a9">bool</a>&nbsp;</td>          <td class="mdname1" valign="top" nowrap> <em>supress</em>          </td>          <td class="md" valign="top">&nbsp;)&nbsp;</td>          <td class="md" nowrap></td>        </tr>      </table>    </td>  </tr></table><table cellspacing=5 cellpadding=0 border=0>  <tr>    <td>      &nbsp;    </td>    <td><p>Force LED0 to be disabled when charging. <p><dl compact><dt><b>Parameters:</b></dt><dd>  <table border="0" cellspacing="2" cellpadding="0">    <tr><td></td><td valign=top><em>Disable</em>&nbsp;</td><td>LED0(TRUE) or Enable LED0(FALSE);</td></tr>  </table></dl>Returns the previously set value. Hardware defaults to having LED0 illuminate when charging.<p>This is only supported on BlueCore variants with charger hardware (excluding BC3-audio).     </td>  </tr></table><a class="anchor" name="a3" doxytag="charger.h::ChargerSetCurrent" ></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"> <a class="el" href="csrtypes_8h.html#a9">bool</a> ChargerSetCurrent           </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="md" nowrap valign="top"><a class="el" href="charger__if_8h.html#a26">charger_current</a>&nbsp;</td>          <td class="mdname1" valign="top" nowrap> <em>current</em>          </td>          <td class="md" valign="top">&nbsp;)&nbsp;</td>          <td class="md" nowrap></td>        </tr>      </table>    </td>  </tr></table><table cellspacing=5 cellpadding=0 border=0>  <tr>    <td>      &nbsp;    </td>    <td><p>Set the charger current in mA. <p><dl compact><dt><b>Parameters:</b></dt><dd>  <table border="0" cellspacing="2" cellpadding="0">    <tr><td></td><td valign=top><em>current</em>&nbsp;</td><td>The current from CURRENT_25_MA to CURRENT_100_MA</td></tr>  </table></dl>Returns TRUE if the current value passed was within the valid range and the charger current was altered, else FALSE<p>This is only supported on BlueCore variants with charger hardware (excluding BC3-audio).     </td>  </tr></table><a class="anchor" name="a4" doxytag="charger.h::ChargerDebounce" ></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"> <a class="el" href="csrtypes_8h.html#a4">uint16</a> ChargerDebounce           </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="md" nowrap valign="top"><a class="el" href="csrtypes_8h.html#a4">uint16</a>&nbsp;</td>          <td class="mdname" nowrap> <em>events_to_enable</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>&nbsp;</td>          <td class="mdname" nowrap> <em>count</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>&nbsp;</td>          <td class="mdname" nowrap> <em>period</em></td>        </tr>        <tr>          <td></td>          <td class="md">)&nbsp;</td>          <td class="md" colspan="2"></td>        </tr>      </table>    </td>  </tr></table><table cellspacing=5 cellpadding=0 border=0>  <tr>    <td>      &nbsp;    </td>    <td><p>Enables charger events and configures their debouncing. <p><dl compact><dt><b>Parameters:</b></dt><dd>  <table border="0" cellspacing="2" cellpadding="0">    <tr><td></td><td valign=top><em>events_to_enable</em>&nbsp;</td><td>Each bit position enables a charger event. Defines for these events can be found in <a class="el" href="charger__if_8h.html">charger_if.h</a>. </td></tr>    <tr><td></td><td valign=top><em>count</em>&nbsp;</td><td>The number of times to read from the charger pins before notifying the application </td></tr>    <tr><td></td><td valign=top><em>period</em>&nbsp;</td><td>The delay in milliseconds between reads.</td></tr>  </table></dl>A MESSAGE_CHARGER_CHANGED message will be delivered to the task setup by MessageChargerTask when the debounced state of the charger pins has changed.<p>For example calling ChargerDebounce((CHARGER_VREG_EVENT | CHARGER_CONNECT_EVENT), 4, 1) will enable the VREGEN_H and the charger attach/detach events. The application will receive a MESSAGE_CHARGER_CHANGED message when the charger pins value changes and then remains stable for 4 consecutive reads 1000 milliseconds appart.<p>Returns a bit mask where any bit set high indicates an invalid event bit passed in the "events_to_enable" parameter. Any invalid event will result in the ChargerDebounce request being rejected. Returns 0 on succcess.     </td>  </tr></table></body></html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -