stripe_8cpp.html 35 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  2. <html xmlns="http://www.w3.org/1999/xhtml">
  3. <head>
  4. <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
  5. <meta http-equiv="X-UA-Compatible" content="IE=9"/>
  6. <meta name="generator" content="Doxygen 1.8.10"/>
  7. <title>CoffeePi: stripe.cpp File Reference</title>
  8. <link href="tabs.css" rel="stylesheet" type="text/css"/>
  9. <script type="text/javascript" src="jquery.js"></script>
  10. <script type="text/javascript" src="dynsections.js"></script>
  11. <link href="search/search.css" rel="stylesheet" type="text/css"/>
  12. <script type="text/javascript" src="search/searchdata.js"></script>
  13. <script type="text/javascript" src="search/search.js"></script>
  14. <script type="text/javascript">
  15. $(document).ready(function() { init_search(); });
  16. </script>
  17. <link href="doxygen.css" rel="stylesheet" type="text/css" />
  18. </head>
  19. <body>
  20. <div id="top"><!-- do not remove this div, it is closed by doxygen! -->
  21. <div id="titlearea">
  22. <table cellspacing="0" cellpadding="0">
  23. <tbody>
  24. <tr style="height: 56px;">
  25. <td id="projectalign" style="padding-left: 0.5em;">
  26. <div id="projectname">CoffeePi
  27. </div>
  28. <div id="projectbrief">Coffee machine control for Raspberry Pi</div>
  29. </td>
  30. </tr>
  31. </tbody>
  32. </table>
  33. </div>
  34. <!-- end header part -->
  35. <!-- Generated by Doxygen 1.8.10 -->
  36. <script type="text/javascript">
  37. var searchBox = new SearchBox("searchBox", "search",false,'Search');
  38. </script>
  39. <div id="navrow1" class="tabs">
  40. <ul class="tablist">
  41. <li><a href="index.html"><span>Main&#160;Page</span></a></li>
  42. <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
  43. <li class="current"><a href="files.html"><span>Files</span></a></li>
  44. <li>
  45. <div id="MSearchBox" class="MSearchBoxInactive">
  46. <span class="left">
  47. <img id="MSearchSelect" src="search/mag_sel.png"
  48. onmouseover="return searchBox.OnSearchSelectShow()"
  49. onmouseout="return searchBox.OnSearchSelectHide()"
  50. alt=""/>
  51. <input type="text" id="MSearchField" value="Search" accesskey="S"
  52. onfocus="searchBox.OnSearchFieldFocus(true)"
  53. onblur="searchBox.OnSearchFieldFocus(false)"
  54. onkeyup="searchBox.OnSearchFieldChange(event)"/>
  55. </span><span class="right">
  56. <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
  57. </span>
  58. </div>
  59. </li>
  60. </ul>
  61. </div>
  62. <div id="navrow2" class="tabs2">
  63. <ul class="tablist">
  64. <li><a href="files.html"><span>File&#160;List</span></a></li>
  65. <li><a href="globals.html"><span>Globals</span></a></li>
  66. </ul>
  67. </div>
  68. <!-- window showing the filter options -->
  69. <div id="MSearchSelectWindow"
  70. onmouseover="return searchBox.OnSearchSelectShow()"
  71. onmouseout="return searchBox.OnSearchSelectHide()"
  72. onkeydown="return searchBox.OnSearchSelectKey(event)">
  73. </div>
  74. <!-- iframe showing the search results (closed by default) -->
  75. <div id="MSearchResultsWindow">
  76. <iframe src="javascript:void(0)" frameborder="0"
  77. name="MSearchResults" id="MSearchResults">
  78. </iframe>
  79. </div>
  80. </div><!-- top -->
  81. <div class="header">
  82. <div class="summary">
  83. <a href="#func-members">Functions</a> &#124;
  84. <a href="#var-members">Variables</a> </div>
  85. <div class="headertitle">
  86. <div class="title">stripe.cpp File Reference</div> </div>
  87. </div><!--header-->
  88. <div class="contents">
  89. <div class="textblock"><code>#include &lt;wiringPiI2C.h&gt;</code><br />
  90. <code>#include &lt;stdlib.h&gt;</code><br />
  91. <code>#include &lt;errno.h&gt;</code><br />
  92. <code>#include &lt;pthread.h&gt;</code><br />
  93. <code>#include &lt;unistd.h&gt;</code><br />
  94. <code>#include &lt;string.h&gt;</code><br />
  95. <code>#include &quot;<a class="el" href="stripe_8h_source.html">stripe.h</a>&quot;</code><br />
  96. <code>#include &quot;<a class="el" href="global_8h_source.html">global.h</a>&quot;</code><br />
  97. <code>#include &quot;<a class="el" href="timer_8h_source.html">timer.h</a>&quot;</code><br />
  98. <code>#include &quot;<a class="el" href="logger_8h_source.html">logger.h</a>&quot;</code><br />
  99. </div><table class="memberdecls">
  100. <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
  101. Functions</h2></td></tr>
  102. <tr class="memitem:a630b80b8bd1e8a0f535b21a720de76b8"><td class="memItemLeft" align="right" valign="top">void *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="stripe_8cpp.html#a630b80b8bd1e8a0f535b21a720de76b8">stripeTimerHandler</a> (void *threadid)</td></tr>
  103. <tr class="memdesc:a630b80b8bd1e8a0f535b21a720de76b8"><td class="mdescLeft">&#160;</td><td class="mdescRight">This is the handler for time based stripe effects. <a href="#a630b80b8bd1e8a0f535b21a720de76b8">More...</a><br /></td></tr>
  104. <tr class="separator:a630b80b8bd1e8a0f535b21a720de76b8"><td class="memSeparator" colspan="2">&#160;</td></tr>
  105. <tr class="memitem:a914baf734bc672a910769802c1e882c8"><td class="memItemLeft" align="right" valign="top">void *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="stripe_8cpp.html#a914baf734bc672a910769802c1e882c8">stripeThread</a> (void *threadid)</td></tr>
  106. <tr class="memdesc:a914baf734bc672a910769802c1e882c8"><td class="mdescLeft">&#160;</td><td class="mdescRight">Thread for the stripe control. <a href="#a914baf734bc672a910769802c1e882c8">More...</a><br /></td></tr>
  107. <tr class="separator:a914baf734bc672a910769802c1e882c8"><td class="memSeparator" colspan="2">&#160;</td></tr>
  108. <tr class="memitem:aec214522cff28dc1b0f20c2ec2870189"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="stripe_8cpp.html#aec214522cff28dc1b0f20c2ec2870189">stripeInit</a> (void)</td></tr>
  109. <tr class="memdesc:aec214522cff28dc1b0f20c2ec2870189"><td class="mdescLeft">&#160;</td><td class="mdescRight">Initializes i2c communication to stripe controller. <a href="#aec214522cff28dc1b0f20c2ec2870189">More...</a><br /></td></tr>
  110. <tr class="separator:aec214522cff28dc1b0f20c2ec2870189"><td class="memSeparator" colspan="2">&#160;</td></tr>
  111. <tr class="memitem:ab58f9b853bd6c2deb11f6b64e6275cd7"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="stripe_8cpp.html#ab58f9b853bd6c2deb11f6b64e6275cd7">stripeCommand</a> (int len, char *data)</td></tr>
  112. <tr class="memdesc:ab58f9b853bd6c2deb11f6b64e6275cd7"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sends out command data to the stripe controller via i2c. <a href="#ab58f9b853bd6c2deb11f6b64e6275cd7">More...</a><br /></td></tr>
  113. <tr class="separator:ab58f9b853bd6c2deb11f6b64e6275cd7"><td class="memSeparator" colspan="2">&#160;</td></tr>
  114. <tr class="memitem:a79a7d75b45ddbb2b3324ec450658136c"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="stripe_8cpp.html#a79a7d75b45ddbb2b3324ec450658136c">stripeUpdate</a> (void)</td></tr>
  115. <tr class="memdesc:a79a7d75b45ddbb2b3324ec450658136c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Updates the color data and prepares the stripe command. <a href="#a79a7d75b45ddbb2b3324ec450658136c">More...</a><br /></td></tr>
  116. <tr class="separator:a79a7d75b45ddbb2b3324ec450658136c"><td class="memSeparator" colspan="2">&#160;</td></tr>
  117. <tr class="memitem:a849e5953dbdb82fb8405b1ab43067eed"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="stripe_8cpp.html#a849e5953dbdb82fb8405b1ab43067eed">stripeUpdateDim</a> (void)</td></tr>
  118. <tr class="memdesc:a849e5953dbdb82fb8405b1ab43067eed"><td class="mdescLeft">&#160;</td><td class="mdescRight">Updates the dimmer value of the stripe. <a href="#a849e5953dbdb82fb8405b1ab43067eed">More...</a><br /></td></tr>
  119. <tr class="separator:a849e5953dbdb82fb8405b1ab43067eed"><td class="memSeparator" colspan="2">&#160;</td></tr>
  120. <tr class="memitem:a405699059b25eae6001d1e989a1da5d6"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="stripe_8cpp.html#a405699059b25eae6001d1e989a1da5d6">stripeSetRGB</a> (int red, int green, int blue)</td></tr>
  121. <tr class="memdesc:a405699059b25eae6001d1e989a1da5d6"><td class="mdescLeft">&#160;</td><td class="mdescRight">Updates the color of the stripe. <a href="#a405699059b25eae6001d1e989a1da5d6">More...</a><br /></td></tr>
  122. <tr class="separator:a405699059b25eae6001d1e989a1da5d6"><td class="memSeparator" colspan="2">&#160;</td></tr>
  123. <tr class="memitem:a32197a6a1a75aaf54a2a19dbc31be4e0"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="stripe_8cpp.html#a32197a6a1a75aaf54a2a19dbc31be4e0">stripeSetColor</a> (<a class="el" href="structstripe__color.html">stripe_color</a> color)</td></tr>
  124. <tr class="memdesc:a32197a6a1a75aaf54a2a19dbc31be4e0"><td class="mdescLeft">&#160;</td><td class="mdescRight">Updates the color of the stripe. <a href="#a32197a6a1a75aaf54a2a19dbc31be4e0">More...</a><br /></td></tr>
  125. <tr class="separator:a32197a6a1a75aaf54a2a19dbc31be4e0"><td class="memSeparator" colspan="2">&#160;</td></tr>
  126. <tr class="memitem:a26524f75c9d72587489d20bba6c61da6"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="stripe_8cpp.html#a26524f75c9d72587489d20bba6c61da6">stripeSetTransient</a> (<a class="el" href="stripe_8h.html#aa761062faf633557e537e07a781965e9">stripe_transient_t</a> transient)</td></tr>
  127. <tr class="memdesc:a26524f75c9d72587489d20bba6c61da6"><td class="mdescLeft">&#160;</td><td class="mdescRight">Updates the transient time for the stripe (fading) <a href="#a26524f75c9d72587489d20bba6c61da6">More...</a><br /></td></tr>
  128. <tr class="separator:a26524f75c9d72587489d20bba6c61da6"><td class="memSeparator" colspan="2">&#160;</td></tr>
  129. <tr class="memitem:ade9bc3e5b3fabc99922d78df6ae96434"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="stripe_8cpp.html#ade9bc3e5b3fabc99922d78df6ae96434">stripeSetDim</a> (int dim)</td></tr>
  130. <tr class="memdesc:ade9bc3e5b3fabc99922d78df6ae96434"><td class="mdescLeft">&#160;</td><td class="mdescRight">Updates the dimmer value of the stripe. <a href="#ade9bc3e5b3fabc99922d78df6ae96434">More...</a><br /></td></tr>
  131. <tr class="separator:ade9bc3e5b3fabc99922d78df6ae96434"><td class="memSeparator" colspan="2">&#160;</td></tr>
  132. <tr class="memitem:a2ae73653f2098fdae40bb0916949e77e"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="stripe_8cpp.html#a2ae73653f2098fdae40bb0916949e77e">stripeSetWhite</a> (int white)</td></tr>
  133. <tr class="memdesc:a2ae73653f2098fdae40bb0916949e77e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Updates the white value of the stripe (4th channel) <a href="#a2ae73653f2098fdae40bb0916949e77e">More...</a><br /></td></tr>
  134. <tr class="separator:a2ae73653f2098fdae40bb0916949e77e"><td class="memSeparator" colspan="2">&#160;</td></tr>
  135. <tr class="memitem:a9130dbeb208c1b9e5519834f7de6a530"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="stripe_8cpp.html#a9130dbeb208c1b9e5519834f7de6a530">stripeOn</a> (void)</td></tr>
  136. <tr class="memdesc:a9130dbeb208c1b9e5519834f7de6a530"><td class="mdescLeft">&#160;</td><td class="mdescRight">Turns the stripe on (Sets dimmer to 100%) <a href="#a9130dbeb208c1b9e5519834f7de6a530">More...</a><br /></td></tr>
  137. <tr class="separator:a9130dbeb208c1b9e5519834f7de6a530"><td class="memSeparator" colspan="2">&#160;</td></tr>
  138. <tr class="memitem:a40d444a306464fa8547feea96737ae0d"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="stripe_8cpp.html#a40d444a306464fa8547feea96737ae0d">stripeOff</a> (void)</td></tr>
  139. <tr class="memdesc:a40d444a306464fa8547feea96737ae0d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Turns the stripe on (Sets dimmer to 0%) <a href="#a40d444a306464fa8547feea96737ae0d">More...</a><br /></td></tr>
  140. <tr class="separator:a40d444a306464fa8547feea96737ae0d"><td class="memSeparator" colspan="2">&#160;</td></tr>
  141. <tr class="memitem:ac5379b3ade62c829d19654c22efd90de"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="stripe_8cpp.html#ac5379b3ade62c829d19654c22efd90de">stripeGetRGB</a> (int *red, int *green, int *blue)</td></tr>
  142. <tr class="memdesc:ac5379b3ade62c829d19654c22efd90de"><td class="mdescLeft">&#160;</td><td class="mdescRight">Reads the current stripe color. <a href="#ac5379b3ade62c829d19654c22efd90de">More...</a><br /></td></tr>
  143. <tr class="separator:ac5379b3ade62c829d19654c22efd90de"><td class="memSeparator" colspan="2">&#160;</td></tr>
  144. <tr class="memitem:ab479c1db854476cf80b86d1fe33a908e"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="stripe_8cpp.html#ab479c1db854476cf80b86d1fe33a908e">stripeGetDim</a> (int *dim)</td></tr>
  145. <tr class="memdesc:ab479c1db854476cf80b86d1fe33a908e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Reads the current stripe dimmer value. <a href="#ab479c1db854476cf80b86d1fe33a908e">More...</a><br /></td></tr>
  146. <tr class="separator:ab479c1db854476cf80b86d1fe33a908e"><td class="memSeparator" colspan="2">&#160;</td></tr>
  147. <tr class="memitem:aa67941dfd018cc2e0ba62a76a3d9136d"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="stripe_8cpp.html#aa67941dfd018cc2e0ba62a76a3d9136d">stripeGetWhite</a> (int *white)</td></tr>
  148. <tr class="memdesc:aa67941dfd018cc2e0ba62a76a3d9136d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Reads the current stripe white value (4th channel) <a href="#aa67941dfd018cc2e0ba62a76a3d9136d">More...</a><br /></td></tr>
  149. <tr class="separator:aa67941dfd018cc2e0ba62a76a3d9136d"><td class="memSeparator" colspan="2">&#160;</td></tr>
  150. <tr class="memitem:a40cca6b9cc8aeca2f28442126528163b"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="stripe_8cpp.html#a40cca6b9cc8aeca2f28442126528163b">stripeEffectDisable</a> (void)</td></tr>
  151. <tr class="memdesc:a40cca6b9cc8aeca2f28442126528163b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Stops current running effects. <a href="#a40cca6b9cc8aeca2f28442126528163b">More...</a><br /></td></tr>
  152. <tr class="separator:a40cca6b9cc8aeca2f28442126528163b"><td class="memSeparator" colspan="2">&#160;</td></tr>
  153. <tr class="memitem:a97c35798100bbf3208fd15cc5615cd97"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="stripe_8cpp.html#a97c35798100bbf3208fd15cc5615cd97">stripeEffectHeating</a> (int percent)</td></tr>
  154. <tr class="memdesc:a97c35798100bbf3208fd15cc5615cd97"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the stripe to a correspondending color to the heating status. <a href="#a97c35798100bbf3208fd15cc5615cd97">More...</a><br /></td></tr>
  155. <tr class="separator:a97c35798100bbf3208fd15cc5615cd97"><td class="memSeparator" colspan="2">&#160;</td></tr>
  156. <tr class="memitem:aea3ed8a6a2d07ed7f8f2ff59f6fa3a01"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="stripe_8cpp.html#aea3ed8a6a2d07ed7f8f2ff59f6fa3a01">stripeEffectPulse</a> (<a class="el" href="structstripe__color.html">stripe_color</a> color)</td></tr>
  157. <tr class="memdesc:aea3ed8a6a2d07ed7f8f2ff59f6fa3a01"><td class="mdescLeft">&#160;</td><td class="mdescRight">Enables pulsing with a given color of the stripe. <a href="#aea3ed8a6a2d07ed7f8f2ff59f6fa3a01">More...</a><br /></td></tr>
  158. <tr class="separator:aea3ed8a6a2d07ed7f8f2ff59f6fa3a01"><td class="memSeparator" colspan="2">&#160;</td></tr>
  159. </table><table class="memberdecls">
  160. <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="var-members"></a>
  161. Variables</h2></td></tr>
  162. <tr class="memitem:af149226ff674cac78ce47ce7261cb2dc"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structstripe__color.html">stripe_color</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="stripe_8cpp.html#af149226ff674cac78ce47ce7261cb2dc">currentColor</a></td></tr>
  163. <tr class="separator:af149226ff674cac78ce47ce7261cb2dc"><td class="memSeparator" colspan="2">&#160;</td></tr>
  164. <tr class="memitem:a8b61b922f1ae5a0c5854e3a318b74421"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structstripe__color.html">stripe_color</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="stripe_8cpp.html#a8b61b922f1ae5a0c5854e3a318b74421">effectColor</a></td></tr>
  165. <tr class="separator:a8b61b922f1ae5a0c5854e3a318b74421"><td class="memSeparator" colspan="2">&#160;</td></tr>
  166. <tr class="memitem:aeb79ac3025329db68dba76aa2e830532"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="stripe_8cpp.html#aeb79ac3025329db68dba76aa2e830532">currentWhite</a> = 0</td></tr>
  167. <tr class="separator:aeb79ac3025329db68dba76aa2e830532"><td class="memSeparator" colspan="2">&#160;</td></tr>
  168. <tr class="memitem:a5a820ae4564b095447dffb1f75fbb930"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="stripe_8cpp.html#a5a820ae4564b095447dffb1f75fbb930">currentDim</a> = 0</td></tr>
  169. <tr class="separator:a5a820ae4564b095447dffb1f75fbb930"><td class="memSeparator" colspan="2">&#160;</td></tr>
  170. <tr class="memitem:a601572ab87622859faa74bd5d948e672"><td class="memItemLeft" align="right" valign="top"><a class="el" href="stripe_8h.html#aa761062faf633557e537e07a781965e9">stripe_transient_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="stripe_8cpp.html#a601572ab87622859faa74bd5d948e672">currentTransient</a> = <a class="el" href="stripe_8h.html#aa761062faf633557e537e07a781965e9ad41450786f0c8b404231dfaff4c14931">TRANS_DIRECT</a></td></tr>
  171. <tr class="separator:a601572ab87622859faa74bd5d948e672"><td class="memSeparator" colspan="2">&#160;</td></tr>
  172. <tr class="memitem:abfdd13da6d6e41a44deb095184750c8e"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classtimer.html">timer</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="stripe_8cpp.html#abfdd13da6d6e41a44deb095184750c8e">stripeTimer</a> (<a class="el" href="stripe_8h.html#a630b80b8bd1e8a0f535b21a720de76b8">stripeTimerHandler</a>)</td></tr>
  173. <tr class="separator:abfdd13da6d6e41a44deb095184750c8e"><td class="memSeparator" colspan="2">&#160;</td></tr>
  174. <tr class="memitem:ad82fe3818283681900e35187390d4b84"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="stripe_8cpp.html#ad82fe3818283681900e35187390d4b84">i2cfd</a></td></tr>
  175. <tr class="separator:ad82fe3818283681900e35187390d4b84"><td class="memSeparator" colspan="2">&#160;</td></tr>
  176. </table>
  177. <h2 class="groupheader">Function Documentation</h2>
  178. <a class="anchor" id="ab58f9b853bd6c2deb11f6b64e6275cd7"></a>
  179. <div class="memitem">
  180. <div class="memproto">
  181. <table class="memname">
  182. <tr>
  183. <td class="memname">int stripeCommand </td>
  184. <td>(</td>
  185. <td class="paramtype">int&#160;</td>
  186. <td class="paramname"><em>len</em>, </td>
  187. </tr>
  188. <tr>
  189. <td class="paramkey"></td>
  190. <td></td>
  191. <td class="paramtype">char *&#160;</td>
  192. <td class="paramname"><em>data</em>&#160;</td>
  193. </tr>
  194. <tr>
  195. <td></td>
  196. <td>)</td>
  197. <td></td><td></td>
  198. </tr>
  199. </table>
  200. </div><div class="memdoc">
  201. <p>Sends out command data to the stripe controller via i2c. </p>
  202. <dl class="params"><dt>Parameters</dt><dd>
  203. <table class="params">
  204. <tr><td class="paramname">len</td><td>Length of the data array </td></tr>
  205. <tr><td class="paramname">*data</td><td>Pointer to data array </td></tr>
  206. </table>
  207. </dd>
  208. </dl>
  209. <dl class="section return"><dt>Returns</dt><dd>Number of failed bytes, 0 if successful </dd></dl>
  210. </div>
  211. </div>
  212. <a class="anchor" id="a40cca6b9cc8aeca2f28442126528163b"></a>
  213. <div class="memitem">
  214. <div class="memproto">
  215. <table class="memname">
  216. <tr>
  217. <td class="memname">void stripeEffectDisable </td>
  218. <td>(</td>
  219. <td class="paramtype">void&#160;</td>
  220. <td class="paramname"></td><td>)</td>
  221. <td></td>
  222. </tr>
  223. </table>
  224. </div><div class="memdoc">
  225. <p>Stops current running effects. </p>
  226. </div>
  227. </div>
  228. <a class="anchor" id="a97c35798100bbf3208fd15cc5615cd97"></a>
  229. <div class="memitem">
  230. <div class="memproto">
  231. <table class="memname">
  232. <tr>
  233. <td class="memname">void stripeEffectHeating </td>
  234. <td>(</td>
  235. <td class="paramtype">int&#160;</td>
  236. <td class="paramname"><em>percent</em></td><td>)</td>
  237. <td></td>
  238. </tr>
  239. </table>
  240. </div><div class="memdoc">
  241. <p>Sets the stripe to a correspondending color to the heating status. </p>
  242. <dl class="params"><dt>Parameters</dt><dd>
  243. <table class="params">
  244. <tr><td class="paramname">percent</td><td>Heating level (0-100%) </td></tr>
  245. </table>
  246. </dd>
  247. </dl>
  248. </div>
  249. </div>
  250. <a class="anchor" id="aea3ed8a6a2d07ed7f8f2ff59f6fa3a01"></a>
  251. <div class="memitem">
  252. <div class="memproto">
  253. <table class="memname">
  254. <tr>
  255. <td class="memname">void stripeEffectPulse </td>
  256. <td>(</td>
  257. <td class="paramtype"><a class="el" href="structstripe__color.html">stripe_color</a>&#160;</td>
  258. <td class="paramname"><em>color</em></td><td>)</td>
  259. <td></td>
  260. </tr>
  261. </table>
  262. </div><div class="memdoc">
  263. <p>Enables pulsing with a given color of the stripe. </p>
  264. <dl class="params"><dt>Parameters</dt><dd>
  265. <table class="params">
  266. <tr><td class="paramname">color</td><td>Effect color </td></tr>
  267. </table>
  268. </dd>
  269. </dl>
  270. </div>
  271. </div>
  272. <a class="anchor" id="ab479c1db854476cf80b86d1fe33a908e"></a>
  273. <div class="memitem">
  274. <div class="memproto">
  275. <table class="memname">
  276. <tr>
  277. <td class="memname">void stripeGetDim </td>
  278. <td>(</td>
  279. <td class="paramtype">int *&#160;</td>
  280. <td class="paramname"><em>dim</em></td><td>)</td>
  281. <td></td>
  282. </tr>
  283. </table>
  284. </div><div class="memdoc">
  285. <p>Reads the current stripe dimmer value. </p>
  286. <dl class="params"><dt>Parameters</dt><dd>
  287. <table class="params">
  288. <tr><td class="paramname">*dim</td><td>Pointer to dimmer variable </td></tr>
  289. </table>
  290. </dd>
  291. </dl>
  292. </div>
  293. </div>
  294. <a class="anchor" id="ac5379b3ade62c829d19654c22efd90de"></a>
  295. <div class="memitem">
  296. <div class="memproto">
  297. <table class="memname">
  298. <tr>
  299. <td class="memname">void stripeGetRGB </td>
  300. <td>(</td>
  301. <td class="paramtype">int *&#160;</td>
  302. <td class="paramname"><em>red</em>, </td>
  303. </tr>
  304. <tr>
  305. <td class="paramkey"></td>
  306. <td></td>
  307. <td class="paramtype">int *&#160;</td>
  308. <td class="paramname"><em>green</em>, </td>
  309. </tr>
  310. <tr>
  311. <td class="paramkey"></td>
  312. <td></td>
  313. <td class="paramtype">int *&#160;</td>
  314. <td class="paramname"><em>blue</em>&#160;</td>
  315. </tr>
  316. <tr>
  317. <td></td>
  318. <td>)</td>
  319. <td></td><td></td>
  320. </tr>
  321. </table>
  322. </div><div class="memdoc">
  323. <p>Reads the current stripe color. </p>
  324. <dl class="params"><dt>Parameters</dt><dd>
  325. <table class="params">
  326. <tr><td class="paramname">*red</td><td>Pointer to red variable </td></tr>
  327. <tr><td class="paramname">*green</td><td>Pointer to green variable </td></tr>
  328. <tr><td class="paramname">*blue</td><td>Pointer to blue variable </td></tr>
  329. </table>
  330. </dd>
  331. </dl>
  332. </div>
  333. </div>
  334. <a class="anchor" id="aa67941dfd018cc2e0ba62a76a3d9136d"></a>
  335. <div class="memitem">
  336. <div class="memproto">
  337. <table class="memname">
  338. <tr>
  339. <td class="memname">void stripeGetWhite </td>
  340. <td>(</td>
  341. <td class="paramtype">int *&#160;</td>
  342. <td class="paramname"><em>white</em></td><td>)</td>
  343. <td></td>
  344. </tr>
  345. </table>
  346. </div><div class="memdoc">
  347. <p>Reads the current stripe white value (4th channel) </p>
  348. <dl class="params"><dt>Parameters</dt><dd>
  349. <table class="params">
  350. <tr><td class="paramname">*white</td><td>Pointer to white variable </td></tr>
  351. </table>
  352. </dd>
  353. </dl>
  354. </div>
  355. </div>
  356. <a class="anchor" id="aec214522cff28dc1b0f20c2ec2870189"></a>
  357. <div class="memitem">
  358. <div class="memproto">
  359. <table class="memname">
  360. <tr>
  361. <td class="memname">void stripeInit </td>
  362. <td>(</td>
  363. <td class="paramtype">void&#160;</td>
  364. <td class="paramname"></td><td>)</td>
  365. <td></td>
  366. </tr>
  367. </table>
  368. </div><div class="memdoc">
  369. <p>Initializes i2c communication to stripe controller. </p>
  370. </div>
  371. </div>
  372. <a class="anchor" id="a40d444a306464fa8547feea96737ae0d"></a>
  373. <div class="memitem">
  374. <div class="memproto">
  375. <table class="memname">
  376. <tr>
  377. <td class="memname">void stripeOff </td>
  378. <td>(</td>
  379. <td class="paramtype">void&#160;</td>
  380. <td class="paramname"></td><td>)</td>
  381. <td></td>
  382. </tr>
  383. </table>
  384. </div><div class="memdoc">
  385. <p>Turns the stripe on (Sets dimmer to 0%) </p>
  386. </div>
  387. </div>
  388. <a class="anchor" id="a9130dbeb208c1b9e5519834f7de6a530"></a>
  389. <div class="memitem">
  390. <div class="memproto">
  391. <table class="memname">
  392. <tr>
  393. <td class="memname">void stripeOn </td>
  394. <td>(</td>
  395. <td class="paramtype">void&#160;</td>
  396. <td class="paramname"></td><td>)</td>
  397. <td></td>
  398. </tr>
  399. </table>
  400. </div><div class="memdoc">
  401. <p>Turns the stripe on (Sets dimmer to 100%) </p>
  402. </div>
  403. </div>
  404. <a class="anchor" id="a32197a6a1a75aaf54a2a19dbc31be4e0"></a>
  405. <div class="memitem">
  406. <div class="memproto">
  407. <table class="memname">
  408. <tr>
  409. <td class="memname">void stripeSetColor </td>
  410. <td>(</td>
  411. <td class="paramtype"><a class="el" href="structstripe__color.html">stripe_color</a>&#160;</td>
  412. <td class="paramname"><em>color</em></td><td>)</td>
  413. <td></td>
  414. </tr>
  415. </table>
  416. </div><div class="memdoc">
  417. <p>Updates the color of the stripe. </p>
  418. <dl class="params"><dt>Parameters</dt><dd>
  419. <table class="params">
  420. <tr><td class="paramname">color</td><td>Color struct </td></tr>
  421. </table>
  422. </dd>
  423. </dl>
  424. </div>
  425. </div>
  426. <a class="anchor" id="ade9bc3e5b3fabc99922d78df6ae96434"></a>
  427. <div class="memitem">
  428. <div class="memproto">
  429. <table class="memname">
  430. <tr>
  431. <td class="memname">void stripeSetDim </td>
  432. <td>(</td>
  433. <td class="paramtype">int&#160;</td>
  434. <td class="paramname"><em>dim</em></td><td>)</td>
  435. <td></td>
  436. </tr>
  437. </table>
  438. </div><div class="memdoc">
  439. <p>Updates the dimmer value of the stripe. </p>
  440. <dl class="params"><dt>Parameters</dt><dd>
  441. <table class="params">
  442. <tr><td class="paramname">dim</td><td>Dimmer value </td></tr>
  443. </table>
  444. </dd>
  445. </dl>
  446. </div>
  447. </div>
  448. <a class="anchor" id="a405699059b25eae6001d1e989a1da5d6"></a>
  449. <div class="memitem">
  450. <div class="memproto">
  451. <table class="memname">
  452. <tr>
  453. <td class="memname">void stripeSetRGB </td>
  454. <td>(</td>
  455. <td class="paramtype">int&#160;</td>
  456. <td class="paramname"><em>red</em>, </td>
  457. </tr>
  458. <tr>
  459. <td class="paramkey"></td>
  460. <td></td>
  461. <td class="paramtype">int&#160;</td>
  462. <td class="paramname"><em>green</em>, </td>
  463. </tr>
  464. <tr>
  465. <td class="paramkey"></td>
  466. <td></td>
  467. <td class="paramtype">int&#160;</td>
  468. <td class="paramname"><em>blue</em>&#160;</td>
  469. </tr>
  470. <tr>
  471. <td></td>
  472. <td>)</td>
  473. <td></td><td></td>
  474. </tr>
  475. </table>
  476. </div><div class="memdoc">
  477. <p>Updates the color of the stripe. </p>
  478. <dl class="params"><dt>Parameters</dt><dd>
  479. <table class="params">
  480. <tr><td class="paramname">red</td><td>Red value (max 255) </td></tr>
  481. <tr><td class="paramname">green</td><td>Green value (max 255) </td></tr>
  482. <tr><td class="paramname">blue</td><td>Blue value (max 255) </td></tr>
  483. </table>
  484. </dd>
  485. </dl>
  486. </div>
  487. </div>
  488. <a class="anchor" id="a26524f75c9d72587489d20bba6c61da6"></a>
  489. <div class="memitem">
  490. <div class="memproto">
  491. <table class="memname">
  492. <tr>
  493. <td class="memname">void stripeSetTransient </td>
  494. <td>(</td>
  495. <td class="paramtype"><a class="el" href="stripe_8h.html#aa761062faf633557e537e07a781965e9">stripe_transient_t</a>&#160;</td>
  496. <td class="paramname"><em>transient</em></td><td>)</td>
  497. <td></td>
  498. </tr>
  499. </table>
  500. </div><div class="memdoc">
  501. <p>Updates the transient time for the stripe (fading) </p>
  502. <dl class="params"><dt>Parameters</dt><dd>
  503. <table class="params">
  504. <tr><td class="paramname">transient</td><td>Transient time in ticks </td></tr>
  505. </table>
  506. </dd>
  507. </dl>
  508. </div>
  509. </div>
  510. <a class="anchor" id="a2ae73653f2098fdae40bb0916949e77e"></a>
  511. <div class="memitem">
  512. <div class="memproto">
  513. <table class="memname">
  514. <tr>
  515. <td class="memname">void stripeSetWhite </td>
  516. <td>(</td>
  517. <td class="paramtype">int&#160;</td>
  518. <td class="paramname"><em>white</em></td><td>)</td>
  519. <td></td>
  520. </tr>
  521. </table>
  522. </div><div class="memdoc">
  523. <p>Updates the white value of the stripe (4th channel) </p>
  524. <dl class="params"><dt>Parameters</dt><dd>
  525. <table class="params">
  526. <tr><td class="paramname">white</td><td>White value </td></tr>
  527. </table>
  528. </dd>
  529. </dl>
  530. </div>
  531. </div>
  532. <a class="anchor" id="a914baf734bc672a910769802c1e882c8"></a>
  533. <div class="memitem">
  534. <div class="memproto">
  535. <table class="memname">
  536. <tr>
  537. <td class="memname">void* stripeThread </td>
  538. <td>(</td>
  539. <td class="paramtype">void *&#160;</td>
  540. <td class="paramname"><em>threadid</em></td><td>)</td>
  541. <td></td>
  542. </tr>
  543. </table>
  544. </div><div class="memdoc">
  545. <p>Thread for the stripe control. </p>
  546. <p>Requests data from other threads or HAL </p><dl class="params"><dt>Parameters</dt><dd>
  547. <table class="params">
  548. <tr><td class="paramname">*threadid</td><td>Thread ID </td></tr>
  549. </table>
  550. </dd>
  551. </dl>
  552. </div>
  553. </div>
  554. <a class="anchor" id="a630b80b8bd1e8a0f535b21a720de76b8"></a>
  555. <div class="memitem">
  556. <div class="memproto">
  557. <table class="memname">
  558. <tr>
  559. <td class="memname">void* stripeTimerHandler </td>
  560. <td>(</td>
  561. <td class="paramtype">void *&#160;</td>
  562. <td class="paramname"><em>threadid</em></td><td>)</td>
  563. <td></td>
  564. </tr>
  565. </table>
  566. </div><div class="memdoc">
  567. <p>This is the handler for time based stripe effects. </p>
  568. <dl class="params"><dt>Parameters</dt><dd>
  569. <table class="params">
  570. <tr><td class="paramname">*threadid</td><td>Thread ID </td></tr>
  571. </table>
  572. </dd>
  573. </dl>
  574. </div>
  575. </div>
  576. <a class="anchor" id="a79a7d75b45ddbb2b3324ec450658136c"></a>
  577. <div class="memitem">
  578. <div class="memproto">
  579. <table class="memname">
  580. <tr>
  581. <td class="memname">void stripeUpdate </td>
  582. <td>(</td>
  583. <td class="paramtype">void&#160;</td>
  584. <td class="paramname"></td><td>)</td>
  585. <td></td>
  586. </tr>
  587. </table>
  588. </div><div class="memdoc">
  589. <p>Updates the color data and prepares the stripe command. </p>
  590. </div>
  591. </div>
  592. <a class="anchor" id="a849e5953dbdb82fb8405b1ab43067eed"></a>
  593. <div class="memitem">
  594. <div class="memproto">
  595. <table class="memname">
  596. <tr>
  597. <td class="memname">void stripeUpdateDim </td>
  598. <td>(</td>
  599. <td class="paramtype">void&#160;</td>
  600. <td class="paramname"></td><td>)</td>
  601. <td></td>
  602. </tr>
  603. </table>
  604. </div><div class="memdoc">
  605. <p>Updates the dimmer value of the stripe. </p>
  606. </div>
  607. </div>
  608. <h2 class="groupheader">Variable Documentation</h2>
  609. <a class="anchor" id="af149226ff674cac78ce47ce7261cb2dc"></a>
  610. <div class="memitem">
  611. <div class="memproto">
  612. <table class="memname">
  613. <tr>
  614. <td class="memname"><a class="el" href="structstripe__color.html">stripe_color</a> currentColor</td>
  615. </tr>
  616. </table>
  617. </div><div class="memdoc">
  618. </div>
  619. </div>
  620. <a class="anchor" id="a5a820ae4564b095447dffb1f75fbb930"></a>
  621. <div class="memitem">
  622. <div class="memproto">
  623. <table class="memname">
  624. <tr>
  625. <td class="memname">int currentDim = 0</td>
  626. </tr>
  627. </table>
  628. </div><div class="memdoc">
  629. </div>
  630. </div>
  631. <a class="anchor" id="a601572ab87622859faa74bd5d948e672"></a>
  632. <div class="memitem">
  633. <div class="memproto">
  634. <table class="memname">
  635. <tr>
  636. <td class="memname"><a class="el" href="stripe_8h.html#aa761062faf633557e537e07a781965e9">stripe_transient_t</a> currentTransient = <a class="el" href="stripe_8h.html#aa761062faf633557e537e07a781965e9ad41450786f0c8b404231dfaff4c14931">TRANS_DIRECT</a></td>
  637. </tr>
  638. </table>
  639. </div><div class="memdoc">
  640. </div>
  641. </div>
  642. <a class="anchor" id="aeb79ac3025329db68dba76aa2e830532"></a>
  643. <div class="memitem">
  644. <div class="memproto">
  645. <table class="memname">
  646. <tr>
  647. <td class="memname">int currentWhite = 0</td>
  648. </tr>
  649. </table>
  650. </div><div class="memdoc">
  651. </div>
  652. </div>
  653. <a class="anchor" id="a8b61b922f1ae5a0c5854e3a318b74421"></a>
  654. <div class="memitem">
  655. <div class="memproto">
  656. <table class="memname">
  657. <tr>
  658. <td class="memname"><a class="el" href="structstripe__color.html">stripe_color</a> effectColor</td>
  659. </tr>
  660. </table>
  661. </div><div class="memdoc">
  662. </div>
  663. </div>
  664. <a class="anchor" id="ad82fe3818283681900e35187390d4b84"></a>
  665. <div class="memitem">
  666. <div class="memproto">
  667. <table class="memname">
  668. <tr>
  669. <td class="memname">int i2cfd</td>
  670. </tr>
  671. </table>
  672. </div><div class="memdoc">
  673. </div>
  674. </div>
  675. <a class="anchor" id="abfdd13da6d6e41a44deb095184750c8e"></a>
  676. <div class="memitem">
  677. <div class="memproto">
  678. <table class="memname">
  679. <tr>
  680. <td class="memname"><a class="el" href="classtimer.html">timer</a> stripeTimer(<a class="el" href="stripe_8h.html#a630b80b8bd1e8a0f535b21a720de76b8">stripeTimerHandler</a>)</td>
  681. </tr>
  682. </table>
  683. </div><div class="memdoc">
  684. </div>
  685. </div>
  686. </div><!-- contents -->
  687. <!-- start footer part -->
  688. <hr class="footer"/><address class="footer"><small>
  689. Generated by &#160;<a href="http://www.doxygen.org/index.html">
  690. <img class="footer" src="doxygen.png" alt="doxygen"/>
  691. </a> 1.8.10
  692. </small></address>
  693. </body>
  694. </html>