global_8h.html 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350
  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: global.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="#func-members">Functions</a> &#124;
  85. <a href="#var-members">Variables</a> </div>
  86. <div class="headertitle">
  87. <div class="title">global.h File Reference</div> </div>
  88. </div><!--header-->
  89. <div class="contents">
  90. <div class="textblock"><code>#include &lt;pthread.h&gt;</code><br />
  91. </div>
  92. <p><a href="global_8h_source.html">Go to the source code of this file.</a></p>
  93. <table class="memberdecls">
  94. <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="define-members"></a>
  95. Macros</h2></td></tr>
  96. <tr class="memitem:aa8cbb3355883e35c18820bfa63c4ce3a"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="global_8h.html#aa8cbb3355883e35c18820bfa63c4ce3a">SPI_CHANNEL</a>&#160;&#160;&#160;1</td></tr>
  97. <tr class="separator:aa8cbb3355883e35c18820bfa63c4ce3a"><td class="memSeparator" colspan="2">&#160;</td></tr>
  98. <tr class="memitem:a0056b7fdd0f81fad9cd38e9fd389a4b6"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="global_8h.html#a0056b7fdd0f81fad9cd38e9fd389a4b6">SPI_SPEED</a>&#160;&#160;&#160;200000</td></tr>
  99. <tr class="separator:a0056b7fdd0f81fad9cd38e9fd389a4b6"><td class="memSeparator" colspan="2">&#160;</td></tr>
  100. <tr class="memitem:a91dee3a4ce745234c8a4998388d6c645"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="global_8h.html#a91dee3a4ce745234c8a4998388d6c645">TIMER_DELAY_US</a>&#160;&#160;&#160;50000</td></tr>
  101. <tr class="separator:a91dee3a4ce745234c8a4998388d6c645"><td class="memSeparator" colspan="2">&#160;</td></tr>
  102. <tr class="memitem:ad55c274bf698014e01dbc9afde3fc610"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="global_8h.html#ad55c274bf698014e01dbc9afde3fc610">SQL_DATABASE</a>&#160;&#160;&#160;&quot;coffee.sqlite&quot;</td></tr>
  103. <tr class="separator:ad55c274bf698014e01dbc9afde3fc610"><td class="memSeparator" colspan="2">&#160;</td></tr>
  104. <tr class="memitem:a67a7c5f1e4a75f1508395d450895990d"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="global_8h.html#a67a7c5f1e4a75f1508395d450895990d">THREAD_MAIN</a>&#160;&#160;&#160;0</td></tr>
  105. <tr class="separator:a67a7c5f1e4a75f1508395d450895990d"><td class="memSeparator" colspan="2">&#160;</td></tr>
  106. <tr class="memitem:a77f390a98c0e73ae38abd20f467d6cce"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="global_8h.html#a77f390a98c0e73ae38abd20f467d6cce">THREAD_STRIPE</a>&#160;&#160;&#160;1</td></tr>
  107. <tr class="separator:a77f390a98c0e73ae38abd20f467d6cce"><td class="memSeparator" colspan="2">&#160;</td></tr>
  108. <tr class="memitem:a843e1fa4b4de70b9f31d42a41a896c1c"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="global_8h.html#a843e1fa4b4de70b9f31d42a41a896c1c">THREAD_DISPLAY</a>&#160;&#160;&#160;2</td></tr>
  109. <tr class="separator:a843e1fa4b4de70b9f31d42a41a896c1c"><td class="memSeparator" colspan="2">&#160;</td></tr>
  110. <tr class="memitem:a5f697926bb7bcc4722a9e650a1acdb6a"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="global_8h.html#a5f697926bb7bcc4722a9e650a1acdb6a">THREAD_COFFEE</a>&#160;&#160;&#160;3</td></tr>
  111. <tr class="separator:a5f697926bb7bcc4722a9e650a1acdb6a"><td class="memSeparator" colspan="2">&#160;</td></tr>
  112. </table><table class="memberdecls">
  113. <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
  114. Functions</h2></td></tr>
  115. <tr class="memitem:ab6e46b0071bb3330546b7f2b601d0a6c"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="global_8h.html#ab6e46b0071bb3330546b7f2b601d0a6c">killThread</a> (int threadid, int sig)</td></tr>
  116. <tr class="memdesc:ab6e46b0071bb3330546b7f2b601d0a6c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sends a signal to a thread. <a href="#ab6e46b0071bb3330546b7f2b601d0a6c">More...</a><br /></td></tr>
  117. <tr class="separator:ab6e46b0071bb3330546b7f2b601d0a6c"><td class="memSeparator" colspan="2">&#160;</td></tr>
  118. </table><table class="memberdecls">
  119. <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="var-members"></a>
  120. Variables</h2></td></tr>
  121. <tr class="memitem:a0b2caeb4b6f130be43e5a2f0267dd453"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="global_8h.html#a0b2caeb4b6f130be43e5a2f0267dd453">verbose</a></td></tr>
  122. <tr class="separator:a0b2caeb4b6f130be43e5a2f0267dd453"><td class="memSeparator" colspan="2">&#160;</td></tr>
  123. <tr class="memitem:ae88c926fe2a10f736eb01b1d1e899a1c"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="global_8h.html#ae88c926fe2a10f736eb01b1d1e899a1c">optDate</a></td></tr>
  124. <tr class="separator:ae88c926fe2a10f736eb01b1d1e899a1c"><td class="memSeparator" colspan="2">&#160;</td></tr>
  125. <tr class="memitem:a7bfeade3d2f19e8baecdcddd7f9162fa"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="global_8h.html#a7bfeade3d2f19e8baecdcddd7f9162fa">optPower</a></td></tr>
  126. <tr class="separator:a7bfeade3d2f19e8baecdcddd7f9162fa"><td class="memSeparator" colspan="2">&#160;</td></tr>
  127. <tr class="memitem:a2a24ab7c0142e353c9ce9ca1ee1210bb"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="global_8h.html#a2a24ab7c0142e353c9ce9ca1ee1210bb">optCold</a></td></tr>
  128. <tr class="separator:a2a24ab7c0142e353c9ce9ca1ee1210bb"><td class="memSeparator" colspan="2">&#160;</td></tr>
  129. <tr class="memitem:a4acff8232e4aec9cd5c6dc200ac55ef3"><td class="memItemLeft" align="right" valign="top">pthread_mutex_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="global_8h.html#a4acff8232e4aec9cd5c6dc200ac55ef3">mutex</a></td></tr>
  130. <tr class="separator:a4acff8232e4aec9cd5c6dc200ac55ef3"><td class="memSeparator" colspan="2">&#160;</td></tr>
  131. <tr class="memitem:a5e61240888e929e526f41e19b6c0bd46"><td class="memItemLeft" align="right" valign="top">pthread_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="global_8h.html#a5e61240888e929e526f41e19b6c0bd46">thread</a> []</td></tr>
  132. <tr class="separator:a5e61240888e929e526f41e19b6c0bd46"><td class="memSeparator" colspan="2">&#160;</td></tr>
  133. </table>
  134. <h2 class="groupheader">Macro Definition Documentation</h2>
  135. <a class="anchor" id="aa8cbb3355883e35c18820bfa63c4ce3a"></a>
  136. <div class="memitem">
  137. <div class="memproto">
  138. <table class="memname">
  139. <tr>
  140. <td class="memname">#define SPI_CHANNEL&#160;&#160;&#160;1</td>
  141. </tr>
  142. </table>
  143. </div><div class="memdoc">
  144. </div>
  145. </div>
  146. <a class="anchor" id="a0056b7fdd0f81fad9cd38e9fd389a4b6"></a>
  147. <div class="memitem">
  148. <div class="memproto">
  149. <table class="memname">
  150. <tr>
  151. <td class="memname">#define SPI_SPEED&#160;&#160;&#160;200000</td>
  152. </tr>
  153. </table>
  154. </div><div class="memdoc">
  155. </div>
  156. </div>
  157. <a class="anchor" id="ad55c274bf698014e01dbc9afde3fc610"></a>
  158. <div class="memitem">
  159. <div class="memproto">
  160. <table class="memname">
  161. <tr>
  162. <td class="memname">#define SQL_DATABASE&#160;&#160;&#160;&quot;coffee.sqlite&quot;</td>
  163. </tr>
  164. </table>
  165. </div><div class="memdoc">
  166. </div>
  167. </div>
  168. <a class="anchor" id="a5f697926bb7bcc4722a9e650a1acdb6a"></a>
  169. <div class="memitem">
  170. <div class="memproto">
  171. <table class="memname">
  172. <tr>
  173. <td class="memname">#define THREAD_COFFEE&#160;&#160;&#160;3</td>
  174. </tr>
  175. </table>
  176. </div><div class="memdoc">
  177. </div>
  178. </div>
  179. <a class="anchor" id="a843e1fa4b4de70b9f31d42a41a896c1c"></a>
  180. <div class="memitem">
  181. <div class="memproto">
  182. <table class="memname">
  183. <tr>
  184. <td class="memname">#define THREAD_DISPLAY&#160;&#160;&#160;2</td>
  185. </tr>
  186. </table>
  187. </div><div class="memdoc">
  188. </div>
  189. </div>
  190. <a class="anchor" id="a67a7c5f1e4a75f1508395d450895990d"></a>
  191. <div class="memitem">
  192. <div class="memproto">
  193. <table class="memname">
  194. <tr>
  195. <td class="memname">#define THREAD_MAIN&#160;&#160;&#160;0</td>
  196. </tr>
  197. </table>
  198. </div><div class="memdoc">
  199. </div>
  200. </div>
  201. <a class="anchor" id="a77f390a98c0e73ae38abd20f467d6cce"></a>
  202. <div class="memitem">
  203. <div class="memproto">
  204. <table class="memname">
  205. <tr>
  206. <td class="memname">#define THREAD_STRIPE&#160;&#160;&#160;1</td>
  207. </tr>
  208. </table>
  209. </div><div class="memdoc">
  210. </div>
  211. </div>
  212. <a class="anchor" id="a91dee3a4ce745234c8a4998388d6c645"></a>
  213. <div class="memitem">
  214. <div class="memproto">
  215. <table class="memname">
  216. <tr>
  217. <td class="memname">#define TIMER_DELAY_US&#160;&#160;&#160;50000</td>
  218. </tr>
  219. </table>
  220. </div><div class="memdoc">
  221. </div>
  222. </div>
  223. <h2 class="groupheader">Function Documentation</h2>
  224. <a class="anchor" id="ab6e46b0071bb3330546b7f2b601d0a6c"></a>
  225. <div class="memitem">
  226. <div class="memproto">
  227. <table class="memname">
  228. <tr>
  229. <td class="memname">void killThread </td>
  230. <td>(</td>
  231. <td class="paramtype">int&#160;</td>
  232. <td class="paramname"><em>threadid</em>, </td>
  233. </tr>
  234. <tr>
  235. <td class="paramkey"></td>
  236. <td></td>
  237. <td class="paramtype">int&#160;</td>
  238. <td class="paramname"><em>sig</em>&#160;</td>
  239. </tr>
  240. <tr>
  241. <td></td>
  242. <td>)</td>
  243. <td></td><td></td>
  244. </tr>
  245. </table>
  246. </div><div class="memdoc">
  247. <p>Sends a signal to a thread. </p>
  248. <dl class="params"><dt>Parameters</dt><dd>
  249. <table class="params">
  250. <tr><td class="paramname">threadid</td><td>ID of the thread </td></tr>
  251. <tr><td class="paramname">sig</td><td>Signal to send </td></tr>
  252. </table>
  253. </dd>
  254. </dl>
  255. </div>
  256. </div>
  257. <h2 class="groupheader">Variable Documentation</h2>
  258. <a class="anchor" id="a4acff8232e4aec9cd5c6dc200ac55ef3"></a>
  259. <div class="memitem">
  260. <div class="memproto">
  261. <table class="memname">
  262. <tr>
  263. <td class="memname">pthread_mutex_t mutex</td>
  264. </tr>
  265. </table>
  266. </div><div class="memdoc">
  267. </div>
  268. </div>
  269. <a class="anchor" id="a2a24ab7c0142e353c9ce9ca1ee1210bb"></a>
  270. <div class="memitem">
  271. <div class="memproto">
  272. <table class="memname">
  273. <tr>
  274. <td class="memname">bool optCold</td>
  275. </tr>
  276. </table>
  277. </div><div class="memdoc">
  278. </div>
  279. </div>
  280. <a class="anchor" id="ae88c926fe2a10f736eb01b1d1e899a1c"></a>
  281. <div class="memitem">
  282. <div class="memproto">
  283. <table class="memname">
  284. <tr>
  285. <td class="memname">bool optDate</td>
  286. </tr>
  287. </table>
  288. </div><div class="memdoc">
  289. </div>
  290. </div>
  291. <a class="anchor" id="a7bfeade3d2f19e8baecdcddd7f9162fa"></a>
  292. <div class="memitem">
  293. <div class="memproto">
  294. <table class="memname">
  295. <tr>
  296. <td class="memname">bool optPower</td>
  297. </tr>
  298. </table>
  299. </div><div class="memdoc">
  300. </div>
  301. </div>
  302. <a class="anchor" id="a5e61240888e929e526f41e19b6c0bd46"></a>
  303. <div class="memitem">
  304. <div class="memproto">
  305. <table class="memname">
  306. <tr>
  307. <td class="memname">pthread_t thread[]</td>
  308. </tr>
  309. </table>
  310. </div><div class="memdoc">
  311. </div>
  312. </div>
  313. <a class="anchor" id="a0b2caeb4b6f130be43e5a2f0267dd453"></a>
  314. <div class="memitem">
  315. <div class="memproto">
  316. <table class="memname">
  317. <tr>
  318. <td class="memname">int verbose</td>
  319. </tr>
  320. </table>
  321. </div><div class="memdoc">
  322. </div>
  323. </div>
  324. </div><!-- contents -->
  325. <!-- start footer part -->
  326. <hr class="footer"/><address class="footer"><small>
  327. Generated by &#160;<a href="http://www.doxygen.org/index.html">
  328. <img class="footer" src="doxygen.png" alt="doxygen"/>
  329. </a> 1.8.10
  330. </small></address>
  331. </body>
  332. </html>