mirror of
https://github.com/itead/ITEADLIB_Arduino_Nextion.git
synced 2026-03-05 09:44:00 +01:00
128 lines
12 KiB
HTML
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 Page</span></a></li>
|
|
<li><a href="pages.html"><span>Related 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 List</span></a></li>
|
|
<li><a href="globals.html"><span>File 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> </div>
|
|
<div class="line"><a name="l00016"></a><span class="lineno"> 16</span> <span class="preprocessor">#include "<a class="code" href="_nex_hotspot_8h.html">NexHotspot.h</a>"</span></div>
|
|
<div class="line"><a name="l00017"></a><span class="lineno"> 17</span> </div>
|
|
<div class="line"><a name="l00018"></a><span class="lineno"> 18</span> <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">"hot0"</span>);</div>
|
|
<div class="line"><a name="l00019"></a><span class="lineno"> 19</span> <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">"hot1"</span>);</div>
|
|
<div class="line"><a name="l00020"></a><span class="lineno"> 20</span> </div>
|
|
<div class="line"><a name="l00021"></a><span class="lineno"> 21</span> <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> {</div>
|
|
<div class="line"><a name="l00023"></a><span class="lineno"> 23</span>  &hot0,</div>
|
|
<div class="line"><a name="l00024"></a><span class="lineno"> 24</span>  &hot1,</div>
|
|
<div class="line"><a name="l00025"></a><span class="lineno"> 25</span>  NULL</div>
|
|
<div class="line"><a name="l00026"></a><span class="lineno"> 26</span> };</div>
|
|
<div class="line"><a name="l00027"></a><span class="lineno"> 27</span> </div>
|
|
<div class="line"><a name="l00028"></a><span class="lineno"> 28</span> <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> {</div>
|
|
<div class="line"><a name="l00030"></a><span class="lineno"> 30</span>  dbSerialPrintln(<span class="stringliteral">"hot0PushCallback"</span>);</div>
|
|
<div class="line"><a name="l00031"></a><span class="lineno"> 31</span>  dbSerialPrint(<span class="stringliteral">"ptr="</span>);</div>
|
|
<div class="line"><a name="l00032"></a><span class="lineno"> 32</span>  dbSerialPrintln((uint32_t)ptr);</div>
|
|
<div class="line"><a name="l00033"></a><span class="lineno"> 33</span> }</div>
|
|
<div class="line"><a name="l00034"></a><span class="lineno"> 34</span> </div>
|
|
<div class="line"><a name="l00035"></a><span class="lineno"> 35</span> <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> {</div>
|
|
<div class="line"><a name="l00037"></a><span class="lineno"> 37</span>  dbSerialPrintln(<span class="stringliteral">"hot1PushCallback"</span>); </div>
|
|
<div class="line"><a name="l00038"></a><span class="lineno"> 38</span>  dbSerialPrint(<span class="stringliteral">"ptr="</span>);</div>
|
|
<div class="line"><a name="l00039"></a><span class="lineno"> 39</span>  dbSerialPrintln((uint32_t)ptr);</div>
|
|
<div class="line"><a name="l00040"></a><span class="lineno"> 40</span> }</div>
|
|
<div class="line"><a name="l00041"></a><span class="lineno"> 41</span> </div>
|
|
<div class="line"><a name="l00042"></a><span class="lineno"> 42</span> <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> {</div>
|
|
<div class="line"><a name="l00044"></a><span class="lineno"> 44</span>  dbSerialPrintln(<span class="stringliteral">"hot0PopCallback"</span>);</div>
|
|
<div class="line"><a name="l00045"></a><span class="lineno"> 45</span>  dbSerialPrint(<span class="stringliteral">"ptr="</span>);</div>
|
|
<div class="line"><a name="l00046"></a><span class="lineno"> 46</span>  dbSerialPrintln((uint32_t)ptr);</div>
|
|
<div class="line"><a name="l00047"></a><span class="lineno"> 47</span> }</div>
|
|
<div class="line"><a name="l00048"></a><span class="lineno"> 48</span> </div>
|
|
<div class="line"><a name="l00049"></a><span class="lineno"> 49</span> <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> {</div>
|
|
<div class="line"><a name="l00051"></a><span class="lineno"> 51</span>  dbSerialPrintln(<span class="stringliteral">"hot1PopCallback"</span>);</div>
|
|
<div class="line"><a name="l00052"></a><span class="lineno"> 52</span>  dbSerialPrint(<span class="stringliteral">"ptr="</span>);</div>
|
|
<div class="line"><a name="l00053"></a><span class="lineno"> 53</span>  dbSerialPrintln((uint32_t)ptr);</div>
|
|
<div class="line"><a name="l00054"></a><span class="lineno"> 54</span> }</div>
|
|
<div class="line"><a name="l00055"></a><span class="lineno"> 55</span> </div>
|
|
<div class="line"><a name="l00056"></a><span class="lineno"> 56</span> <span class="keywordtype">void</span> setup(<span class="keywordtype">void</span>)</div>
|
|
<div class="line"><a name="l00057"></a><span class="lineno"> 57</span> {</div>
|
|
<div class="line"><a name="l00058"></a><span class="lineno"> 58</span>  dbSerialBegin(9600);</div>
|
|
<div class="line"><a name="l00059"></a><span class="lineno"> 59</span>  <a class="code" href="_nex_touch_8cpp.html#ab09ddba6b72334d30ae091a7b038d790">nexInit</a>();</div>
|
|
<div class="line"><a name="l00060"></a><span class="lineno"> 60</span>  hot0.<a class="code" href="class_nex_hotspot.html#a334baf11f1dcdc69e8fe638364267aaa">attachPush</a>(hot0PushCallback, &hot0);</div>
|
|
<div class="line"><a name="l00061"></a><span class="lineno"> 61</span>  hot0.<a class="code" href="class_nex_hotspot.html#ab024ae9f0cb6c3d048fff750e66b3138">attachPop</a>(hot0PopCallback, &hot0);</div>
|
|
<div class="line"><a name="l00062"></a><span class="lineno"> 62</span>  hot1.<a class="code" href="class_nex_hotspot.html#a334baf11f1dcdc69e8fe638364267aaa">attachPush</a>(hot1PushCallback, &hot1);</div>
|
|
<div class="line"><a name="l00063"></a><span class="lineno"> 63</span>  hot1.<a class="code" href="class_nex_hotspot.html#ab024ae9f0cb6c3d048fff750e66b3138">attachPop</a>(hot1PopCallback, &hot1);</div>
|
|
<div class="line"><a name="l00064"></a><span class="lineno"> 64</span>  dbSerialPrintln(<span class="stringliteral">"setup done"</span>);</div>
|
|
<div class="line"><a name="l00065"></a><span class="lineno"> 65</span> }</div>
|
|
<div class="line"><a name="l00066"></a><span class="lineno"> 66</span> </div>
|
|
<div class="line"><a name="l00067"></a><span class="lineno"> 67</span> <span class="keywordtype">void</span> loop(<span class="keywordtype">void</span>)</div>
|
|
<div class="line"><a name="l00068"></a><span class="lineno"> 68</span> {</div>
|
|
<div class="line"><a name="l00069"></a><span class="lineno"> 69</span>  <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> }</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'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'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  <a href="http://www.doxygen.org/index.html">
|
|
<img class="footer" src="doxygen.png" alt="doxygen"/>
|
|
</a> 1.8.7
|
|
</small></address>
|
|
</body>
|
|
</html>
|