Skip to content

Commit

Permalink
Removed using of nested functions, since gcc compilers do not support it
Browse files Browse the repository at this point in the history
added more examples for Arduino
  • Loading branch information
lexus2k committed Apr 8, 2017
1 parent d01a4c6 commit 840b8f1
Show file tree
Hide file tree
Showing 114 changed files with 2,253 additions and 249 deletions.
3 changes: 2 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ OS ?= os/linux
DESTDIR ?=
BLD ?= bld

VERSION=0.5.0
VERSION=0.5.1

ifeq ($(TINYCONF), nano)
CONFIG_ENABLE_FCS32 ?= n
Expand Down Expand Up @@ -142,6 +142,7 @@ SRC_TEST_ARDUINO_LIB = \
src/lib/crc.c \
src/lib/tiny_layer2.c \
src/arduino/src/TinyProtocol.cpp \
src/arduino/src/TinyProtocolHd.cpp \
# src/lib/tiny_request_pool.c \
# src/lib/tiny_list.c \
Expand Down
4 changes: 2 additions & 2 deletions docs/TinyPacket_8h.html
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
<tr style="height: 56px;">
<td style="padding-left: 0.5em;">
<div id="projectname">Tiny protocol
&#160;<span id="projectnumber">0.5</span>
&#160;<span id="projectnumber">0.5.1</span>
</div>
<div id="projectbrief">Tiny communication protocol for microcontrollers</div>
</td>
Expand Down Expand Up @@ -109,7 +109,7 @@
<div class="dyncontent">
<div class="center"><img src="TinyPacket_8h__dep__incl.png" border="0" usemap="#src_2arduino_2src_2TinyPacket_8hdep" alt=""/></div>
<map name="src_2arduino_2src_2TinyPacket_8hdep" id="src_2arduino_2src_2TinyPacket_8hdep">
<area shape="rect" id="node2" href="TinyProtocol_8h.html" title="Tiny protocol Arduino API. " alt="" coords="5,80,201,107"/></map>
<area shape="rect" id="node2" href="TinyProtocol_8h.html" title="Tiny protocol Arduino API. " alt="" coords="5,80,201,107"/><area shape="rect" id="node3" href="TinyProtocolHd_8h.html" title="Tiny protocol Arduino API. " alt="" coords="226,80,439,107"/></map>
</div>
</div>
<p><a href="TinyPacket_8h_source.html">Go to the source code of this file.</a></p>
Expand Down
1 change: 1 addition & 0 deletions docs/TinyPacket_8h__dep__incl.map
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
<map id="src/arduino/src/TinyPacket.h" name="src/arduino/src/TinyPacket.h">
<area shape="rect" id="node2" href="$TinyProtocol_8h.html" title="Tiny protocol Arduino API. " alt="" coords="5,80,201,107"/>
<area shape="rect" id="node3" href="$TinyProtocolHd_8h.html" title="Tiny protocol Arduino API. " alt="" coords="226,80,439,107"/>
</map>
2 changes: 1 addition & 1 deletion docs/TinyPacket_8h__dep__incl.md5
Original file line number Diff line number Diff line change
@@ -1 +1 @@
d57767e574a645084b7a73f088cc8dad
973d274b8507c889a8b870722bea1ddc
Binary file modified docs/TinyPacket_8h__dep__incl.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
30 changes: 16 additions & 14 deletions docs/TinyPacket_8h_source.html
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
<tr style="height: 56px;">
<td style="padding-left: 0.5em;">
<div id="projectname">Tiny protocol
&#160;<span id="projectnumber">0.5</span>
&#160;<span id="projectnumber">0.5.1</span>
</div>
<div id="projectbrief">Tiny communication protocol for microcontrollers</div>
</td>
Expand Down Expand Up @@ -174,23 +174,25 @@
<div class="line"><a name="l00189"></a><span class="lineno"> 189</span>&#160;</div>
<div class="line"><a name="l00190"></a><span class="lineno"> 190</span>&#160;<span class="keyword">private</span>:</div>
<div class="line"><a name="l00191"></a><span class="lineno"> 191</span>&#160; <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="classTiny_1_1Proto.html">Proto</a>;</div>
<div class="line"><a name="l00192"></a><span class="lineno"> 192</span>&#160;</div>
<div class="line"><a name="l00193"></a><span class="lineno"> 193</span>&#160; uint8_t* m_buf;</div>
<div class="line"><a name="l00194"></a><span class="lineno"> 194</span>&#160; uint16_t m_uid;</div>
<div class="line"><a name="l00195"></a><span class="lineno"> 195</span>&#160; uint8_t m_size;</div>
<div class="line"><a name="l00196"></a><span class="lineno"> 196</span>&#160; uint8_t m_len;</div>
<div class="line"><a name="l00197"></a><span class="lineno"> 197</span>&#160; uint8_t m_p;</div>
<div class="line"><a name="l00198"></a><span class="lineno"> 198</span>&#160;};</div>
<div class="line"><a name="l00199"></a><span class="lineno"> 199</span>&#160;</div>
<div class="line"><a name="l00192"></a><span class="lineno"> 192</span>&#160; <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="classTiny_1_1ProtoHd.html">ProtoHd</a>;</div>
<div class="line"><a name="l00193"></a><span class="lineno"> 193</span>&#160;</div>
<div class="line"><a name="l00194"></a><span class="lineno"> 194</span>&#160; uint8_t* m_buf;</div>
<div class="line"><a name="l00195"></a><span class="lineno"> 195</span>&#160; uint16_t m_uid;</div>
<div class="line"><a name="l00196"></a><span class="lineno"> 196</span>&#160; uint8_t m_size;</div>
<div class="line"><a name="l00197"></a><span class="lineno"> 197</span>&#160; uint8_t m_len;</div>
<div class="line"><a name="l00198"></a><span class="lineno"> 198</span>&#160; uint8_t m_p;</div>
<div class="line"><a name="l00199"></a><span class="lineno"> 199</span>&#160;};</div>
<div class="line"><a name="l00200"></a><span class="lineno"> 200</span>&#160;</div>
<div class="line"><a name="l00201"></a><span class="lineno"> 201</span>&#160;} <span class="comment">// Tiny namespace</span></div>
<div class="line"><a name="l00202"></a><span class="lineno"> 202</span>&#160;</div>
<div class="line"><a name="l00203"></a><span class="lineno"> 203</span>&#160;<span class="preprocessor">#endif</span></div>
<div class="line"><a name="l00204"></a><span class="lineno"> 204</span>&#160;</div>
<div class="line"><a name="l00201"></a><span class="lineno"> 201</span>&#160;</div>
<div class="line"><a name="l00202"></a><span class="lineno"> 202</span>&#160;} <span class="comment">// Tiny namespace</span></div>
<div class="line"><a name="l00203"></a><span class="lineno"> 203</span>&#160;</div>
<div class="line"><a name="l00204"></a><span class="lineno"> 204</span>&#160;<span class="preprocessor">#endif</span></div>
<div class="line"><a name="l00205"></a><span class="lineno"> 205</span>&#160;</div>
<div class="ttc" id="classTiny_1_1Packet_html_a52c746f604ee6c0e4e78902b4cf710a9"><div class="ttname"><a href="classTiny_1_1Packet.html#a52c746f604ee6c0e4e78902b4cf710a9">Tiny::Packet::put</a></div><div class="ttdeci">void put(uint8_t byte)</div><div class="ttdef"><b>Definition:</b> TinyPacket.h:64</div></div>
<div class="ttc" id="classTiny_1_1Packet_html_a71765e73adfbc67138f75c2b8ea7d74c"><div class="ttname"><a href="classTiny_1_1Packet.html#a71765e73adfbc67138f75c2b8ea7d74c">Tiny::Packet::getUint16</a></div><div class="ttdeci">uint16_t getUint16()</div><div class="ttdef"><b>Definition:</b> TinyPacket.h:132</div></div>
<div class="ttc" id="namespaceTiny_html"><div class="ttname"><a href="namespaceTiny.html">Tiny</a></div><div class="ttdef"><b>Definition:</b> TinyPacket.h:37</div></div>
<div class="ttc" id="classTiny_1_1Packet_html_a5333df49a8becff438d3e36b0ca8d3f0"><div class="ttname"><a href="classTiny_1_1Packet.html#a5333df49a8becff438d3e36b0ca8d3f0">Tiny::Packet::getUid</a></div><div class="ttdeci">uint16_t getUid()</div><div class="ttdef"><b>Definition:</b> TinyPacket.h:159</div></div>
<div class="ttc" id="classTiny_1_1ProtoHd_html"><div class="ttname"><a href="classTiny_1_1ProtoHd.html">Tiny::ProtoHd</a></div><div class="ttdef"><b>Definition:</b> TinyProtocolHd.h:49</div></div>
<div class="ttc" id="classTiny_1_1Packet_html_aad47b3053945b29b1b46d76b31b72960"><div class="ttname"><a href="classTiny_1_1Packet.html#aad47b3053945b29b1b46d76b31b72960">Tiny::Packet::Packet</a></div><div class="ttdeci">Packet(char *buf, size_t size)</div><div class="ttdef"><b>Definition:</b> TinyPacket.h:52</div></div>
<div class="ttc" id="classTiny_1_1Packet_html_a152feac05d3e972f614c17c36bf30513"><div class="ttname"><a href="classTiny_1_1Packet.html#a152feac05d3e972f614c17c36bf30513">Tiny::Packet::getByte</a></div><div class="ttdeci">uint8_t getByte()</div><div class="ttdef"><b>Definition:</b> TinyPacket.h:120</div></div>
<div class="ttc" id="classTiny_1_1Packet_html_ae8764bf70fd6f09df2cb15c02ce2aa30"><div class="ttname"><a href="classTiny_1_1Packet.html#ae8764bf70fd6f09df2cb15c02ce2aa30">Tiny::Packet::putUid</a></div><div class="ttdeci">void putUid(uint16_t uid)</div><div class="ttdef"><b>Definition:</b> TinyPacket.h:114</div></div>
Expand All @@ -204,7 +206,7 @@
<div class="ttc" id="classTiny_1_1Packet_html_aed30fc087142669b37ec99d9d6572e57"><div class="ttname"><a href="classTiny_1_1Packet.html#aed30fc087142669b37ec99d9d6572e57">Tiny::Packet::put</a></div><div class="ttdeci">void put(uint32_t data)</div><div class="ttdef"><b>Definition:</b> TinyPacket.h:84</div></div>
<div class="ttc" id="classTiny_1_1Packet_html_a8bc9a3b3f41be292f9c5ac566afeb04b"><div class="ttname"><a href="classTiny_1_1Packet.html#a8bc9a3b3f41be292f9c5ac566afeb04b">Tiny::Packet::getString</a></div><div class="ttdeci">char * getString()</div><div class="ttdef"><b>Definition:</b> TinyPacket.h:150</div></div>
<div class="ttc" id="classTiny_1_1Packet_html_a7dfed04418564f93dd4d2b4e9144a861"><div class="ttname"><a href="classTiny_1_1Packet.html#a7dfed04418564f93dd4d2b4e9144a861">Tiny::Packet::getInt16</a></div><div class="ttdeci">int16_t getInt16()</div><div class="ttdef"><b>Definition:</b> TinyPacket.h:138</div></div>
<div class="ttc" id="classTiny_1_1Proto_html"><div class="ttname"><a href="classTiny_1_1Proto.html">Tiny::Proto</a></div><div class="ttdef"><b>Definition:</b> TinyProtocol.h:49</div></div>
<div class="ttc" id="classTiny_1_1Proto_html"><div class="ttname"><a href="classTiny_1_1Proto.html">Tiny::Proto</a></div><div class="ttdef"><b>Definition:</b> TinyProtocol.h:47</div></div>
<div class="ttc" id="classTiny_1_1Packet_html_a9bfdb9244515ef3dbf1056c1e37d0902"><div class="ttname"><a href="classTiny_1_1Packet.html#a9bfdb9244515ef3dbf1056c1e37d0902">Tiny::Packet::clear</a></div><div class="ttdeci">void clear()</div><div class="ttdef"><b>Definition:</b> TinyPacket.h:57</div></div>
<div class="ttc" id="classTiny_1_1Packet_html_a3307ba504caba9c5eee8f1f32cf1a749"><div class="ttname"><a href="classTiny_1_1Packet.html#a3307ba504caba9c5eee8f1f32cf1a749">Tiny::Packet::data</a></div><div class="ttdeci">char * data()</div><div class="ttdef"><b>Definition:</b> TinyPacket.h:177</div></div>
<div class="ttc" id="classTiny_1_1Packet_html_a872f81d4ad35e49b232101c7c12e34f2"><div class="ttname"><a href="classTiny_1_1Packet.html#a872f81d4ad35e49b232101c7c12e34f2">Tiny::Packet::size</a></div><div class="ttdeci">size_t size()</div><div class="ttdef"><b>Definition:</b> TinyPacket.h:165</div></div>
Expand Down
128 changes: 128 additions & 0 deletions docs/TinyProtocolHd_8h.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,128 @@
<!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.9.1"/>
<title>Tiny protocol: src/arduino/src/TinyProtocolHd.h File Reference</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>
<script type="text/javascript">
$(document).ready(function() { init_search(); });
</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 style="padding-left: 0.5em;">
<div id="projectname">Tiny protocol
&#160;<span id="projectnumber">0.5.1</span>
</div>
<div id="projectbrief">Tiny communication protocol for microcontrollers</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.9.1 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
<div id="navrow1" class="tabs">
<ul class="tablist">
<li><a href="index.html"><span>Main&#160;Page</span></a></li>
<li><a href="modules.html"><span>Modules</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>
<div id="MSearchBox" class="MSearchBoxInactive">
<span class="left">
<img id="MSearchSelect" src="search/mag_sel.png"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
alt=""/>
<input type="text" id="MSearchField" value="Search" accesskey="S"
onfocus="searchBox.OnSearchFieldFocus(true)"
onblur="searchBox.OnSearchFieldFocus(false)"
onkeyup="searchBox.OnSearchFieldChange(event)"/>
</span><span class="right">
<a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
</span>
</div>
</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>
<!-- 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_3e42aa6796a3a78f57885b4cb0673062.html">arduino</a></li><li class="navelem"><a class="el" href="dir_fbd7474d75b2cb28dc50fdd7e41ac0c8.html">src</a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="summary">
<a href="#nested-classes">Classes</a> </div>
<div class="headertitle">
<div class="title">TinyProtocolHd.h File Reference</div> </div>
</div><!--header-->
<div class="contents">

