crc_8h.html 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  2. <html xmlns="http://www.w3.org/1999/xhtml">
  3. <head>
  4. <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
  5. <meta http-equiv="X-UA-Compatible" content="IE=9"/>
  6. <meta name="generator" content="Doxygen 1.8.10"/>
  7. <title>CoffeePi: crc.h File Reference</title>
  8. <link href="tabs.css" rel="stylesheet" type="text/css"/>
  9. <script type="text/javascript" src="jquery.js"></script>
  10. <script type="text/javascript" src="dynsections.js"></script>
  11. <link href="search/search.css" rel="stylesheet" type="text/css"/>
  12. <script type="text/javascript" src="search/searchdata.js"></script>
  13. <script type="text/javascript" src="search/search.js"></script>
  14. <script type="text/javascript">
  15. $(document).ready(function() { init_search(); });
  16. </script>
  17. <link href="doxygen.css" rel="stylesheet" type="text/css" />
  18. </head>
  19. <body>
  20. <div id="top"><!-- do not remove this div, it is closed by doxygen! -->
  21. <div id="titlearea">
  22. <table cellspacing="0" cellpadding="0">
  23. <tbody>
  24. <tr style="height: 56px;">
  25. <td id="projectalign" style="padding-left: 0.5em;">
  26. <div id="projectname">CoffeePi
  27. </div>
  28. <div id="projectbrief">Coffee machine control for Raspberry Pi</div>
  29. </td>
  30. </tr>
  31. </tbody>
  32. </table>
  33. </div>
  34. <!-- end header part -->
  35. <!-- Generated by Doxygen 1.8.10 -->
  36. <script type="text/javascript">
  37. var searchBox = new SearchBox("searchBox", "search",false,'Search');
  38. </script>
  39. <div id="navrow1" class="tabs">
  40. <ul class="tablist">
  41. <li><a href="index.html"><span>Main&#160;Page</span></a></li>
  42. <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
  43. <li class="current"><a href="files.html"><span>Files</span></a></li>
  44. <li>
  45. <div id="MSearchBox" class="MSearchBoxInactive">
  46. <span class="left">
  47. <img id="MSearchSelect" src="search/mag_sel.png"
  48. onmouseover="return searchBox.OnSearchSelectShow()"
  49. onmouseout="return searchBox.OnSearchSelectHide()"
  50. alt=""/>
  51. <input type="text" id="MSearchField" value="Search" accesskey="S"
  52. onfocus="searchBox.OnSearchFieldFocus(true)"
  53. onblur="searchBox.OnSearchFieldFocus(false)"
  54. onkeyup="searchBox.OnSearchFieldChange(event)"/>
  55. </span><span class="right">
  56. <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
  57. </span>
  58. </div>
  59. </li>
  60. </ul>
  61. </div>
  62. <div id="navrow2" class="tabs2">
  63. <ul class="tablist">
  64. <li><a href="files.html"><span>File&#160;List</span></a></li>
  65. <li><a href="globals.html"><span>Globals</span></a></li>
  66. </ul>
  67. </div>
  68. <!-- window showing the filter options -->
  69. <div id="MSearchSelectWindow"
  70. onmouseover="return searchBox.OnSearchSelectShow()"
  71. onmouseout="return searchBox.OnSearchSelectHide()"
  72. onkeydown="return searchBox.OnSearchSelectKey(event)">
  73. </div>
  74. <!-- iframe showing the search results (closed by default) -->
  75. <div id="MSearchResultsWindow">
  76. <iframe src="javascript:void(0)" frameborder="0"
  77. name="MSearchResults" id="MSearchResults">
  78. </iframe>
  79. </div>
  80. </div><!-- top -->
  81. <div class="header">
  82. <div class="summary">
  83. <a href="#define-members">Macros</a> &#124;
  84. <a href="#typedef-members">Typedefs</a> &#124;
  85. <a href="#func-members">Functions</a> </div>
  86. <div class="headertitle">
  87. <div class="title">crc.h File Reference</div> </div>
  88. </div><!--header-->
  89. <div class="contents">
  90. <p><a href="crc_8h_source.html">Go to the source code of this file.</a></p>
  91. <table class="memberdecls">
  92. <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="define-members"></a>
  93. Macros</h2></td></tr>
  94. <tr class="memitem:aa93f0eb578d23995850d61f7d61c55c1"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="crc_8h.html#aa93f0eb578d23995850d61f7d61c55c1">FALSE</a>&#160;&#160;&#160;0</td></tr>
  95. <tr class="separator:aa93f0eb578d23995850d61f7d61c55c1"><td class="memSeparator" colspan="2">&#160;</td></tr>
  96. <tr class="memitem:aa8cecfc5c5c054d2875c03e77b7be15d"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="crc_8h.html#aa8cecfc5c5c054d2875c03e77b7be15d">TRUE</a>&#160;&#160;&#160;!<a class="el" href="lcd_8cpp.html#aa93f0eb578d23995850d61f7d61c55c1">FALSE</a></td></tr>
  97. <tr class="separator:aa8cecfc5c5c054d2875c03e77b7be15d"><td class="memSeparator" colspan="2">&#160;</td></tr>
  98. <tr class="memitem:a491e419c18fbc5c7cb4a2cd901e31440"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="crc_8h.html#a491e419c18fbc5c7cb4a2cd901e31440">CRC32</a></td></tr>
  99. <tr class="separator:a491e419c18fbc5c7cb4a2cd901e31440"><td class="memSeparator" colspan="2">&#160;</td></tr>
  100. <tr class="memitem:ad679f457b8d23bfed7ccf1b9584e8514"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="crc_8h.html#ad679f457b8d23bfed7ccf1b9584e8514">CRC_NAME</a>&#160;&#160;&#160;&quot;CRC-32&quot;</td></tr>
  101. <tr class="separator:ad679f457b8d23bfed7ccf1b9584e8514"><td class="memSeparator" colspan="2">&#160;</td></tr>
  102. <tr class="memitem:ae13d91fe6e514f0aa1caba701ef1ff92"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="crc_8h.html#ae13d91fe6e514f0aa1caba701ef1ff92">POLYNOMIAL</a>&#160;&#160;&#160;0x04C11DB7</td></tr>
  103. <tr class="separator:ae13d91fe6e514f0aa1caba701ef1ff92"><td class="memSeparator" colspan="2">&#160;</td></tr>
  104. <tr class="memitem:acce5b79e1a8ad8ffe40fb9f7d63b2fdc"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="crc_8h.html#acce5b79e1a8ad8ffe40fb9f7d63b2fdc">INITIAL_REMAINDER</a>&#160;&#160;&#160;0xFFFFFFFF</td></tr>
  105. <tr class="separator:acce5b79e1a8ad8ffe40fb9f7d63b2fdc"><td class="memSeparator" colspan="2">&#160;</td></tr>
  106. <tr class="memitem:a5e491822bb6a5bf7114dd453ab48891e"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="crc_8h.html#a5e491822bb6a5bf7114dd453ab48891e">FINAL_XOR_VALUE</a>&#160;&#160;&#160;0xFFFFFFFF</td></tr>
  107. <tr class="separator:a5e491822bb6a5bf7114dd453ab48891e"><td class="memSeparator" colspan="2">&#160;</td></tr>
  108. <tr class="memitem:af6653e78d37b912d592ffc6e96eb7abb"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="crc_8h.html#af6653e78d37b912d592ffc6e96eb7abb">REFLECT_DATA</a>&#160;&#160;&#160;<a class="el" href="lcd_8cpp.html#aa8cecfc5c5c054d2875c03e77b7be15d">TRUE</a></td></tr>
  109. <tr class="separator:af6653e78d37b912d592ffc6e96eb7abb"><td class="memSeparator" colspan="2">&#160;</td></tr>
  110. <tr class="memitem:a5aa89bef30ad5bd061deda3eef36e327"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="crc_8h.html#a5aa89bef30ad5bd061deda3eef36e327">REFLECT_REMAINDER</a>&#160;&#160;&#160;<a class="el" href="lcd_8cpp.html#aa8cecfc5c5c054d2875c03e77b7be15d">TRUE</a></td></tr>
  111. <tr class="separator:a5aa89bef30ad5bd061deda3eef36e327"><td class="memSeparator" colspan="2">&#160;</td></tr>
  112. <tr class="memitem:aee81a10f43f9dc645ba69a7407c151d0"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="crc_8h.html#aee81a10f43f9dc645ba69a7407c151d0">CHECK_VALUE</a>&#160;&#160;&#160;0xCBF43926</td></tr>
  113. <tr class="separator:aee81a10f43f9dc645ba69a7407c151d0"><td class="memSeparator" colspan="2">&#160;</td></tr>
  114. </table><table class="memberdecls">
  115. <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="typedef-members"></a>
  116. Typedefs</h2></td></tr>
  117. <tr class="memitem:a73364f0434186bc77eaa8e3b03a437be"><td class="memItemLeft" align="right" valign="top">typedef unsigned long&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="crc_8h.html#a73364f0434186bc77eaa8e3b03a437be">crc</a></td></tr>
  118. <tr class="separator:a73364f0434186bc77eaa8e3b03a437be"><td class="memSeparator" colspan="2">&#160;</td></tr>
  119. </table><table class="memberdecls">
  120. <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
  121. Functions</h2></td></tr>
  122. <tr class="memitem:a5a735798e6972adc694a5428dd7ccaf9"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="crc_8h.html#a5a735798e6972adc694a5428dd7ccaf9">crcInit</a> (void)</td></tr>
  123. <tr class="separator:a5a735798e6972adc694a5428dd7ccaf9"><td class="memSeparator" colspan="2">&#160;</td></tr>
  124. <tr class="memitem:a027c2916f24b3daaf662408cc72026b1"><td class="memItemLeft" align="right" valign="top"><a class="el" href="crc_8h.html#a73364f0434186bc77eaa8e3b03a437be">crc</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="crc_8h.html#a027c2916f24b3daaf662408cc72026b1">crcSlow</a> (unsigned char const message[], int nBytes)</td></tr>
  125. <tr class="separator:a027c2916f24b3daaf662408cc72026b1"><td class="memSeparator" colspan="2">&#160;</td></tr>
  126. <tr class="memitem:a31e9ca3a3979a4c1e5043f5bfa5befaf"><td class="memItemLeft" align="right" valign="top"><a class="el" href="crc_8h.html#a73364f0434186bc77eaa8e3b03a437be">crc</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="crc_8h.html#a31e9ca3a3979a4c1e5043f5bfa5befaf">crcFast</a> (unsigned char const message[], int nBytes)</td></tr>
  127. <tr class="separator:a31e9ca3a3979a4c1e5043f5bfa5befaf"><td class="memSeparator" colspan="2">&#160;</td></tr>
  128. </table>
  129. <h2 class="groupheader">Macro Definition Documentation</h2>
  130. <a class="anchor" id="aee81a10f43f9dc645ba69a7407c151d0"></a>
  131. <div class="memitem">
  132. <div class="memproto">
  133. <table class="memname">
  134. <tr>
  135. <td class="memname">#define CHECK_VALUE&#160;&#160;&#160;0xCBF43926</td>
  136. </tr>
  137. </table>
  138. </div><div class="memdoc">
  139. </div>
  140. </div>
  141. <a class="anchor" id="a491e419c18fbc5c7cb4a2cd901e31440"></a>
  142. <div class="memitem">
  143. <div class="memproto">
  144. <table class="memname">
  145. <tr>
  146. <td class="memname">#define CRC32</td>
  147. </tr>
  148. </table>
  149. </div><div class="memdoc">
  150. </div>
  151. </div>
  152. <a class="anchor" id="ad679f457b8d23bfed7ccf1b9584e8514"></a>
  153. <div class="memitem">
  154. <div class="memproto">
  155. <table class="memname">
  156. <tr>
  157. <td class="memname">#define CRC_NAME&#160;&#160;&#160;&quot;CRC-32&quot;</td>
  158. </tr>
  159. </table>
  160. </div><div class="memdoc">
  161. </div>
  162. </div>
  163. <a class="anchor" id="aa93f0eb578d23995850d61f7d61c55c1"></a>
  164. <div class="memitem">
  165. <div class="memproto">
  166. <table class="memname">
  167. <tr>
  168. <td class="memname">#define FALSE&#160;&#160;&#160;0</td>
  169. </tr>
  170. </table>
  171. </div><div class="memdoc">
  172. </div>
  173. </div>
  174. <a class="anchor" id="a5e491822bb6a5bf7114dd453ab48891e"></a>
  175. <div class="memitem">
  176. <div class="memproto">
  177. <table class="memname">
  178. <tr>
  179. <td class="memname">#define FINAL_XOR_VALUE&#160;&#160;&#160;0xFFFFFFFF</td>
  180. </tr>
  181. </table>
  182. </div><div class="memdoc">
  183. </div>
  184. </div>
  185. <a class="anchor" id="acce5b79e1a8ad8ffe40fb9f7d63b2fdc"></a>
  186. <div class="memitem">
  187. <div class="memproto">
  188. <table class="memname">
  189. <tr>
  190. <td class="memname">#define INITIAL_REMAINDER&#160;&#160;&#160;0xFFFFFFFF</td>
  191. </tr>
  192. </table>
  193. </div><div class="memdoc">
  194. </div>
  195. </div>
  196. <a class="anchor" id="ae13d91fe6e514f0aa1caba701ef1ff92"></a>
  197. <div class="memitem">
  198. <div class="memproto">
  199. <table class="memname">
  200. <tr>
  201. <td class="memname">#define POLYNOMIAL&#160;&#160;&#160;0x04C11DB7</td>
  202. </tr>
  203. </table>
  204. </div><div class="memdoc">
  205. </div>
  206. </div>
  207. <a class="anchor" id="af6653e78d37b912d592ffc6e96eb7abb"></a>
  208. <div class="memitem">
  209. <div class="memproto">
  210. <table class="memname">
  211. <tr>
  212. <td class="memname">#define REFLECT_DATA&#160;&#160;&#160;<a class="el" href="lcd_8cpp.html#aa8cecfc5c5c054d2875c03e77b7be15d">TRUE</a></td>
  213. </tr>
  214. </table>
  215. </div><div class="memdoc">
  216. </div>
  217. </div>
  218. <a class="anchor" id="a5aa89bef30ad5bd061deda3eef36e327"></a>
  219. <div class="memitem">
  220. <div class="memproto">
  221. <table class="memname">
  222. <tr>
  223. <td class="memname">#define REFLECT_REMAINDER&#160;&#160;&#160;<a class="el" href="lcd_8cpp.html#aa8cecfc5c5c054d2875c03e77b7be15d">TRUE</a></td>
  224. </tr>
  225. </table>
  226. </div><div class="memdoc">
  227. </div>
  228. </div>
  229. <a class="anchor" id="aa8cecfc5c5c054d2875c03e77b7be15d"></a>
  230. <div class="memitem">
  231. <div class="memproto">
  232. <table class="memname">
  233. <tr>
  234. <td class="memname">#define TRUE&#160;&#160;&#160;!<a class="el" href="lcd_8cpp.html#aa93f0eb578d23995850d61f7d61c55c1">FALSE</a></td>
  235. </tr>
  236. </table>
  237. </div><div class="memdoc">
  238. </div>
  239. </div>
  240. <h2 class="groupheader">Typedef Documentation</h2>
  241. <a class="anchor" id="a73364f0434186bc77eaa8e3b03a437be"></a>
  242. <div class="memitem">
  243. <div class="memproto">
  244. <table class="memname">
  245. <tr>
  246. <td class="memname">typedef unsigned long <a class="el" href="crc_8h.html#a73364f0434186bc77eaa8e3b03a437be">crc</a></td>
  247. </tr>
  248. </table>
  249. </div><div class="memdoc">
  250. </div>
  251. </div>
  252. <h2 class="groupheader">Function Documentation</h2>
  253. <a class="anchor" id="a31e9ca3a3979a4c1e5043f5bfa5befaf"></a>
  254. <div class="memitem">
  255. <div class="memproto">
  256. <table class="memname">
  257. <tr>
  258. <td class="memname"><a class="el" href="crc_8h.html#a73364f0434186bc77eaa8e3b03a437be">crc</a> crcFast </td>
  259. <td>(</td>
  260. <td class="paramtype">unsigned char const&#160;</td>
  261. <td class="paramname"><em>message</em>[], </td>
  262. </tr>
  263. <tr>
  264. <td class="paramkey"></td>
  265. <td></td>
  266. <td class="paramtype">int&#160;</td>
  267. <td class="paramname"><em>nBytes</em>&#160;</td>
  268. </tr>
  269. <tr>
  270. <td></td>
  271. <td>)</td>
  272. <td></td><td></td>
  273. </tr>
  274. </table>
  275. </div><div class="memdoc">
  276. </div>
  277. </div>
  278. <a class="anchor" id="a5a735798e6972adc694a5428dd7ccaf9"></a>
  279. <div class="memitem">
  280. <div class="memproto">
  281. <table class="memname">
  282. <tr>
  283. <td class="memname">void crcInit </td>
  284. <td>(</td>
  285. <td class="paramtype">void&#160;</td>
  286. <td class="paramname"></td><td>)</td>
  287. <td></td>
  288. </tr>
  289. </table>
  290. </div><div class="memdoc">
  291. </div>
  292. </div>
  293. <a class="anchor" id="a027c2916f24b3daaf662408cc72026b1"></a>
  294. <div class="memitem">
  295. <div class="memproto">
  296. <table class="memname">
  297. <tr>
  298. <td class="memname"><a class="el" href="crc_8h.html#a73364f0434186bc77eaa8e3b03a437be">crc</a> crcSlow </td>
  299. <td>(</td>
  300. <td class="paramtype">unsigned char const&#160;</td>
  301. <td class="paramname"><em>message</em>[], </td>
  302. </tr>
  303. <tr>
  304. <td class="paramkey"></td>
  305. <td></td>
  306. <td class="paramtype">int&#160;</td>
  307. <td class="paramname"><em>nBytes</em>&#160;</td>
  308. </tr>
  309. <tr>
  310. <td></td>
  311. <td>)</td>
  312. <td></td><td></td>
  313. </tr>
  314. </table>
  315. </div><div class="memdoc">
  316. </div>
  317. </div>
  318. </div><!-- contents -->
  319. <!-- start footer part -->
  320. <hr class="footer"/><address class="footer"><small>
  321. Generated by &#160;<a href="http://www.doxygen.org/index.html">
  322. <img class="footer" src="doxygen.png" alt="doxygen"/>
  323. </a> 1.8.10
  324. </small></address>
  325. </body>
  326. </html>