class_button.html 27 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269
  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.13"/>
  7. <meta name="viewport" content="width=device-width, initial-scale=1"/>
  8. <title>Bounce2: Button Class Reference</title>
  9. <link href="tabs.css" rel="stylesheet" type="text/css"/>
  10. <script type="text/javascript" src="jquery.js"></script>
  11. <script type="text/javascript" src="dynsections.js"></script>
  12. <link href="search/search.css" rel="stylesheet" type="text/css"/>
  13. <script type="text/javascript" src="search/searchdata.js"></script>
  14. <script type="text/javascript" src="search/search.js"></script>
  15. <link href="doxygen.css" rel="stylesheet" type="text/css" />
  16. </head>
  17. <body>
  18. <div id="top"><!-- do not remove this div, it is closed by doxygen! -->
  19. <div id="titlearea">
  20. <table cellspacing="0" cellpadding="0">
  21. <tbody>
  22. <tr style="height: 56px;">
  23. <td id="projectalign" style="padding-left: 0.5em;">
  24. <div id="projectname">Bounce2
  25. </div>
  26. </td>
  27. </tr>
  28. </tbody>
  29. </table>
  30. </div>
  31. <!-- end header part -->
  32. <!-- Generated by Doxygen 1.8.13 -->
  33. <script type="text/javascript">
  34. var searchBox = new SearchBox("searchBox", "search",false,'Search');
  35. </script>
  36. <script type="text/javascript" src="menudata.js"></script>
  37. <script type="text/javascript" src="menu.js"></script>
  38. <script type="text/javascript">
  39. $(function() {
  40. initMenu('',true,false,'search.php','Search');
  41. $(document).ready(function() { init_search(); });
  42. });
  43. </script>
  44. <div id="main-nav"></div>
  45. <!-- window showing the filter options -->
  46. <div id="MSearchSelectWindow"
  47. onmouseover="return searchBox.OnSearchSelectShow()"
  48. onmouseout="return searchBox.OnSearchSelectHide()"
  49. onkeydown="return searchBox.OnSearchSelectKey(event)">
  50. </div>
  51. <!-- iframe showing the search results (closed by default) -->
  52. <div id="MSearchResultsWindow">
  53. <iframe src="javascript:void(0)" frameborder="0"
  54. name="MSearchResults" id="MSearchResults">
  55. </iframe>
  56. </div>
  57. </div><!-- top -->
  58. <div class="header">
  59. <div class="summary">
  60. <a href="#pub-methods">Public Member Functions</a> &#124;
  61. <a href="#pro-attribs">Protected Attributes</a> &#124;
  62. <a href="class_button-members.html">List of all members</a> </div>
  63. <div class="headertitle">
  64. <div class="title">Button Class Reference</div> </div>
  65. </div><!--header-->
  66. <div class="contents">
  67. <p>The Debouncer:Bounce:<a class="el" href="class_button.html" title="The Debouncer:Bounce:Button class. The Button class matches an electrical state to a physical action...">Button</a> class. The <a class="el" href="class_button.html" title="The Debouncer:Bounce:Button class. The Button class matches an electrical state to a physical action...">Button</a> class matches an electrical state to a physical action.
  68. <a href="class_button.html#details">More...</a></p>
  69. <p><code>#include &lt;<a class="el" href="_bounce2_8h_source.html">Bounce2.h</a>&gt;</code></p>
  70. <div class="dynheader">
  71. Inheritance diagram for Button:</div>
  72. <div class="dyncontent">
  73. <div class="center">
  74. <img src="class_button.png" usemap="#Button_map" alt=""/>
  75. <map id="Button_map" name="Button_map">
  76. <area href="class_bounce.html" title="The Debouncer:Bounce class. Links the Deboucing class to a hardware pin. " alt="Bounce" shape="rect" coords="0,56,75,80"/>
  77. <area href="class_debouncer.html" title="The Debouce class. Just the deboucing code separated from all harware. " alt="Debouncer" shape="rect" coords="0,0,75,24"/>
  78. </map>
  79. </div></div>
  80. <table class="memberdecls">
  81. <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
  82. Public Member Functions</h2></td></tr>
  83. <tr class="memitem:a3b36df1ae23c58aedb9e15a713159459"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_button.html#a3b36df1ae23c58aedb9e15a713159459">Button</a> ()</td></tr>
  84. <tr class="memdesc:a3b36df1ae23c58aedb9e15a713159459"><td class="mdescLeft">&#160;</td><td class="mdescRight">Create an instance of the <a class="el" href="class_button.html" title="The Debouncer:Bounce:Button class. The Button class matches an electrical state to a physical action...">Button</a> class. By default, the pressed state is matched to a HIGH electrical level. <a href="#a3b36df1ae23c58aedb9e15a713159459">More...</a><br /></td></tr>
  85. <tr class="separator:a3b36df1ae23c58aedb9e15a713159459"><td class="memSeparator" colspan="2">&#160;</td></tr>
  86. <tr class="memitem:aa58da793c244339b781349cf9af544d5"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_button.html#aa58da793c244339b781349cf9af544d5">setPressedState</a> (bool state)</td></tr>
  87. <tr class="memdesc:aa58da793c244339b781349cf9af544d5"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set the electrical state (HIGH/LOW) that corresponds to a physical press. By default, the pressed state is matched to a HIGH electrical level. <a href="#aa58da793c244339b781349cf9af544d5">More...</a><br /></td></tr>
  88. <tr class="separator:aa58da793c244339b781349cf9af544d5"><td class="memSeparator" colspan="2">&#160;</td></tr>
  89. <tr class="memitem:a8e37fb754907685539ea71183204b033"><td class="memItemLeft" align="right" valign="top"><a id="a8e37fb754907685539ea71183204b033"></a>
  90. bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_button.html#a8e37fb754907685539ea71183204b033">pressed</a> ()</td></tr>
  91. <tr class="memdesc:a8e37fb754907685539ea71183204b033"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns true if the button was physically pressed. <br /></td></tr>
  92. <tr class="separator:a8e37fb754907685539ea71183204b033"><td class="memSeparator" colspan="2">&#160;</td></tr>
  93. <tr class="memitem:a0b3d2033eb8a6e93141e0b2d8375e9dd"><td class="memItemLeft" align="right" valign="top"><a id="a0b3d2033eb8a6e93141e0b2d8375e9dd"></a>
  94. bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_button.html#a0b3d2033eb8a6e93141e0b2d8375e9dd">released</a> ()</td></tr>
  95. <tr class="memdesc:a0b3d2033eb8a6e93141e0b2d8375e9dd"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns true if the button was physically released. <br /></td></tr>
  96. <tr class="separator:a0b3d2033eb8a6e93141e0b2d8375e9dd"><td class="memSeparator" colspan="2">&#160;</td></tr>
  97. <tr class="inherit_header pub_methods_class_bounce"><td colspan="2" onclick="javascript:toggleInherit('pub_methods_class_bounce')"><img src="closed.png" alt="-"/>&#160;Public Member Functions inherited from <a class="el" href="class_bounce.html">Bounce</a></td></tr>
  98. <tr class="memitem:aa62a2e2b5ad0ee6913a95f2f2a0e7606 inherit pub_methods_class_bounce"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_bounce.html#aa62a2e2b5ad0ee6913a95f2f2a0e7606">Bounce</a> ()</td></tr>
  99. <tr class="memdesc:aa62a2e2b5ad0ee6913a95f2f2a0e7606 inherit pub_methods_class_bounce"><td class="mdescLeft">&#160;</td><td class="mdescRight">Create an instance of the <a class="el" href="class_bounce.html" title="The Debouncer:Bounce class. Links the Deboucing class to a hardware pin. ">Bounce</a> class. <a href="class_bounce.html#aa62a2e2b5ad0ee6913a95f2f2a0e7606">More...</a><br /></td></tr>
  100. <tr class="separator:aa62a2e2b5ad0ee6913a95f2f2a0e7606 inherit pub_methods_class_bounce"><td class="memSeparator" colspan="2">&#160;</td></tr>
  101. <tr class="memitem:aba08e592941465d033e3eba3dde66eaf inherit pub_methods_class_bounce"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_bounce.html#aba08e592941465d033e3eba3dde66eaf">attach</a> (int <a class="el" href="class_bounce.html#a1cb79cb0ba2379cd12cc7c098d97053a">pin</a>, int mode)</td></tr>
  102. <tr class="memdesc:aba08e592941465d033e3eba3dde66eaf inherit pub_methods_class_bounce"><td class="mdescLeft">&#160;</td><td class="mdescRight">Attach to a pin and sets that pin's mode (INPUT, INPUT_PULLUP or OUTPUT). <a href="class_bounce.html#aba08e592941465d033e3eba3dde66eaf">More...</a><br /></td></tr>
  103. <tr class="separator:aba08e592941465d033e3eba3dde66eaf inherit pub_methods_class_bounce"><td class="memSeparator" colspan="2">&#160;</td></tr>
  104. <tr class="memitem:a163477dbcbaf1a3dee6cb3b62eedf09e inherit pub_methods_class_bounce"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_bounce.html#a163477dbcbaf1a3dee6cb3b62eedf09e">attach</a> (int <a class="el" href="class_bounce.html#a1cb79cb0ba2379cd12cc7c098d97053a">pin</a>)</td></tr>
  105. <tr class="separator:a163477dbcbaf1a3dee6cb3b62eedf09e inherit pub_methods_class_bounce"><td class="memSeparator" colspan="2">&#160;</td></tr>
  106. <tr class="memitem:ab34517094faf21d4f38b36da2915132b inherit pub_methods_class_bounce"><td class="memItemLeft" align="right" valign="top"><a id="ab34517094faf21d4f38b36da2915132b"></a>
  107. &#160;</td><td class="memItemRight" valign="bottom"><b>Bounce</b> (uint8_t <a class="el" href="class_bounce.html#a1cb79cb0ba2379cd12cc7c098d97053a">pin</a>, unsigned long interval_millis)</td></tr>
  108. <tr class="separator:ab34517094faf21d4f38b36da2915132b inherit pub_methods_class_bounce"><td class="memSeparator" colspan="2">&#160;</td></tr>
  109. <tr class="memitem:a3417beb80eb6593d768c2e9884c57aa0 inherit pub_methods_class_bounce"><td class="memItemLeft" align="right" valign="top"><a id="a3417beb80eb6593d768c2e9884c57aa0"></a>
  110. bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_bounce.html#a3417beb80eb6593d768c2e9884c57aa0">risingEdge</a> ()</td></tr>
  111. <tr class="memdesc:a3417beb80eb6593d768c2e9884c57aa0 inherit pub_methods_class_bounce"><td class="mdescLeft">&#160;</td><td class="mdescRight">Deprecated (i.e. do not use). Included for partial compatibility for programs written with <a class="el" href="class_bounce.html" title="The Debouncer:Bounce class. Links the Deboucing class to a hardware pin. ">Bounce</a> version 1. <br /></td></tr>
  112. <tr class="separator:a3417beb80eb6593d768c2e9884c57aa0 inherit pub_methods_class_bounce"><td class="memSeparator" colspan="2">&#160;</td></tr>
  113. <tr class="memitem:ac756559419bfa1c5060e5e4a4ad6406f inherit pub_methods_class_bounce"><td class="memItemLeft" align="right" valign="top"><a id="ac756559419bfa1c5060e5e4a4ad6406f"></a>
  114. bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_bounce.html#ac756559419bfa1c5060e5e4a4ad6406f">fallingEdge</a> ()</td></tr>
  115. <tr class="memdesc:ac756559419bfa1c5060e5e4a4ad6406f inherit pub_methods_class_bounce"><td class="mdescLeft">&#160;</td><td class="mdescRight">Deprecated (i.e. do not use). Included for partial compatibility for programs written with <a class="el" href="class_bounce.html" title="The Debouncer:Bounce class. Links the Deboucing class to a hardware pin. ">Bounce</a> version 1. <br /></td></tr>
  116. <tr class="separator:ac756559419bfa1c5060e5e4a4ad6406f inherit pub_methods_class_bounce"><td class="memSeparator" colspan="2">&#160;</td></tr>
  117. <tr class="inherit_header pub_methods_class_debouncer"><td colspan="2" onclick="javascript:toggleInherit('pub_methods_class_debouncer')"><img src="closed.png" alt="-"/>&#160;Public Member Functions inherited from <a class="el" href="class_debouncer.html">Debouncer</a></td></tr>
  118. <tr class="memitem:a34c46ca04d4178933cc0049436d10fe6 inherit pub_methods_class_debouncer"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_debouncer.html#a34c46ca04d4178933cc0049436d10fe6">Debouncer</a> ()</td></tr>
  119. <tr class="memdesc:a34c46ca04d4178933cc0049436d10fe6 inherit pub_methods_class_debouncer"><td class="mdescLeft">&#160;</td><td class="mdescRight">Create an instance of the Debounce class. <a href="class_debouncer.html#a34c46ca04d4178933cc0049436d10fe6">More...</a><br /></td></tr>
  120. <tr class="separator:a34c46ca04d4178933cc0049436d10fe6 inherit pub_methods_class_debouncer"><td class="memSeparator" colspan="2">&#160;</td></tr>
  121. <tr class="memitem:a930bf3945e698d77b889f6309079857d inherit pub_methods_class_debouncer"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_debouncer.html#a930bf3945e698d77b889f6309079857d">interval</a> (uint16_t interval_millis)</td></tr>
  122. <tr class="memdesc:a930bf3945e698d77b889f6309079857d inherit pub_methods_class_debouncer"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the debounce interval in milliseconds. <a href="class_debouncer.html#a930bf3945e698d77b889f6309079857d">More...</a><br /></td></tr>
  123. <tr class="separator:a930bf3945e698d77b889f6309079857d inherit pub_methods_class_debouncer"><td class="memSeparator" colspan="2">&#160;</td></tr>
  124. <tr class="memitem:a72f3e8d483555031d2ac21b0b7702c06 inherit pub_methods_class_debouncer"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_debouncer.html#a72f3e8d483555031d2ac21b0b7702c06">update</a> ()</td></tr>
  125. <tr class="memdesc:a72f3e8d483555031d2ac21b0b7702c06 inherit pub_methods_class_debouncer"><td class="mdescLeft">&#160;</td><td class="mdescRight">Updates the pin's state. <a href="class_debouncer.html#a72f3e8d483555031d2ac21b0b7702c06">More...</a><br /></td></tr>
  126. <tr class="separator:a72f3e8d483555031d2ac21b0b7702c06 inherit pub_methods_class_debouncer"><td class="memSeparator" colspan="2">&#160;</td></tr>
  127. <tr class="memitem:a2cae68910c19c778507f257842fc41bf inherit pub_methods_class_debouncer"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_debouncer.html#a2cae68910c19c778507f257842fc41bf">read</a> ()</td></tr>
  128. <tr class="memdesc:a2cae68910c19c778507f257842fc41bf inherit pub_methods_class_debouncer"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the pin's state (HIGH or LOW). <a href="class_debouncer.html#a2cae68910c19c778507f257842fc41bf">More...</a><br /></td></tr>
  129. <tr class="separator:a2cae68910c19c778507f257842fc41bf inherit pub_methods_class_debouncer"><td class="memSeparator" colspan="2">&#160;</td></tr>
  130. <tr class="memitem:a1ef5a04b4ebe97352ff3bb227476035c inherit pub_methods_class_debouncer"><td class="memItemLeft" align="right" valign="top"><a id="a1ef5a04b4ebe97352ff3bb227476035c"></a>
  131. bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_debouncer.html#a1ef5a04b4ebe97352ff3bb227476035c">fell</a> ()</td></tr>
  132. <tr class="memdesc:a1ef5a04b4ebe97352ff3bb227476035c inherit pub_methods_class_debouncer"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns true if pin signal transitions from high to low. <br /></td></tr>
  133. <tr class="separator:a1ef5a04b4ebe97352ff3bb227476035c inherit pub_methods_class_debouncer"><td class="memSeparator" colspan="2">&#160;</td></tr>
  134. <tr class="memitem:a9990de6fa7256842c35c246d7dea8dbb inherit pub_methods_class_debouncer"><td class="memItemLeft" align="right" valign="top"><a id="a9990de6fa7256842c35c246d7dea8dbb"></a>
  135. bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_debouncer.html#a9990de6fa7256842c35c246d7dea8dbb">rose</a> ()</td></tr>
  136. <tr class="memdesc:a9990de6fa7256842c35c246d7dea8dbb inherit pub_methods_class_debouncer"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns true if pin signal transitions from low to high. <br /></td></tr>
  137. <tr class="separator:a9990de6fa7256842c35c246d7dea8dbb inherit pub_methods_class_debouncer"><td class="memSeparator" colspan="2">&#160;</td></tr>
  138. <tr class="memitem:a47c83f13a03920d21fbfafd8469ec06b inherit pub_methods_class_debouncer"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_debouncer.html#a47c83f13a03920d21fbfafd8469ec06b">changed</a> ()</td></tr>
  139. <tr class="memdesc:a47c83f13a03920d21fbfafd8469ec06b inherit pub_methods_class_debouncer"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns true if the state changed on last update. <a href="class_debouncer.html#a47c83f13a03920d21fbfafd8469ec06b">More...</a><br /></td></tr>
  140. <tr class="separator:a47c83f13a03920d21fbfafd8469ec06b inherit pub_methods_class_debouncer"><td class="memSeparator" colspan="2">&#160;</td></tr>
  141. <tr class="memitem:a462994f1f9a20876b2ee239eeee97448 inherit pub_methods_class_debouncer"><td class="memItemLeft" align="right" valign="top">unsigned long&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_debouncer.html#a462994f1f9a20876b2ee239eeee97448">duration</a> ()</td></tr>
  142. <tr class="memdesc:a462994f1f9a20876b2ee239eeee97448 inherit pub_methods_class_debouncer"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the duration in milliseconds of the current state. <a href="class_debouncer.html#a462994f1f9a20876b2ee239eeee97448">More...</a><br /></td></tr>
  143. <tr class="separator:a462994f1f9a20876b2ee239eeee97448 inherit pub_methods_class_debouncer"><td class="memSeparator" colspan="2">&#160;</td></tr>
  144. <tr class="memitem:a89ab95e7ac24874bb8cb684dc36a98b9 inherit pub_methods_class_debouncer"><td class="memItemLeft" align="right" valign="top">unsigned long&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_debouncer.html#a89ab95e7ac24874bb8cb684dc36a98b9">previousDuration</a> ()</td></tr>
  145. <tr class="memdesc:a89ab95e7ac24874bb8cb684dc36a98b9 inherit pub_methods_class_debouncer"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the duration in milliseconds of the previous state. <a href="class_debouncer.html#a89ab95e7ac24874bb8cb684dc36a98b9">More...</a><br /></td></tr>
  146. <tr class="separator:a89ab95e7ac24874bb8cb684dc36a98b9 inherit pub_methods_class_debouncer"><td class="memSeparator" colspan="2">&#160;</td></tr>
  147. </table><table class="memberdecls">
  148. <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pro-attribs"></a>
  149. Protected Attributes</h2></td></tr>
  150. <tr class="memitem:ac7dd76476b2b7b40950c05925093247d"><td class="memItemLeft" align="right" valign="top"><a id="ac7dd76476b2b7b40950c05925093247d"></a>
  151. bool&#160;</td><td class="memItemRight" valign="bottom"><b>stateForPressed</b> = 1</td></tr>
  152. <tr class="separator:ac7dd76476b2b7b40950c05925093247d"><td class="memSeparator" colspan="2">&#160;</td></tr>
  153. <tr class="inherit_header pro_attribs_class_bounce"><td colspan="2" onclick="javascript:toggleInherit('pro_attribs_class_bounce')"><img src="closed.png" alt="-"/>&#160;Protected Attributes inherited from <a class="el" href="class_bounce.html">Bounce</a></td></tr>
  154. <tr class="memitem:a1cb79cb0ba2379cd12cc7c098d97053a inherit pro_attribs_class_bounce"><td class="memItemLeft" align="right" valign="top"><a id="a1cb79cb0ba2379cd12cc7c098d97053a"></a>
  155. uint8_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_bounce.html#a1cb79cb0ba2379cd12cc7c098d97053a">pin</a></td></tr>
  156. <tr class="memdesc:a1cb79cb0ba2379cd12cc7c098d97053a inherit pro_attribs_class_bounce"><td class="mdescLeft">&#160;</td><td class="mdescRight">Deprecated (i.e. do not use). Included for partial compatibility for programs written with <a class="el" href="class_bounce.html" title="The Debouncer:Bounce class. Links the Deboucing class to a hardware pin. ">Bounce</a> version 1. <br /></td></tr>
  157. <tr class="separator:a1cb79cb0ba2379cd12cc7c098d97053a inherit pro_attribs_class_bounce"><td class="memSeparator" colspan="2">&#160;</td></tr>
  158. <tr class="inherit_header pro_attribs_class_debouncer"><td colspan="2" onclick="javascript:toggleInherit('pro_attribs_class_debouncer')"><img src="closed.png" alt="-"/>&#160;Protected Attributes inherited from <a class="el" href="class_debouncer.html">Debouncer</a></td></tr>
  159. <tr class="memitem:afab369aec42a15595ebac695a088cccd inherit pro_attribs_class_debouncer"><td class="memItemLeft" align="right" valign="top"><a id="afab369aec42a15595ebac695a088cccd"></a>
  160. unsigned long&#160;</td><td class="memItemRight" valign="bottom"><b>previous_millis</b></td></tr>
  161. <tr class="separator:afab369aec42a15595ebac695a088cccd inherit pro_attribs_class_debouncer"><td class="memSeparator" colspan="2">&#160;</td></tr>
  162. <tr class="memitem:a25f000f08b3291f80154ec620abfe52a inherit pro_attribs_class_debouncer"><td class="memItemLeft" align="right" valign="top"><a id="a25f000f08b3291f80154ec620abfe52a"></a>
  163. uint16_t&#160;</td><td class="memItemRight" valign="bottom"><b>interval_millis</b></td></tr>
  164. <tr class="separator:a25f000f08b3291f80154ec620abfe52a inherit pro_attribs_class_debouncer"><td class="memSeparator" colspan="2">&#160;</td></tr>
  165. <tr class="memitem:a50b7f921222452bf7328ad84d09c15af inherit pro_attribs_class_debouncer"><td class="memItemLeft" align="right" valign="top"><a id="a50b7f921222452bf7328ad84d09c15af"></a>
  166. uint8_t&#160;</td><td class="memItemRight" valign="bottom"><b>state</b></td></tr>
  167. <tr class="separator:a50b7f921222452bf7328ad84d09c15af inherit pro_attribs_class_debouncer"><td class="memSeparator" colspan="2">&#160;</td></tr>
  168. <tr class="memitem:a1bcf1b5c2a67b6409fea2e8705bcab57 inherit pro_attribs_class_debouncer"><td class="memItemLeft" align="right" valign="top"><a id="a1bcf1b5c2a67b6409fea2e8705bcab57"></a>
  169. unsigned long&#160;</td><td class="memItemRight" valign="bottom"><b>stateChangeLastTime</b></td></tr>
  170. <tr class="separator:a1bcf1b5c2a67b6409fea2e8705bcab57 inherit pro_attribs_class_debouncer"><td class="memSeparator" colspan="2">&#160;</td></tr>
  171. <tr class="memitem:adbe8de6a1cfff329629e9136a4efea6c inherit pro_attribs_class_debouncer"><td class="memItemLeft" align="right" valign="top"><a id="adbe8de6a1cfff329629e9136a4efea6c"></a>
  172. unsigned long&#160;</td><td class="memItemRight" valign="bottom"><b>durationOfPreviousState</b></td></tr>
  173. <tr class="separator:adbe8de6a1cfff329629e9136a4efea6c inherit pro_attribs_class_debouncer"><td class="memSeparator" colspan="2">&#160;</td></tr>
  174. </table><table class="memberdecls">
  175. <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="inherited"></a>
  176. Additional Inherited Members</h2></td></tr>
  177. <tr class="inherit_header pro_methods_class_bounce"><td colspan="2" onclick="javascript:toggleInherit('pro_methods_class_bounce')"><img src="closed.png" alt="-"/>&#160;Protected Member Functions inherited from <a class="el" href="class_bounce.html">Bounce</a></td></tr>
  178. <tr class="memitem:ad6efc6dd65035de20f015cc44be37873 inherit pro_methods_class_bounce"><td class="memItemLeft" align="right" valign="top"><a id="ad6efc6dd65035de20f015cc44be37873"></a>
  179. virtual bool&#160;</td><td class="memItemRight" valign="bottom"><b>readCurrentState</b> ()</td></tr>
  180. <tr class="separator:ad6efc6dd65035de20f015cc44be37873 inherit pro_methods_class_bounce"><td class="memSeparator" colspan="2">&#160;</td></tr>
  181. <tr class="memitem:a231a992bf2a1f4521043068e35eb50a6 inherit pro_methods_class_bounce"><td class="memItemLeft" align="right" valign="top"><a id="a231a992bf2a1f4521043068e35eb50a6"></a>
  182. virtual void&#160;</td><td class="memItemRight" valign="bottom"><b>setPinMode</b> (int <a class="el" href="class_bounce.html#a1cb79cb0ba2379cd12cc7c098d97053a">pin</a>, int mode)</td></tr>
  183. <tr class="separator:a231a992bf2a1f4521043068e35eb50a6 inherit pro_methods_class_bounce"><td class="memSeparator" colspan="2">&#160;</td></tr>
  184. <tr class="inherit_header pro_methods_class_debouncer"><td colspan="2" onclick="javascript:toggleInherit('pro_methods_class_debouncer')"><img src="closed.png" alt="-"/>&#160;Protected Member Functions inherited from <a class="el" href="class_debouncer.html">Debouncer</a></td></tr>
  185. <tr class="memitem:a38f85f1c1819a5634d93565e0459117b inherit pro_methods_class_debouncer"><td class="memItemLeft" align="right" valign="top"><a id="a38f85f1c1819a5634d93565e0459117b"></a>
  186. void&#160;</td><td class="memItemRight" valign="bottom"><b>begin</b> ()</td></tr>
  187. <tr class="separator:a38f85f1c1819a5634d93565e0459117b inherit pro_methods_class_debouncer"><td class="memSeparator" colspan="2">&#160;</td></tr>
  188. </table>
  189. <a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
  190. <div class="textblock"><p>The Debouncer:Bounce:<a class="el" href="class_button.html" title="The Debouncer:Bounce:Button class. The Button class matches an electrical state to a physical action...">Button</a> class. The <a class="el" href="class_button.html" title="The Debouncer:Bounce:Button class. The Button class matches an electrical state to a physical action...">Button</a> class matches an electrical state to a physical action. </p>
  191. </div><h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
  192. <a id="a3b36df1ae23c58aedb9e15a713159459"></a>
  193. <h2 class="memtitle"><span class="permalink"><a href="#a3b36df1ae23c58aedb9e15a713159459">&#9670;&nbsp;</a></span>Button()</h2>
  194. <div class="memitem">
  195. <div class="memproto">
  196. <table class="mlabels">
  197. <tr>
  198. <td class="mlabels-left">
  199. <table class="memname">
  200. <tr>
  201. <td class="memname">Button::Button </td>
  202. <td>(</td>
  203. <td class="paramname"></td><td>)</td>
  204. <td></td>
  205. </tr>
  206. </table>
  207. </td>
  208. <td class="mlabels-right">
  209. <span class="mlabels"><span class="mlabel">inline</span></span> </td>
  210. </tr>
  211. </table>
  212. </div><div class="memdoc">
  213. <p>Create an instance of the <a class="el" href="class_button.html" title="The Debouncer:Bounce:Button class. The Button class matches an electrical state to a physical action...">Button</a> class. By default, the pressed state is matched to a HIGH electrical level. </p>
  214. <div class="fragment"><div class="line"><span class="comment">// Create an instance of the Button class.</span></div><div class="line"><a class="code" href="class_button.html#a3b36df1ae23c58aedb9e15a713159459">Button</a>() button;</div></div><!-- fragment -->
  215. </div>
  216. </div>
  217. <h2 class="groupheader">Member Function Documentation</h2>
  218. <a id="aa58da793c244339b781349cf9af544d5"></a>
  219. <h2 class="memtitle"><span class="permalink"><a href="#aa58da793c244339b781349cf9af544d5">&#9670;&nbsp;</a></span>setPressedState()</h2>
  220. <div class="memitem">
  221. <div class="memproto">
  222. <table class="mlabels">
  223. <tr>
  224. <td class="mlabels-left">
  225. <table class="memname">
  226. <tr>
  227. <td class="memname">void Button::setPressedState </td>
  228. <td>(</td>
  229. <td class="paramtype">bool&#160;</td>
  230. <td class="paramname"><em>state</em></td><td>)</td>
  231. <td></td>
  232. </tr>
  233. </table>
  234. </td>
  235. <td class="mlabels-right">
  236. <span class="mlabels"><span class="mlabel">inline</span></span> </td>
  237. </tr>
  238. </table>
  239. </div><div class="memdoc">
  240. <p>Set the electrical state (HIGH/LOW) that corresponds to a physical press. By default, the pressed state is matched to a HIGH electrical level. </p>
  241. <dl class="params"><dt>Parameters</dt><dd>
  242. <table class="params">
  243. <tr><td class="paramname">state</td><td>The electrical state (HIGH/LOW) that corresponds to a physical press. </td></tr>
  244. </table>
  245. </dd>
  246. </dl>
  247. </div>
  248. </div>
  249. <hr/>The documentation for this class was generated from the following file:<ul>
  250. <li>src/<a class="el" href="_bounce2_8h_source.html">Bounce2.h</a></li>
  251. </ul>
  252. </div><!-- contents -->
  253. <!-- start footer part -->
  254. <hr class="footer"/><address class="footer"><small>
  255. Generated by &#160;<a href="http://www.doxygen.org/index.html">
  256. <img class="footer" src="doxygen.png" alt="doxygen"/>
  257. </a> 1.8.13
  258. </small></address>
  259. </body>
  260. </html>