123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266 |
- <!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.10"/>
- <title>CoffeePi: crc.cpp 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 id="projectalign" style="padding-left: 0.5em;">
- <div id="projectname">CoffeePi
- </div>
- <div id="projectbrief">Coffee machine control for Raspberry Pi</div>
- </td>
- </tr>
- </tbody>
- </table>
- </div>
- <!-- end header part -->
- <!-- Generated by Doxygen 1.8.10 -->
- <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 Page</span></a></li>
- <li><a href="annotated.html"><span>Data Structures</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 List</span></a></li>
- <li><a href="globals.html"><span>Globals</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><!-- top -->
- <div class="header">
- <div class="summary">
- <a href="#define-members">Macros</a> |
- <a href="#func-members">Functions</a> |
- <a href="#var-members">Variables</a> </div>
- <div class="headertitle">
- <div class="title">crc.cpp File Reference</div> </div>
- </div><!--header-->
- <div class="contents">
- <div class="textblock"><code>#include "<a class="el" href="crc_8h_source.html">crc.h</a>"</code><br />
- </div><table class="memberdecls">
- <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="define-members"></a>
- Macros</h2></td></tr>
- <tr class="memitem:a241aeeb764887ae5e3de58b98f04b16d"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="crc_8cpp.html#a241aeeb764887ae5e3de58b98f04b16d">WIDTH</a>   (8 * sizeof(<a class="el" href="crc_8h.html#a73364f0434186bc77eaa8e3b03a437be">crc</a>))</td></tr>
- <tr class="separator:a241aeeb764887ae5e3de58b98f04b16d"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:a118ad552670dbefa1df0ba72d147f5e1"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="crc_8cpp.html#a118ad552670dbefa1df0ba72d147f5e1">TOPBIT</a>   (1 << (<a class="el" href="crc_8cpp.html#a241aeeb764887ae5e3de58b98f04b16d">WIDTH</a> - 1))</td></tr>
- <tr class="separator:a118ad552670dbefa1df0ba72d147f5e1"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:ac5944d40ab44731450a57acd7f027f6a"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="crc_8cpp.html#ac5944d40ab44731450a57acd7f027f6a">REFLECT_DATA</a>(X)   ((unsigned char) reflect((X), 8))</td></tr>
- <tr class="separator:ac5944d40ab44731450a57acd7f027f6a"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:a2354513de80cf643198f44d7030b74d7"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="crc_8cpp.html#a2354513de80cf643198f44d7030b74d7">REFLECT_REMAINDER</a>(X)   ((<a class="el" href="crc_8h.html#a73364f0434186bc77eaa8e3b03a437be">crc</a>) reflect((X), <a class="el" href="crc_8cpp.html#a241aeeb764887ae5e3de58b98f04b16d">WIDTH</a>))</td></tr>
- <tr class="separator:a2354513de80cf643198f44d7030b74d7"><td class="memSeparator" colspan="2"> </td></tr>
- </table><table class="memberdecls">
- <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
- Functions</h2></td></tr>
- <tr class="memitem:a027c2916f24b3daaf662408cc72026b1"><td class="memItemLeft" align="right" valign="top"><a class="el" href="crc_8h.html#a73364f0434186bc77eaa8e3b03a437be">crc</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="crc_8cpp.html#a027c2916f24b3daaf662408cc72026b1">crcSlow</a> (unsigned char const message[], int nBytes)</td></tr>
- <tr class="separator:a027c2916f24b3daaf662408cc72026b1"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:a5a735798e6972adc694a5428dd7ccaf9"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="crc_8cpp.html#a5a735798e6972adc694a5428dd7ccaf9">crcInit</a> (void)</td></tr>
- <tr class="separator:a5a735798e6972adc694a5428dd7ccaf9"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:a31e9ca3a3979a4c1e5043f5bfa5befaf"><td class="memItemLeft" align="right" valign="top"><a class="el" href="crc_8h.html#a73364f0434186bc77eaa8e3b03a437be">crc</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="crc_8cpp.html#a31e9ca3a3979a4c1e5043f5bfa5befaf">crcFast</a> (unsigned char const message[], int nBytes)</td></tr>
- <tr class="separator:a31e9ca3a3979a4c1e5043f5bfa5befaf"><td class="memSeparator" colspan="2"> </td></tr>
- </table><table class="memberdecls">
- <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="var-members"></a>
- Variables</h2></td></tr>
- <tr class="memitem:aa0b98c402a809d26602bb9a693083720"><td class="memItemLeft" align="right" valign="top"><a class="el" href="crc_8h.html#a73364f0434186bc77eaa8e3b03a437be">crc</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="crc_8cpp.html#aa0b98c402a809d26602bb9a693083720">crcTable</a> [256]</td></tr>
- <tr class="separator:aa0b98c402a809d26602bb9a693083720"><td class="memSeparator" colspan="2"> </td></tr>
- </table>
- <h2 class="groupheader">Macro Definition Documentation</h2>
- <a class="anchor" id="ac5944d40ab44731450a57acd7f027f6a"></a>
- <div class="memitem">
- <div class="memproto">
- <table class="memname">
- <tr>
- <td class="memname">#define REFLECT_DATA</td>
- <td>(</td>
- <td class="paramtype"> </td>
- <td class="paramname">X</td><td>)</td>
- <td>   ((unsigned char) reflect((X), 8))</td>
- </tr>
- </table>
- </div><div class="memdoc">
- </div>
- </div>
- <a class="anchor" id="a2354513de80cf643198f44d7030b74d7"></a>
- <div class="memitem">
- <div class="memproto">
- <table class="memname">
- <tr>
- <td class="memname">#define REFLECT_REMAINDER</td>
- <td>(</td>
- <td class="paramtype"> </td>
- <td class="paramname">X</td><td>)</td>
- <td>   ((<a class="el" href="crc_8h.html#a73364f0434186bc77eaa8e3b03a437be">crc</a>) reflect((X), <a class="el" href="crc_8cpp.html#a241aeeb764887ae5e3de58b98f04b16d">WIDTH</a>))</td>
- </tr>
- </table>
- </div><div class="memdoc">
- </div>
- </div>
- <a class="anchor" id="a118ad552670dbefa1df0ba72d147f5e1"></a>
- <div class="memitem">
- <div class="memproto">
- <table class="memname">
- <tr>
- <td class="memname">#define TOPBIT   (1 << (<a class="el" href="crc_8cpp.html#a241aeeb764887ae5e3de58b98f04b16d">WIDTH</a> - 1))</td>
- </tr>
- </table>
- </div><div class="memdoc">
- </div>
- </div>
- <a class="anchor" id="a241aeeb764887ae5e3de58b98f04b16d"></a>
- <div class="memitem">
- <div class="memproto">
- <table class="memname">
- <tr>
- <td class="memname">#define WIDTH   (8 * sizeof(<a class="el" href="crc_8h.html#a73364f0434186bc77eaa8e3b03a437be">crc</a>))</td>
- </tr>
- </table>
- </div><div class="memdoc">
- </div>
- </div>
- <h2 class="groupheader">Function Documentation</h2>
- <a class="anchor" id="a31e9ca3a3979a4c1e5043f5bfa5befaf"></a>
- <div class="memitem">
- <div class="memproto">
- <table class="memname">
- <tr>
- <td class="memname"><a class="el" href="crc_8h.html#a73364f0434186bc77eaa8e3b03a437be">crc</a> crcFast </td>
- <td>(</td>
- <td class="paramtype">unsigned char const </td>
- <td class="paramname"><em>message</em>[], </td>
- </tr>
- <tr>
- <td class="paramkey"></td>
- <td></td>
- <td class="paramtype">int </td>
- <td class="paramname"><em>nBytes</em> </td>
- </tr>
- <tr>
- <td></td>
- <td>)</td>
- <td></td><td></td>
- </tr>
- </table>
- </div><div class="memdoc">
- </div>
- </div>
- <a class="anchor" id="a5a735798e6972adc694a5428dd7ccaf9"></a>
- <div class="memitem">
- <div class="memproto">
- <table class="memname">
- <tr>
- <td class="memname">void crcInit </td>
- <td>(</td>
- <td class="paramtype">void </td>
- <td class="paramname"></td><td>)</td>
- <td></td>
- </tr>
- </table>
- </div><div class="memdoc">
- </div>
- </div>
- <a class="anchor" id="a027c2916f24b3daaf662408cc72026b1"></a>
- <div class="memitem">
- <div class="memproto">
- <table class="memname">
- <tr>
- <td class="memname"><a class="el" href="crc_8h.html#a73364f0434186bc77eaa8e3b03a437be">crc</a> crcSlow </td>
- <td>(</td>
- <td class="paramtype">unsigned char const </td>
- <td class="paramname"><em>message</em>[], </td>
- </tr>
- <tr>
- <td class="paramkey"></td>
- <td></td>
- <td class="paramtype">int </td>
- <td class="paramname"><em>nBytes</em> </td>
- </tr>
- <tr>
- <td></td>
- <td>)</td>
- <td></td><td></td>
- </tr>
- </table>
- </div><div class="memdoc">
- </div>
- </div>
- <h2 class="groupheader">Variable Documentation</h2>
- <a class="anchor" id="aa0b98c402a809d26602bb9a693083720"></a>
- <div class="memitem">
- <div class="memproto">
- <table class="memname">
- <tr>
- <td class="memname"><a class="el" href="crc_8h.html#a73364f0434186bc77eaa8e3b03a437be">crc</a> crcTable[256]</td>
- </tr>
- </table>
- </div><div class="memdoc">
- </div>
- </div>
- </div><!-- contents -->
- <!-- start footer part -->
- <hr class="footer"/><address class="footer"><small>
- Generated by  <a href="http://www.doxygen.org/index.html">
- <img class="footer" src="doxygen.png" alt="doxygen"/>
- </a> 1.8.10
- </small></address>
- </body>
- </html>
|