acid-drop/lib/AceButton/docs/html/ace__button_2AceButton_8h_source.html

105 lines
53 KiB
HTML
Raw Normal View History

2024-05-23 22:42:03 +00:00
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.13"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>AceButton: /home/brian/dev/AceButton/src/ace_button/AceButton.h Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">AceButton
&#160;<span id="projectnumber">1.3.3</span>
</div>
<div id="projectbrief">An adjustable, compact, event-driven button library for Arduino.</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.13 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
$(function() {
initMenu('',true,false,'search.php','Search');
$(document).ready(function() { init_search(); });
});
</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0"
name="MSearchResults" id="MSearchResults">
</iframe>
</div>
<div id="nav-path" class="navpath">
<ul>
<li class="navelem"><a class="el" href="dir_68267d1309a1af8e8297ef4c3efbcdba.html">src</a></li><li class="navelem"><a class="el" href="dir_ebbe9b537c0e01d975153fa119b09658.html">ace_button</a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="headertitle">
<div class="title">AceButton.h</div> </div>
</div><!--header-->
<div class="contents">
<div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno"> 1</span>&#160;<span class="comment">/*</span></div><div class="line"><a name="l00002"></a><span class="lineno"> 2</span>&#160;<span class="comment">MIT License</span></div><div class="line"><a name="l00003"></a><span class="lineno"> 3</span>&#160;<span class="comment"></span></div><div class="line"><a name="l00004"></a><span class="lineno"> 4</span>&#160;<span class="comment">Copyright (c) 2018 Brian T. Park</span></div><div class="line"><a name="l00005"></a><span class="lineno"> 5</span>&#160;<span class="comment"></span></div><div class="line"><a name="l00006"></a><span class="lineno"> 6</span>&#160;<span class="comment">Permission is hereby granted, free of charge, to any person obtaining a copy</span></div><div class="line"><a name="l00007"></a><span class="lineno"> 7</span>&#160;<span class="comment">of this software and associated documentation files (the &quot;Software&quot;), to deal</span></div><div class="line"><a name="l00008"></a><span class="lineno"> 8</span>&#160;<span class="comment">in the Software without restriction, including without limitation the rights</span></div><div class="line"><a name="l00009"></a><span class="lineno"> 9</span>&#160;<span class="comment">to use, copy, modify, merge, publish, distribute, sublicense, and/or sell</span></div><div class="line"><a name="l00010"></a><span class="lineno"> 10</span>&#160;<span class="comment">copies of the Software, and to permit persons to whom the Software is</span></div><div class="line"><a name="l00011"></a><span class="lineno"> 11</span>&#160;<span class="comment">furnished to do so, subject to the following conditions:</span></div><div class="line"><a name="l00012"></a><span class="lineno"> 12</span>&#160;<span class="comment"></span></div><div class="line"><a name="l00013"></a><span class="lineno"> 13</span>&#160;<span class="comment">The above copyright notice and this permission notice shall be included in all</span></div><div class="line"><a name="l00014"></a><span class="lineno"> 14</span>&#160;<span class="comment">copies or substantial portions of the Software.</span></div><div class="line"><a name="l00015"></a><span class="lineno"> 15</span>&#160;<span class="comment"></span></div><div class="line"><a name="l00016"></a><span class="lineno"> 16</span>&#160;<span class="comment">THE SOFTWARE IS PROVIDED &quot;AS IS&quot;, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR</span></div><div class="line"><a name="l00017"></a><span class="lineno"> 17</span>&#160;<span class="comment">IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,</span></div><div class="line"><a name="l00018"></a><span class="lineno"> 18</span>&#160;<span class="comment">FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE</span></div><div class="line"><a name="l00019"></a><span class="lineno"> 19</span>&#160;<span class="comment">AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER</span></div><div class="line"><a name="l00020"></a><span class="lineno"> 20</span>&#160;<span class="comment">LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,</span></div><div class="line"><a name="l00021"></a><span class="lineno"> 21</span>&#160;<span class="comment">OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE</span></div><div class="line"><a name="l00022"></a><span class="lineno"> 22</span>&#160;<span class="comment">SOFTWARE.</span></div><div class="line"><a name="l00023"></a><span class="lineno"> 23</span>&#160;<span class="comment">*/</span></div><div class="line"><a name="l00024"></a><span class="lineno"> 24</span>&#160;</div><div class="line"><a name="l00025"></a><span class="lineno"> 25</span>&#160;<span class="preprocessor">#ifndef ACE_BUTTON_ACE_BUTTON_H</span></div><div class="line"><a name="l00026"></a><span class="lineno"> 26</span>&#160;<span class="preprocessor">#define ACE_BUTTON_ACE_BUTTON_H</span></div><div class="line"><
<div class="ttc" id="classace__button_1_1AceButton_html_abc9d705d1ca4341cf6f9434962b5b5e7"><div class="ttname"><a href="classace__button_1_1AceButton.html#abc9d705d1ca4341cf6f9434962b5b5e7">ace_button::AceButton::setButtonConfig</a></div><div class="ttdeci">void setButtonConfig(ButtonConfig *buttonConfig) ACE_BUTTON_INLINE</div><div class="ttdoc">Set the ButtonConfig associated with this Button. </div><div class="ttdef"><b>Definition:</b> <a href="ace__button_2AceButton_8h_source.html#l00152">AceButton.h:152</a></div></div>
<div class="ttc" id="classace__button_1_1AceButton_html_afa8013bb98f5fbd79654aebca613ba71"><div class="ttname"><a href="classace__button_1_1AceButton.html#afa8013bb98f5fbd79654aebca613ba71">ace_button::AceButton::getDefaultReleasedState</a></div><div class="ttdeci">uint8_t getDefaultReleasedState()</div><div class="ttdoc">Get the initial released state of the button, HIGH or LOW. </div><div class="ttdef"><b>Definition:</b> <a href="AceButton_8cpp_source.html#l00067">AceButton.cpp:67</a></div></div>
<div class="ttc" id="classace__button_1_1AceButton_html_aa3cbb3fb16076cfe9255e0f70cc6aa72"><div class="ttname"><a href="classace__button_1_1AceButton.html#aa3cbb3fb16076cfe9255e0f70cc6aa72">ace_button::AceButton::isReleased</a></div><div class="ttdeci">bool isReleased(uint8_t buttonState) ACE_BUTTON_INLINE</div><div class="ttdoc">Returns true if the given buttonState represents a &amp;#39;Released&amp;#39; state for the button. </div><div class="ttdef"><b>Definition:</b> <a href="ace__button_2AceButton_8h_source.html#l00220">AceButton.h:220</a></div></div>
<div class="ttc" id="classace__button_1_1AceButton_html_af80a2bd19d929bff5dcce54a3db6fb0a"><div class="ttname"><a href="classace__button_1_1AceButton.html#af80a2bd19d929bff5dcce54a3db6fb0a">ace_button::AceButton::isPressedRaw</a></div><div class="ttdeci">bool isPressedRaw() ACE_BUTTON_INLINE</div><div class="ttdoc">Read the button state directly using ButtonConfig and return true if the button is in the Pressed sta...</div><div class="ttdef"><b>Definition:</b> <a href="ace__button_2AceButton_8h_source.html#l00231">AceButton.h:231</a></div></div>
<div class="ttc" id="classace__button_1_1AceButton_html_a3c49e9edf8cbb5e3800c5f4506d0beca"><div class="ttname"><a href="classace__button_1_1AceButton.html#a3c49e9edf8cbb5e3800c5f4506d0beca">ace_button::AceButton::getLastButtonState</a></div><div class="ttdeci">uint8_t getLastButtonState() ACE_BUTTON_INLINE</div><div class="ttdoc">Return the button state that was last valid. </div><div class="ttdef"><b>Definition:</b> <a href="ace__button_2AceButton_8h_source.html#l00192">AceButton.h:192</a></div></div>
<div class="ttc" id="classace__button_1_1AceButton_html_a9c4195cb128da40677ea223eb81743c9"><div class="ttname"><a href="classace__button_1_1AceButton.html#a9c4195cb128da40677ea223eb81743c9">ace_button::AceButton::kEventRepeatPressed</a></div><div class="ttdeci">static const uint8_t kEventRepeatPressed</div><div class="ttdoc">Button was held down and auto generated multiple presses. </div><div class="ttdef"><b>Definition:</b> <a href="ace__button_2AceButton_8h_source.html#l00084">AceButton.h:84</a></div></div>
<div class="ttc" id="classace__button_1_1ButtonConfig_html_a5d228f08e9943fd4ab90caab39ef80be"><div class="ttname"><a href="classace__button_1_1ButtonConfig.html#a5d228f08e9943fd4ab90caab39ef80be">ace_button::ButtonConfig::setEventHandler</a></div><div class="ttdeci">void setEventHandler(EventHandler eventHandler) ACE_BUTTON_INLINE</div><div class="ttdoc">Install the event handler. </div><div class="ttdef"><b>Definition:</b> <a href="ace__button_2ButtonConfig_8h_source.html#l00296">ButtonConfig.h:296</a></div></div>
<div class="ttc" id="classace__button_1_1AceButton_html_afe8e8e22146f510afa487e6ec98b6253"><div class="ttname"><a href="classace__button_1_1AceButton.html#afe8e8e22146f510afa487e6ec98b6253">ace_button::AceButton::kButtonStateUnknown</a></div><div class="ttdeci">static const uint8_t kButtonStateUnknown</div><div class="ttdoc">Button state is unknown. </div><div class="ttdef"><b>Definition:</b> <a href="ace__button_2AceButton_8h_source.html#l00090">AceButton.h:90</a></div></div>
<div class="ttc" id="classace__button_1_1ButtonConfig_html_a5dab877bf124bfdf5a5eb703ca123027"><div class="ttname"><a href="classace__button_1_1ButtonConfig.html#a5dab877bf124bfdf5a5eb703ca123027">ace_button::ButtonConfig::readButton</a></div><div class="ttdeci">virtual int readButton(uint8_t pin)</div><div class="ttdoc">Return the HIGH or LOW state of the button. </div><div class="ttdef"><b>Definition:</b> <a href="ace__button_2ButtonConfig_8h_source.html#l00263">ButtonConfig.h:263</a></div></div>
<div class="ttc" id="classace__button_1_1AceButton_html_a5e4ea4aca852a5e0b1d426bccb131cfb"><div class="ttname"><a href="classace__button_1_1AceButton.html#a5e4ea4aca852a5e0b1d426bccb131cfb">ace_button::AceButton::getButtonConfig</a></div><div class="ttdeci">ButtonConfig * getButtonConfig() ACE_BUTTON_INLINE</div><div class="ttdoc">Get the ButtonConfig associated with this Button. </div><div class="ttdef"><b>Definition:</b> <a href="ace__button_2AceButton_8h_source.html#l00143">AceButton.h:143</a></div></div>
<div class="ttc" id="classace__button_1_1AceButton_html_a18c47304c694c6f084a343a7c83bef34"><div class="ttname"><a href="classace__button_1_1AceButton.html#a18c47304c694c6f084a343a7c83bef34">ace_button::AceButton::init</a></div><div class="ttdeci">void init(uint8_t pin=0, uint8_t defaultReleasedState=HIGH, uint8_t id=0)</div><div class="ttdoc">Reset the button to the initial constructed state. </div><div class="ttdef"><b>Definition:</b> <a href="AceButton_8cpp_source.html#l00049">AceButton.cpp:49</a></div></div>
<div class="ttc" id="namespaceace__button_html"><div class="ttname"><a href="namespaceace__button.html">ace_button</a></div><div class="ttdef"><b>Definition:</b> <a href="AceButton_8cpp_source.html#l00028">AceButton.cpp:28</a></div></div>
<div class="ttc" id="classace__button_1_1ButtonConfig_html"><div class="ttname"><a href="classace__button_1_1ButtonConfig.html">ace_button::ButtonConfig</a></div><div class="ttdoc">Class that defines the timing parameters and event handler of an AceButton or a group of AceButton in...</div><div class="ttdef"><b>Definition:</b> <a href="ace__button_2ButtonConfig_8h_source.html#l00060">ButtonConfig.h:60</a></div></div>
<div class="ttc" id="classace__button_1_1AceButton_html_a0c63f30106e4688425ba37d8f7a9546b"><div class="ttname"><a href="classace__button_1_1AceButton.html#a0c63f30106e4688425ba37d8f7a9546b">ace_button::AceButton::kEventDoubleClicked</a></div><div class="ttdeci">static const uint8_t kEventDoubleClicked</div><div class="ttdoc">Button was double-clicked. </div><div class="ttdef"><b>Definition:</b> <a href="ace__button_2AceButton_8h_source.html#l00070">AceButton.h:70</a></div></div>
<div class="ttc" id="classace__button_1_1AceButton_html_a769599d288f64dc0e55a69184596d804"><div class="ttname"><a href="classace__button_1_1AceButton.html#a769599d288f64dc0e55a69184596d804">ace_button::AceButton::kEventLongPressed</a></div><div class="ttdeci">static const uint8_t kEventLongPressed</div><div class="ttdoc">Button was held down for longer than ButtonConfig::getLongPressDelay()). </div><div class="ttdef"><b>Definition:</b> <a href="ace__button_2AceButton_8h_source.html#l00076">AceButton.h:76</a></div></div>
<div class="ttc" id="classace__button_1_1AceButton_html_a4a693b836e3fed29d4e7203a5a97910b"><div class="ttname"><a href="classace__button_1_1AceButton.html#a4a693b836e3fed29d4e7203a5a97910b">ace_button::AceButton::getId</a></div><div class="ttdeci">uint8_t getId() ACE_BUTTON_INLINE</div><div class="ttdoc">Get the custom identifier of the button. </div><div class="ttdef"><b>Definition:</b> <a href="ace__button_2AceButton_8h_source.html#l00174">AceButton.h:174</a></div></div>
<div class="ttc" id="classace__button_1_1ButtonConfig_html_a6d9db3c7b221b474c3cfd8fca5f4ba1e"><div class="ttname"><a href="classace__button_1_1ButtonConfig.html#a6d9db3c7b221b474c3cfd8fca5f4ba1e">ace_button::ButtonConfig::EventHandler</a></div><div class="ttdeci">void(* EventHandler)(AceButton *button, uint8_t eventType, uint8_t buttonState)</div><div class="ttdoc">The event handler signature. </div><div class="ttdef"><b>Definition:</b> <a href="ace__button_2ButtonConfig_8h_source.html#l00164">ButtonConfig.h:164</a></div></div>
<div class="ttc" id="classace__button_1_1AceButton_html_ac6b12ca62c7c055325bfebd036579ed6"><div class="ttname"><a href="classace__button_1_1AceButton.html#ac6b12ca62c7c055325bfebd036579ed6">ace_button::AceButton::getPin</a></div><div class="ttdeci">uint8_t getPin() ACE_BUTTON_INLINE</div><div class="ttdoc">Get the button&amp;#39;s pin number. </div><div class="ttdef"><b>Definition:</b> <a href="ace__button_2AceButton_8h_source.html#l00171">AceButton.h:171</a></div></div>
<div class="ttc" id="classace__button_1_1AceButton_html_af710048a654fa5d5e45405661282a7b1"><div class="ttname"><a href="classace__button_1_1AceButton.html#af710048a654fa5d5e45405661282a7b1">ace_button::AceButton::check</a></div><div class="ttdeci">void check()</div><div class="ttdoc">Check state of button and trigger event processing. </div><div class="ttdef"><b>Definition:</b> <a href="AceButton_8cpp_source.html#l00073">AceButton.cpp:73</a></div></div>
<div class="ttc" id="classace__button_1_1AceButton_html"><div class="ttname"><a href="classace__button_1_1AceButton.html">ace_button::AceButton</a></div><div class="ttdoc">An Adjustable Compact Event-driven (ACE) Button library that debounces and dispatches button events t...</div><div class="ttdef"><b>Definition:</b> <a href="ace__button_2AceButton_8h_source.html#l00050">AceButton.h:50</a></div></div>
<div class="ttc" id="classace__button_1_1AceButton_html_a3c480636223edc899a79c821c32c6982"><div class="ttname"><a href="classace__button_1_1AceButton.html#a3c480636223edc899a79c821c32c6982">ace_button::AceButton::AceButton</a></div><div class="ttdeci">AceButton(uint8_t pin=0, uint8_t defaultReleasedState=HIGH, uint8_t id=0)</div><div class="ttdoc">Constructor defines parameters of the button that changes from button to button. </div><div class="ttdef"><b>Definition:</b> <a href="AceButton_8cpp_source.html#l00039">AceButton.cpp:39</a></div></div>
<div class="ttc" id="classace__button_1_1AceButton_html_ada5bd7c31950e2acdb8a9464e795c13c"><div class="ttname"><a href="classace__button_1_1AceButton.html#ada5bd7c31950e2acdb8a9464e795c13c">ace_button::AceButton::kEventReleased</a></div><div class="ttdeci">static const uint8_t kEventReleased</div><div class="ttdoc">Button was released. </div><div class="ttdef"><b>Definition:</b> <a href="ace__button_2AceButton_8h_source.html#l00058">AceButton.h:58</a></div></div>
<div class="ttc" id="classace__button_1_1AceButton_html_ae723d826fe219a8415764b9fed5d8976"><div class="ttname"><a href="classace__button_1_1AceButton.html#ae723d826fe219a8415764b9fed5d8976">ace_button::AceButton::kEventPressed</a></div><div class="ttdeci">static const uint8_t kEventPressed</div><div class="ttdoc">Button was pressed. </div><div class="ttdef"><b>Definition:</b> <a href="ace__button_2AceButton_8h_source.html#l00055">AceButton.h:55</a></div></div>
<div class="ttc" id="classace__button_1_1AceButton_html_a21797e5e069da3f7bba42b40ab3a7305"><div class="ttname"><a href="classace__button_1_1AceButton.html#a21797e5e069da3f7bba42b40ab3a7305">ace_button::AceButton::kEventClicked</a></div><div class="ttdeci">static const uint8_t kEventClicked</div><div class="ttdoc">Button was clicked (Pressed and Released within ButtonConfig::getClickDelay()). </div><div class="ttdef"><b>Definition:</b> <a href="ace__button_2AceButton_8h_source.html#l00064">AceButton.h:64</a></div></div>
</div><!-- fragment --></div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.13
</small></address>
</body>
</html>