Files
ITEADLIB_Arduino_Nextion/API-html/_comp_hotspot_8ino_source.html
zhanglaicheng 0b376836e2 update document
2015-07-29 13:20:26 +08:00

128 lines
12 KiB
HTML

<!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.7"/>
<title>API: examples/CompHotspot/CompHotspot.ino 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="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="projectlogo"><img alt="Logo" src="ITEAD-logo.JPG"/></td>
<td style="padding-left: 0.5em;">
<div id="projectname">API
</div>
<div id="projectbrief">For Arduino developers</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.7 -->
<div id="navrow1" class="tabs">
<ul class="tablist">
<li><a href="index.html"><span>Main&#160;Page</span></a></li>
<li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
<li><a href="annotated.html"><span>Classes</span></a></li>
<li class="current"><a href="files.html"><span>Files</span></a></li>
<li><a href="examples.html"><span>Examples</span></a></li>
</ul>
</div>
<div id="navrow2" class="tabs2">
<ul class="tablist">
<li><a href="files.html"><span>File&#160;List</span></a></li>
<li><a href="globals.html"><span>File&#160;Members</span></a></li>
</ul>
</div>
<div id="nav-path" class="navpath">
<ul>
<li class="navelem"><a class="el" href="dir_d28a4824dc47e487b107a5db32ef43c4.html">examples</a></li><li class="navelem"><a class="el" href="dir_f3d39c87bc262720c50d5e3885667b8a.html">CompHotspot</a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="headertitle">
<div class="title">CompHotspot.ino</div> </div>
</div><!--header-->
<div class="contents">
<div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno"> 1</span>&#160;</div>
<div class="line"><a name="l00016"></a><span class="lineno"> 16</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="_nex_hotspot_8h.html">NexHotspot.h</a>&quot;</span></div>
<div class="line"><a name="l00017"></a><span class="lineno"> 17</span>&#160;</div>
<div class="line"><a name="l00018"></a><span class="lineno"> 18</span>&#160;<a class="code" href="class_nex_hotspot.html">NexHotspot</a> hot0 = <a class="code" href="class_nex_hotspot.html">NexHotspot</a>(0, 1, <span class="stringliteral">&quot;hot0&quot;</span>);</div>
<div class="line"><a name="l00019"></a><span class="lineno"> 19</span>&#160;<a class="code" href="class_nex_hotspot.html">NexHotspot</a> hot1 = <a class="code" href="class_nex_hotspot.html">NexHotspot</a>(0, 2, <span class="stringliteral">&quot;hot1&quot;</span>);</div>
<div class="line"><a name="l00020"></a><span class="lineno"> 20</span>&#160;</div>
<div class="line"><a name="l00021"></a><span class="lineno"> 21</span>&#160;<a class="code" href="class_nex_touch.html">NexTouch</a> *nex_listen_list[] = </div>
<div class="line"><a name="l00022"></a><span class="lineno"> 22</span>&#160;{</div>
<div class="line"><a name="l00023"></a><span class="lineno"> 23</span>&#160; &amp;hot0,</div>
<div class="line"><a name="l00024"></a><span class="lineno"> 24</span>&#160; &amp;hot1,</div>
<div class="line"><a name="l00025"></a><span class="lineno"> 25</span>&#160; NULL</div>
<div class="line"><a name="l00026"></a><span class="lineno"> 26</span>&#160;};</div>
<div class="line"><a name="l00027"></a><span class="lineno"> 27</span>&#160;</div>
<div class="line"><a name="l00028"></a><span class="lineno"> 28</span>&#160;<span class="keywordtype">void</span> hot0PushCallback(<span class="keywordtype">void</span> *ptr)</div>
<div class="line"><a name="l00029"></a><span class="lineno"> 29</span>&#160;{</div>
<div class="line"><a name="l00030"></a><span class="lineno"> 30</span>&#160; dbSerialPrintln(<span class="stringliteral">&quot;hot0PushCallback&quot;</span>);</div>
<div class="line"><a name="l00031"></a><span class="lineno"> 31</span>&#160; dbSerialPrint(<span class="stringliteral">&quot;ptr=&quot;</span>);</div>
<div class="line"><a name="l00032"></a><span class="lineno"> 32</span>&#160; dbSerialPrintln((uint32_t)ptr);</div>
<div class="line"><a name="l00033"></a><span class="lineno"> 33</span>&#160;}</div>
<div class="line"><a name="l00034"></a><span class="lineno"> 34</span>&#160;</div>
<div class="line"><a name="l00035"></a><span class="lineno"> 35</span>&#160;<span class="keywordtype">void</span> hot1PushCallback(<span class="keywordtype">void</span> *ptr)</div>
<div class="line"><a name="l00036"></a><span class="lineno"> 36</span>&#160;{</div>
<div class="line"><a name="l00037"></a><span class="lineno"> 37</span>&#160; dbSerialPrintln(<span class="stringliteral">&quot;hot1PushCallback&quot;</span>); </div>
<div class="line"><a name="l00038"></a><span class="lineno"> 38</span>&#160; dbSerialPrint(<span class="stringliteral">&quot;ptr=&quot;</span>);</div>
<div class="line"><a name="l00039"></a><span class="lineno"> 39</span>&#160; dbSerialPrintln((uint32_t)ptr);</div>
<div class="line"><a name="l00040"></a><span class="lineno"> 40</span>&#160;}</div>
<div class="line"><a name="l00041"></a><span class="lineno"> 41</span>&#160;</div>
<div class="line"><a name="l00042"></a><span class="lineno"> 42</span>&#160;<span class="keywordtype">void</span> hot0PopCallback(<span class="keywordtype">void</span> *ptr)</div>
<div class="line"><a name="l00043"></a><span class="lineno"> 43</span>&#160;{</div>
<div class="line"><a name="l00044"></a><span class="lineno"> 44</span>&#160; dbSerialPrintln(<span class="stringliteral">&quot;hot0PopCallback&quot;</span>);</div>
<div class="line"><a name="l00045"></a><span class="lineno"> 45</span>&#160; dbSerialPrint(<span class="stringliteral">&quot;ptr=&quot;</span>);</div>
<div class="line"><a name="l00046"></a><span class="lineno"> 46</span>&#160; dbSerialPrintln((uint32_t)ptr);</div>
<div class="line"><a name="l00047"></a><span class="lineno"> 47</span>&#160;}</div>
<div class="line"><a name="l00048"></a><span class="lineno"> 48</span>&#160;</div>
<div class="line"><a name="l00049"></a><span class="lineno"> 49</span>&#160;<span class="keywordtype">void</span> hot1PopCallback(<span class="keywordtype">void</span> *ptr)</div>
<div class="line"><a name="l00050"></a><span class="lineno"> 50</span>&#160;{</div>
<div class="line"><a name="l00051"></a><span class="lineno"> 51</span>&#160; dbSerialPrintln(<span class="stringliteral">&quot;hot1PopCallback&quot;</span>);</div>
<div class="line"><a name="l00052"></a><span class="lineno"> 52</span>&#160; dbSerialPrint(<span class="stringliteral">&quot;ptr=&quot;</span>);</div>
<div class="line"><a name="l00053"></a><span class="lineno"> 53</span>&#160; dbSerialPrintln((uint32_t)ptr);</div>
<div class="line"><a name="l00054"></a><span class="lineno"> 54</span>&#160;}</div>
<div class="line"><a name="l00055"></a><span class="lineno"> 55</span>&#160;</div>
<div class="line"><a name="l00056"></a><span class="lineno"> 56</span>&#160;<span class="keywordtype">void</span> setup(<span class="keywordtype">void</span>)</div>
<div class="line"><a name="l00057"></a><span class="lineno"> 57</span>&#160;{</div>
<div class="line"><a name="l00058"></a><span class="lineno"> 58</span>&#160; dbSerialBegin(9600);</div>
<div class="line"><a name="l00059"></a><span class="lineno"> 59</span>&#160; <a class="code" href="_nex_touch_8cpp.html#ab09ddba6b72334d30ae091a7b038d790">nexInit</a>();</div>
<div class="line"><a name="l00060"></a><span class="lineno"> 60</span>&#160; hot0.<a class="code" href="class_nex_hotspot.html#a334baf11f1dcdc69e8fe638364267aaa">attachPush</a>(hot0PushCallback, &amp;hot0);</div>
<div class="line"><a name="l00061"></a><span class="lineno"> 61</span>&#160; hot0.<a class="code" href="class_nex_hotspot.html#ab024ae9f0cb6c3d048fff750e66b3138">attachPop</a>(hot0PopCallback, &amp;hot0);</div>
<div class="line"><a name="l00062"></a><span class="lineno"> 62</span>&#160; hot1.<a class="code" href="class_nex_hotspot.html#a334baf11f1dcdc69e8fe638364267aaa">attachPush</a>(hot1PushCallback, &amp;hot1);</div>
<div class="line"><a name="l00063"></a><span class="lineno"> 63</span>&#160; hot1.<a class="code" href="class_nex_hotspot.html#ab024ae9f0cb6c3d048fff750e66b3138">attachPop</a>(hot1PopCallback, &amp;hot1);</div>
<div class="line"><a name="l00064"></a><span class="lineno"> 64</span>&#160; dbSerialPrintln(<span class="stringliteral">&quot;setup done&quot;</span>);</div>
<div class="line"><a name="l00065"></a><span class="lineno"> 65</span>&#160;}</div>
<div class="line"><a name="l00066"></a><span class="lineno"> 66</span>&#160;</div>
<div class="line"><a name="l00067"></a><span class="lineno"> 67</span>&#160;<span class="keywordtype">void</span> loop(<span class="keywordtype">void</span>)</div>
<div class="line"><a name="l00068"></a><span class="lineno"> 68</span>&#160;{</div>
<div class="line"><a name="l00069"></a><span class="lineno"> 69</span>&#160; <a class="code" href="_nex_touch_8cpp.html#a2ac649a3055291eece6f6787c55a8625">nexLoop</a>(nex_listen_list);</div>
<div class="line"><a name="l00070"></a><span class="lineno"> 70</span>&#160;}</div>
<div class="ttc" id="_nex_touch_8cpp_html_ab09ddba6b72334d30ae091a7b038d790"><div class="ttname"><a href="_nex_touch_8cpp.html#ab09ddba6b72334d30ae091a7b038d790">nexInit</a></div><div class="ttdeci">bool nexInit(void)</div><div class="ttdoc">Init Nextion&#39;s baudrate,page id. </div><div class="ttdef"><b>Definition:</b> <a href="_nex_touch_8cpp_source.html#l00404">NexTouch.cpp:404</a></div></div>
<div class="ttc" id="_nex_touch_8cpp_html_a2ac649a3055291eece6f6787c55a8625"><div class="ttname"><a href="_nex_touch_8cpp.html#a2ac649a3055291eece6f6787c55a8625">nexLoop</a></div><div class="ttdeci">bool nexLoop(NexTouch **nex_listen_list)</div><div class="ttdoc">Call mainEventLoop,watting for Nextion&#39;s touch event. </div><div class="ttdef"><b>Definition:</b> <a href="_nex_touch_8cpp_source.html#l00420">NexTouch.cpp:420</a></div></div>
<div class="ttc" id="_nex_hotspot_8h_html"><div class="ttname"><a href="_nex_hotspot_8h.html">NexHotspot.h</a></div><div class="ttdoc">API of NexHotspot. </div></div>
<div class="ttc" id="class_nex_hotspot_html"><div class="ttname"><a href="class_nex_hotspot.html">NexHotspot</a></div><div class="ttdoc">NexHotspot,subclass of NexTouch,provides simple methods to control hotspot component. </div><div class="ttdef"><b>Definition:</b> <a href="_nex_hotspot_8h_source.html#l00025">NexHotspot.h:25</a></div></div>
<div class="ttc" id="class_nex_hotspot_html_ab024ae9f0cb6c3d048fff750e66b3138"><div class="ttname"><a href="class_nex_hotspot.html#ab024ae9f0cb6c3d048fff750e66b3138">NexHotspot::attachPop</a></div><div class="ttdeci">void attachPop(NexTouchEventCb pop, void *ptr=NULL)</div><div class="ttdoc">Register hotspot pop callback function. </div><div class="ttdef"><b>Definition:</b> <a href="_nex_hotspot_8cpp_source.html#l00055">NexHotspot.cpp:55</a></div></div>
<div class="ttc" id="class_nex_touch_html"><div class="ttname"><a href="class_nex_touch.html">NexTouch</a></div><div class="ttdoc">Root Class of Nextion Components. </div><div class="ttdef"><b>Definition:</b> <a href="_nex_touch_8h_source.html#l00057">NexTouch.h:57</a></div></div>
<div class="ttc" id="class_nex_hotspot_html_a334baf11f1dcdc69e8fe638364267aaa"><div class="ttname"><a href="class_nex_hotspot.html#a334baf11f1dcdc69e8fe638364267aaa">NexHotspot::attachPush</a></div><div class="ttdeci">void attachPush(NexTouchEventCb push, void *ptr=NULL)</div><div class="ttdoc">Register hotspot push callback function. </div><div class="ttdef"><b>Definition:</b> <a href="_nex_hotspot_8cpp_source.html#l00035">NexHotspot.cpp:35</a></div></div>
</div><!-- fragment --></div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Wed Jul 29 2015 13:08:59 for API by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.7
</small></address>
</body>
</html>