class_bounce2_1_1_button.html 30 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://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.17"/>
  7. <meta name="viewport" content="width=device-width, initial-scale=1"/>
  8. <title>Bounce2: 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.17 -->
  33. <script type="text/javascript">
  34. /* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
  35. var searchBox = new SearchBox("searchBox", "search",false,'Search');
  36. /* @license-end */
  37. </script>
  38. <script type="text/javascript" src="menudata.js"></script>
  39. <script type="text/javascript" src="menu.js"></script>
  40. <script type="text/javascript">
  41. /* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
  42. $(function() {
  43. initMenu('',true,false,'search.php','Search');
  44. $(document).ready(function() { init_search(); });
  45. });
  46. /* @license-end */</script>
  47. <div id="main-nav"></div>
  48. <!-- window showing the filter options -->
  49. <div id="MSearchSelectWindow"
  50. onmouseover="return searchBox.OnSearchSelectShow()"
  51. onmouseout="return searchBox.OnSearchSelectHide()"
  52. onkeydown="return searchBox.OnSearchSelectKey(event)">
  53. </div>
  54. <!-- iframe showing the search results (closed by default) -->
  55. <div id="MSearchResultsWindow">
  56. <iframe src="javascript:void(0)" frameborder="0"
  57. name="MSearchResults" id="MSearchResults">
  58. </iframe>
  59. </div>
  60. <div id="nav-path" class="navpath">
  61. <ul>
  62. <li class="navelem"><a class="el" href="namespace_bounce2.html">Bounce2</a></li><li class="navelem"><a class="el" href="class_bounce2_1_1_button.html">Button</a></li> </ul>
  63. </div>
  64. </div><!-- top -->
  65. <div class="header">
  66. <div class="summary">
  67. <a href="#pub-methods">Public Member Functions</a> &#124;
  68. <a href="#pro-attribs">Protected Attributes</a> &#124;
  69. <a href="class_bounce2_1_1_button-members.html">List of all members</a> </div>
  70. <div class="headertitle">
  71. <div class="title">Bounce2::Button Class Reference</div> </div>
  72. </div><!--header-->
  73. <div class="contents">
  74. <div class="dynheader">
  75. Inheritance diagram for Bounce2::Button:</div>
  76. <div class="dyncontent">
  77. <div class="center">
  78. <img src="class_bounce2_1_1_button.png" usemap="#Bounce2::Button_map" alt=""/>
  79. <map id="Bounce2::Button_map" name="Bounce2::Button_map">
  80. <area href="class_bounce.html" title="The Debouncer:Bounce class. Links the Deboucing class to a hardware pin. This class is odly named,..." alt="Bounce" shape="rect" coords="0,56,103,80"/>
  81. <area href="class_debouncer.html" title="The Debouce class. Just the deboucing code separated from all harware." alt="Debouncer" shape="rect" coords="0,0,103,24"/>
  82. </map>
  83. </div></div>
  84. <table class="memberdecls">
  85. <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
  86. Public Member Functions</h2></td></tr>
  87. <tr class="memitem:a18710b645862d2b8f058a73aabbaf7ad"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_bounce2_1_1_button.html#a18710b645862d2b8f058a73aabbaf7ad">Button</a> ()</td></tr>
  88. <tr class="memdesc:a18710b645862d2b8f058a73aabbaf7ad"><td class="mdescLeft">&#160;</td><td class="mdescRight">Create an instance of the <a class="el" href="class_bounce2_1_1_button.html">Button</a> class. By default, the pressed state is matched to a HIGH electrical level. <a href="class_bounce2_1_1_button.html#a18710b645862d2b8f058a73aabbaf7ad">More...</a><br /></td></tr>
  89. <tr class="separator:a18710b645862d2b8f058a73aabbaf7ad"><td class="memSeparator" colspan="2">&#160;</td></tr>
  90. <tr class="memitem:a3c88b7938b26bca9dc2c7e72aedc442e"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_bounce2_1_1_button.html#a3c88b7938b26bca9dc2c7e72aedc442e">setPressedState</a> (bool state)</td></tr>
  91. <tr class="memdesc:a3c88b7938b26bca9dc2c7e72aedc442e"><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="class_bounce2_1_1_button.html#a3c88b7938b26bca9dc2c7e72aedc442e">More...</a><br /></td></tr>
  92. <tr class="separator:a3c88b7938b26bca9dc2c7e72aedc442e"><td class="memSeparator" colspan="2">&#160;</td></tr>
  93. <tr class="memitem:a1f90c647e0c75d243cdafed16c6eb28c"><td class="memItemLeft" align="right" valign="top"><a id="a1f90c647e0c75d243cdafed16c6eb28c"></a>
  94. bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_bounce2_1_1_button.html#a1f90c647e0c75d243cdafed16c6eb28c">getPressedState</a> () const</td></tr>
  95. <tr class="memdesc:a1f90c647e0c75d243cdafed16c6eb28c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the electrical state (HIGH/LOW) that corresponds to a physical press. <br /></td></tr>
  96. <tr class="separator:a1f90c647e0c75d243cdafed16c6eb28c"><td class="memSeparator" colspan="2">&#160;</td></tr>
  97. <tr class="memitem:a73c7c9ef574afe8bf1a9f3eb492bfa7f"><td class="memItemLeft" align="right" valign="top"><a id="a73c7c9ef574afe8bf1a9f3eb492bfa7f"></a>
  98. bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_bounce2_1_1_button.html#a73c7c9ef574afe8bf1a9f3eb492bfa7f">isPressed</a> () const</td></tr>
  99. <tr class="memdesc:a73c7c9ef574afe8bf1a9f3eb492bfa7f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns true if the button is currently physically pressed. <br /></td></tr>
  100. <tr class="separator:a73c7c9ef574afe8bf1a9f3eb492bfa7f"><td class="memSeparator" colspan="2">&#160;</td></tr>
  101. <tr class="memitem:a61541ae21354cb7f5cc5bc8c05db59dd"><td class="memItemLeft" align="right" valign="top"><a id="a61541ae21354cb7f5cc5bc8c05db59dd"></a>
  102. bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_bounce2_1_1_button.html#a61541ae21354cb7f5cc5bc8c05db59dd">pressed</a> () const</td></tr>
  103. <tr class="memdesc:a61541ae21354cb7f5cc5bc8c05db59dd"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns true if the button was physically pressed <br />
  104. <br /></td></tr>
  105. <tr class="separator:a61541ae21354cb7f5cc5bc8c05db59dd"><td class="memSeparator" colspan="2">&#160;</td></tr>
  106. <tr class="memitem:ae9bc1365cf132e57feda6dff112edbad"><td class="memItemLeft" align="right" valign="top"><a id="ae9bc1365cf132e57feda6dff112edbad"></a>
  107. bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_bounce2_1_1_button.html#ae9bc1365cf132e57feda6dff112edbad">released</a> () const</td></tr>
  108. <tr class="memdesc:ae9bc1365cf132e57feda6dff112edbad"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns true if the button was physically released <br />
  109. <br /></td></tr>
  110. <tr class="separator:ae9bc1365cf132e57feda6dff112edbad"><td class="memSeparator" colspan="2">&#160;</td></tr>
  111. <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>
  112. <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>
  113. <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. This class is odly named,...">Bounce</a> class. <a href="class_bounce.html#aa62a2e2b5ad0ee6913a95f2f2a0e7606">More...</a><br /></td></tr>
  114. <tr class="separator:aa62a2e2b5ad0ee6913a95f2f2a0e7606 inherit pub_methods_class_bounce"><td class="memSeparator" colspan="2">&#160;</td></tr>
  115. <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>
  116. <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>
  117. <tr class="separator:aba08e592941465d033e3eba3dde66eaf inherit pub_methods_class_bounce"><td class="memSeparator" colspan="2">&#160;</td></tr>
  118. <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>
  119. <tr class="separator:a163477dbcbaf1a3dee6cb3b62eedf09e inherit pub_methods_class_bounce"><td class="memSeparator" colspan="2">&#160;</td></tr>
  120. <tr class="memitem:ab34517094faf21d4f38b36da2915132b inherit pub_methods_class_bounce"><td class="memItemLeft" align="right" valign="top"><a id="ab34517094faf21d4f38b36da2915132b"></a>
  121. &#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>
  122. <tr class="separator:ab34517094faf21d4f38b36da2915132b inherit pub_methods_class_bounce"><td class="memSeparator" colspan="2">&#160;</td></tr>
  123. <tr class="memitem:a114878745aa1f29d3c0c293538280646 inherit pub_methods_class_bounce"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_bounce.html#a114878745aa1f29d3c0c293538280646">getPin</a> () const</td></tr>
  124. <tr class="memdesc:a114878745aa1f29d3c0c293538280646 inherit pub_methods_class_bounce"><td class="mdescLeft">&#160;</td><td class="mdescRight">Return pin that this <a class="el" href="class_bounce.html" title="The Debouncer:Bounce class. Links the Deboucing class to a hardware pin. This class is odly named,...">Bounce</a> is attached to. <a href="class_bounce.html#a114878745aa1f29d3c0c293538280646">More...</a><br /></td></tr>
  125. <tr class="separator:a114878745aa1f29d3c0c293538280646 inherit pub_methods_class_bounce"><td class="memSeparator" colspan="2">&#160;</td></tr>
  126. <tr class="memitem:adff02eed264355c2bf90d131768f84c2 inherit pub_methods_class_bounce"><td class="memItemLeft" align="right" valign="top"><a id="adff02eed264355c2bf90d131768f84c2"></a>
  127. bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_bounce.html#adff02eed264355c2bf90d131768f84c2">risingEdge</a> () const</td></tr>
  128. <tr class="memdesc:adff02eed264355c2bf90d131768f84c2 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. This class is odly named,...">Bounce</a> version 1. <br /></td></tr>
  129. <tr class="separator:adff02eed264355c2bf90d131768f84c2 inherit pub_methods_class_bounce"><td class="memSeparator" colspan="2">&#160;</td></tr>
  130. <tr class="memitem:a3ef5b85db62a7a7807f0050c86cc735f inherit pub_methods_class_bounce"><td class="memItemLeft" align="right" valign="top"><a id="a3ef5b85db62a7a7807f0050c86cc735f"></a>
  131. bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_bounce.html#a3ef5b85db62a7a7807f0050c86cc735f">fallingEdge</a> () const</td></tr>
  132. <tr class="memdesc:a3ef5b85db62a7a7807f0050c86cc735f 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. This class is odly named,...">Bounce</a> version 1. <br /></td></tr>
  133. <tr class="separator:a3ef5b85db62a7a7807f0050c86cc735f inherit pub_methods_class_bounce"><td class="memSeparator" colspan="2">&#160;</td></tr>
  134. <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>
  135. <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>
  136. <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>
  137. <tr class="separator:a34c46ca04d4178933cc0049436d10fe6 inherit pub_methods_class_debouncer"><td class="memSeparator" colspan="2">&#160;</td></tr>
  138. <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>
  139. <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>
  140. <tr class="separator:a930bf3945e698d77b889f6309079857d inherit pub_methods_class_debouncer"><td class="memSeparator" colspan="2">&#160;</td></tr>
  141. <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>
  142. <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>
  143. <tr class="separator:a72f3e8d483555031d2ac21b0b7702c06 inherit pub_methods_class_debouncer"><td class="memSeparator" colspan="2">&#160;</td></tr>
  144. <tr class="memitem:aa5fcde9156f700c362fd49af5dd92ecd 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#aa5fcde9156f700c362fd49af5dd92ecd">read</a> () const</td></tr>
  145. <tr class="memdesc:aa5fcde9156f700c362fd49af5dd92ecd 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#aa5fcde9156f700c362fd49af5dd92ecd">More...</a><br /></td></tr>
  146. <tr class="separator:aa5fcde9156f700c362fd49af5dd92ecd inherit pub_methods_class_debouncer"><td class="memSeparator" colspan="2">&#160;</td></tr>
  147. <tr class="memitem:a80315de311b855f9787b4b6d5b7899e0 inherit pub_methods_class_debouncer"><td class="memItemLeft" align="right" valign="top"><a id="a80315de311b855f9787b4b6d5b7899e0"></a>
  148. bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_debouncer.html#a80315de311b855f9787b4b6d5b7899e0">fell</a> () const</td></tr>
  149. <tr class="memdesc:a80315de311b855f9787b4b6d5b7899e0 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>
  150. <tr class="separator:a80315de311b855f9787b4b6d5b7899e0 inherit pub_methods_class_debouncer"><td class="memSeparator" colspan="2">&#160;</td></tr>
  151. <tr class="memitem:ab61244e043754ebdc7a156da1e1824bf inherit pub_methods_class_debouncer"><td class="memItemLeft" align="right" valign="top"><a id="ab61244e043754ebdc7a156da1e1824bf"></a>
  152. bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_debouncer.html#ab61244e043754ebdc7a156da1e1824bf">rose</a> () const</td></tr>
  153. <tr class="memdesc:ab61244e043754ebdc7a156da1e1824bf 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>
  154. <tr class="separator:ab61244e043754ebdc7a156da1e1824bf inherit pub_methods_class_debouncer"><td class="memSeparator" colspan="2">&#160;</td></tr>
  155. <tr class="memitem:a1bbd627f9d8809b5ee9e64e9fb21e248 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#a1bbd627f9d8809b5ee9e64e9fb21e248">changed</a> () const</td></tr>
  156. <tr class="memdesc:a1bbd627f9d8809b5ee9e64e9fb21e248 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#a1bbd627f9d8809b5ee9e64e9fb21e248">More...</a><br /></td></tr>
  157. <tr class="separator:a1bbd627f9d8809b5ee9e64e9fb21e248 inherit pub_methods_class_debouncer"><td class="memSeparator" colspan="2">&#160;</td></tr>
  158. <tr class="memitem:a883645ca26b4df6e5823586432104d11 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#a883645ca26b4df6e5823586432104d11">currentDuration</a> () const</td></tr>
  159. <tr class="memdesc:a883645ca26b4df6e5823586432104d11 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#a883645ca26b4df6e5823586432104d11">More...</a><br /></td></tr>
  160. <tr class="separator:a883645ca26b4df6e5823586432104d11 inherit pub_methods_class_debouncer"><td class="memSeparator" colspan="2">&#160;</td></tr>
  161. <tr class="memitem:ac6af22dc9c6ae84462fe356b7430659e 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#ac6af22dc9c6ae84462fe356b7430659e">previousDuration</a> () const</td></tr>
  162. <tr class="memdesc:ac6af22dc9c6ae84462fe356b7430659e 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#ac6af22dc9c6ae84462fe356b7430659e">More...</a><br /></td></tr>
  163. <tr class="separator:ac6af22dc9c6ae84462fe356b7430659e inherit pub_methods_class_debouncer"><td class="memSeparator" colspan="2">&#160;</td></tr>
  164. <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>
  165. <tr class="memdesc:a462994f1f9a20876b2ee239eeee97448 inherit pub_methods_class_debouncer"><td class="mdescLeft">&#160;</td><td class="mdescRight">DEPRECATED (i.e. do not use). Renamed <a class="el" href="class_debouncer.html#a883645ca26b4df6e5823586432104d11" title="Returns the duration in milliseconds of the current state.">currentDuration()</a>. <a href="class_debouncer.html#a462994f1f9a20876b2ee239eeee97448">More...</a><br /></td></tr>
  166. <tr class="separator:a462994f1f9a20876b2ee239eeee97448 inherit pub_methods_class_debouncer"><td class="memSeparator" colspan="2">&#160;</td></tr>
  167. </table><table class="memberdecls">
  168. <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pro-attribs"></a>
  169. Protected Attributes</h2></td></tr>
  170. <tr class="memitem:ad9d3ecd99e3c30bcf4c239f01fce3cc3"><td class="memItemLeft" align="right" valign="top"><a id="ad9d3ecd99e3c30bcf4c239f01fce3cc3"></a>
  171. bool&#160;</td><td class="memItemRight" valign="bottom"><b>stateForPressed</b> = 1</td></tr>
  172. <tr class="separator:ad9d3ecd99e3c30bcf4c239f01fce3cc3"><td class="memSeparator" colspan="2">&#160;</td></tr>
  173. <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>
  174. <tr class="memitem:a1cb79cb0ba2379cd12cc7c098d97053a inherit pro_attribs_class_bounce"><td class="memItemLeft" align="right" valign="top"><a id="a1cb79cb0ba2379cd12cc7c098d97053a"></a>
  175. uint8_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_bounce.html#a1cb79cb0ba2379cd12cc7c098d97053a">pin</a></td></tr>
  176. <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. This class is odly named,...">Bounce</a> version 1. <br /></td></tr>
  177. <tr class="separator:a1cb79cb0ba2379cd12cc7c098d97053a inherit pro_attribs_class_bounce"><td class="memSeparator" colspan="2">&#160;</td></tr>
  178. <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>
  179. <tr class="memitem:afab369aec42a15595ebac695a088cccd inherit pro_attribs_class_debouncer"><td class="memItemLeft" align="right" valign="top"><a id="afab369aec42a15595ebac695a088cccd"></a>
  180. unsigned long&#160;</td><td class="memItemRight" valign="bottom"><b>previous_millis</b></td></tr>
  181. <tr class="separator:afab369aec42a15595ebac695a088cccd inherit pro_attribs_class_debouncer"><td class="memSeparator" colspan="2">&#160;</td></tr>
  182. <tr class="memitem:a25f000f08b3291f80154ec620abfe52a inherit pro_attribs_class_debouncer"><td class="memItemLeft" align="right" valign="top"><a id="a25f000f08b3291f80154ec620abfe52a"></a>
  183. uint16_t&#160;</td><td class="memItemRight" valign="bottom"><b>interval_millis</b></td></tr>
  184. <tr class="separator:a25f000f08b3291f80154ec620abfe52a inherit pro_attribs_class_debouncer"><td class="memSeparator" colspan="2">&#160;</td></tr>
  185. <tr class="memitem:a50b7f921222452bf7328ad84d09c15af inherit pro_attribs_class_debouncer"><td class="memItemLeft" align="right" valign="top"><a id="a50b7f921222452bf7328ad84d09c15af"></a>
  186. uint8_t&#160;</td><td class="memItemRight" valign="bottom"><b>state</b></td></tr>
  187. <tr class="separator:a50b7f921222452bf7328ad84d09c15af inherit pro_attribs_class_debouncer"><td class="memSeparator" colspan="2">&#160;</td></tr>
  188. <tr class="memitem:a1bcf1b5c2a67b6409fea2e8705bcab57 inherit pro_attribs_class_debouncer"><td class="memItemLeft" align="right" valign="top"><a id="a1bcf1b5c2a67b6409fea2e8705bcab57"></a>
  189. unsigned long&#160;</td><td class="memItemRight" valign="bottom"><b>stateChangeLastTime</b></td></tr>
  190. <tr class="separator:a1bcf1b5c2a67b6409fea2e8705bcab57 inherit pro_attribs_class_debouncer"><td class="memSeparator" colspan="2">&#160;</td></tr>
  191. <tr class="memitem:adbe8de6a1cfff329629e9136a4efea6c inherit pro_attribs_class_debouncer"><td class="memItemLeft" align="right" valign="top"><a id="adbe8de6a1cfff329629e9136a4efea6c"></a>
  192. unsigned long&#160;</td><td class="memItemRight" valign="bottom"><b>durationOfPreviousState</b></td></tr>
  193. <tr class="separator:adbe8de6a1cfff329629e9136a4efea6c inherit pro_attribs_class_debouncer"><td class="memSeparator" colspan="2">&#160;</td></tr>
  194. </table><table class="memberdecls">
  195. <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="inherited"></a>
  196. Additional Inherited Members</h2></td></tr>
  197. <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>
  198. <tr class="memitem:ad6efc6dd65035de20f015cc44be37873 inherit pro_methods_class_bounce"><td class="memItemLeft" align="right" valign="top"><a id="ad6efc6dd65035de20f015cc44be37873"></a>
  199. virtual bool&#160;</td><td class="memItemRight" valign="bottom"><b>readCurrentState</b> ()</td></tr>
  200. <tr class="separator:ad6efc6dd65035de20f015cc44be37873 inherit pro_methods_class_bounce"><td class="memSeparator" colspan="2">&#160;</td></tr>
  201. <tr class="memitem:a231a992bf2a1f4521043068e35eb50a6 inherit pro_methods_class_bounce"><td class="memItemLeft" align="right" valign="top"><a id="a231a992bf2a1f4521043068e35eb50a6"></a>
  202. 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>
  203. <tr class="separator:a231a992bf2a1f4521043068e35eb50a6 inherit pro_methods_class_bounce"><td class="memSeparator" colspan="2">&#160;</td></tr>
  204. <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>
  205. <tr class="memitem:a38f85f1c1819a5634d93565e0459117b inherit pro_methods_class_debouncer"><td class="memItemLeft" align="right" valign="top"><a id="a38f85f1c1819a5634d93565e0459117b"></a>
  206. void&#160;</td><td class="memItemRight" valign="bottom"><b>begin</b> ()</td></tr>
  207. <tr class="separator:a38f85f1c1819a5634d93565e0459117b inherit pro_methods_class_debouncer"><td class="memSeparator" colspan="2">&#160;</td></tr>
  208. </table>
  209. <h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
  210. <a id="a18710b645862d2b8f058a73aabbaf7ad"></a>
  211. <h2 class="memtitle"><span class="permalink"><a href="#a18710b645862d2b8f058a73aabbaf7ad">&#9670;&nbsp;</a></span>Button()</h2>
  212. <div class="memitem">
  213. <div class="memproto">
  214. <table class="mlabels">
  215. <tr>
  216. <td class="mlabels-left">
  217. <table class="memname">
  218. <tr>
  219. <td class="memname">Bounce2::Button::Button </td>
  220. <td>(</td>
  221. <td class="paramname"></td><td>)</td>
  222. <td></td>
  223. </tr>
  224. </table>
  225. </td>
  226. <td class="mlabels-right">
  227. <span class="mlabels"><span class="mlabel">inline</span></span> </td>
  228. </tr>
  229. </table>
  230. </div><div class="memdoc">
  231. <p>Create an instance of the <a class="el" href="class_bounce2_1_1_button.html">Button</a> class. By default, the pressed state is matched to a HIGH electrical level. </p>
  232. <div class="fragment"><div class="line"><span class="comment">// Create an instance of the Button class.</span></div>
  233. <div class="line"><a class="code" href="class_bounce2_1_1_button.html#a18710b645862d2b8f058a73aabbaf7ad">Button</a>() button;</div>
  234. </div><!-- fragment -->
  235. </div>
  236. </div>
  237. <h2 class="groupheader">Member Function Documentation</h2>
  238. <a id="a3c88b7938b26bca9dc2c7e72aedc442e"></a>
  239. <h2 class="memtitle"><span class="permalink"><a href="#a3c88b7938b26bca9dc2c7e72aedc442e">&#9670;&nbsp;</a></span>setPressedState()</h2>
  240. <div class="memitem">
  241. <div class="memproto">
  242. <table class="mlabels">
  243. <tr>
  244. <td class="mlabels-left">
  245. <table class="memname">
  246. <tr>
  247. <td class="memname">void Bounce2::Button::setPressedState </td>
  248. <td>(</td>
  249. <td class="paramtype">bool&#160;</td>
  250. <td class="paramname"><em>state</em></td><td>)</td>
  251. <td></td>
  252. </tr>
  253. </table>
  254. </td>
  255. <td class="mlabels-right">
  256. <span class="mlabels"><span class="mlabel">inline</span></span> </td>
  257. </tr>
  258. </table>
  259. </div><div class="memdoc">
  260. <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>
  261. <dl class="params"><dt>Parameters</dt><dd>
  262. <table class="params">
  263. <tr><td class="paramname">state</td><td>The electrical state (HIGH/LOW) that corresponds to a physical press. </td></tr>
  264. </table>
  265. </dd>
  266. </dl>
  267. </div>
  268. </div>
  269. <hr/>The documentation for this class was generated from the following file:<ul>
  270. <li>src/<a class="el" href="_bounce2_8h_source.html">Bounce2.h</a></li>
  271. </ul>
  272. </div><!-- contents -->
  273. <div class="ttc" id="aclass_bounce2_1_1_button_html_a18710b645862d2b8f058a73aabbaf7ad"><div class="ttname"><a href="class_bounce2_1_1_button.html#a18710b645862d2b8f058a73aabbaf7ad">Bounce2::Button::Button</a></div><div class="ttdeci">Button()</div><div class="ttdoc">Create an instance of the Button class. By default, the pressed state is matched to a HIGH electrical...</div><div class="ttdef"><b>Definition:</b> Bounce2.h:290</div></div>
  274. <!-- start footer part -->
  275. <hr class="footer"/><address class="footer"><small>
  276. Generated by &#160;<a href="http://www.doxygen.org/index.html">
  277. <img class="footer" src="doxygen.png" alt="doxygen"/>
  278. </a> 1.8.17
  279. </small></address>
  280. </body>
  281. </html>