<p>Tiny protocol Arduino API.
<a href="#details">More...</a></p>
<div class="textblock"><code>#include &quot;<a class="el" href="TinyPacket_8h_source.html">TinyPacket.h</a>&quot;</code><br />
<code>#include &quot;proto/tiny_hd.h&quot;</code><br />
<code>#include &lt;HardwareSerial.h&gt;</code><br />
</div><div class="textblock"><div class="dynheader">
Include dependency graph for TinyProtocolHd.h:</div>
<div class="dyncontent">
<div class="center"><img src="TinyProtocolHd_8h__incl.png" border="0" usemap="#src_2arduino_2src_2TinyProtocolHd_8h" alt=""/></div>
<map name="src_2arduino_2src_2TinyProtocolHd_8h" id="src_2arduino_2src_2TinyProtocolHd_8h">
<area shape="rect" id="node2" href="TinyPacket_8h.html" title="Tiny protocol Arduino API. " alt="" coords="5,102,104,129"/></map>
</div>
</div>
<p><a href="TinyProtocolHd_8h_source.html">Go to the source code of this file.</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="nested-classes"></a>
Classes</h2></td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">class &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classTiny_1_1ProtoHd.html">Tiny::ProtoHd</a></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Tiny protocol Arduino API. </p>
<p>This is Tiny protocol implementation for microcontrollers </p>
</div></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.9.1
</small></address>
</body>
</html>
3 changes: 3 additions & 0 deletions docs/TinyProtocolHd_8h__incl.map
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<map id="src/arduino/src/TinyProtocolHd.h" name="src/arduino/src/TinyProtocolHd.h">
<area shape="rect" id="node2" href="$TinyPacket_8h.html" title="Tiny protocol Arduino API. " alt="" coords="5,102,104,129"/>
</map>
1 change: 1 addition & 0 deletions docs/TinyProtocolHd_8h__incl.md5
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
da3142091a6ae1dc001cb01d45521465
Binary file added docs/TinyProtocolHd_8h__incl.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 840b8f1

Please sign in to comment.