This commit is contained in:
joeycastillo
2024-07-06 15:07:33 +00:00
parent 7923631581
commit 5d615a45e8
6 changed files with 174 additions and 108 deletions

View File

@@ -90,6 +90,9 @@ Functions</h2></td></tr>
<tr class="memitem:ga042bcc9220ab05d1de8389cf0067511b" id="r_ga042bcc9220ab05d1de8389cf0067511b"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__led.html#ga042bcc9220ab05d1de8389cf0067511b">watch_set_led_color</a> (uint8_t red, uint8_t green)</td></tr>
<tr class="memdesc:ga042bcc9220ab05d1de8389cf0067511b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the LED to a custom color by modulating each output's duty cycle. <br /></td></tr>
<tr class="separator:ga042bcc9220ab05d1de8389cf0067511b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gae6a2e663eea452cc84565b1baccb42d0" id="r_gae6a2e663eea452cc84565b1baccb42d0"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__led.html#gae6a2e663eea452cc84565b1baccb42d0">watch_set_led_color_rgb</a> (uint8_t red, uint8_t green, uint8_t blue)</td></tr>
<tr class="memdesc:gae6a2e663eea452cc84565b1baccb42d0"><td class="mdescLeft">&#160;</td><td class="mdescRight">On boards with an RGB LED, sets the LED to a custom color by modulating each output's duty cycle. <br /></td></tr>
<tr class="separator:gae6a2e663eea452cc84565b1baccb42d0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga36d89031d8e8813dfab5f6cff9c6ee40" id="r_ga36d89031d8e8813dfab5f6cff9c6ee40"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__led.html#ga36d89031d8e8813dfab5f6cff9c6ee40">watch_set_led_red</a> (void)</td></tr>
<tr class="memdesc:ga36d89031d8e8813dfab5f6cff9c6ee40"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the red LED to full brightness, and turns the green LED off. <br /></td></tr>
<tr class="separator:ga36d89031d8e8813dfab5f6cff9c6ee40"><td class="memSeparator" colspan="2">&#160;</td></tr>
@@ -186,6 +189,51 @@ void&#160;</td><td class="memItemRight" valign="bottom"><b>watch_set_led_off</b>
</dl>
<dl class="section note"><dt>Note</dt><dd>If you are displaying a custom color, you will need to prevent your app from going to sleep while the LED is on; otherwise, the color will not display correctly. You can do this by returning false in your app_loop method. </dd></dl>
</div>
</div>
<a id="gae6a2e663eea452cc84565b1baccb42d0" name="gae6a2e663eea452cc84565b1baccb42d0"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gae6a2e663eea452cc84565b1baccb42d0">&#9670;&#160;</a></span>watch_set_led_color_rgb()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void watch_set_led_color_rgb </td>
<td>(</td>
<td class="paramtype">uint8_t&#160;</td>
<td class="paramname"><em>red</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint8_t&#160;</td>
<td class="paramname"><em>green</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint8_t&#160;</td>
<td class="paramname"><em>blue</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>On boards with an RGB LED, sets the LED to a custom color by modulating each output's duty cycle. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">red</td><td>The red value from 0-255. </td></tr>
<tr><td class="paramname">green</td><td>The green value from 0-255. </td></tr>
<tr><td class="paramname">blue</td><td>The blue value from 0-255. </td></tr>
</table>
</dd>
</dl>
<dl class="section note"><dt>Note</dt><dd>If you are displaying a custom color, you will need to prevent your app from going to sleep while the LED is on; otherwise, the color will not display correctly. You can do this by returning false in your app_loop method. </dd></dl>
</div>
</div>
<a id="gab01a29900ddc5315c0e752e63d748f41" name="gab01a29900ddc5315c0e752e63d748f41"></a>