123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142 |
- <!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: global.h 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="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>
- </div><!-- top -->
- <!-- 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 class="header">
- <div class="headertitle">
- <div class="title">global.h</div> </div>
- </div><!--header-->
- <div class="contents">
- <a href="global_8h.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno"> 1</span> <span class="comment">/**********************************************************************</span></div>
- <div class="line"><a name="l00002"></a><span class="lineno"> 2</span> <span class="comment"> Universitaet Ulm</span></div>
- <div class="line"><a name="l00003"></a><span class="lineno"> 3</span> <span class="comment"> Abteilung Organisation und Management von Informationssystemen</span></div>
- <div class="line"><a name="l00004"></a><span class="lineno"> 4</span> <span class="comment"></span></div>
- <div class="line"><a name="l00005"></a><span class="lineno"> 5</span> <span class="comment"> Author: Philipp Hinz</span></div>
- <div class="line"><a name="l00006"></a><span class="lineno"> 6</span> <span class="comment"></span></div>
- <div class="line"><a name="l00007"></a><span class="lineno"> 7</span> <span class="comment"> **********************************************************************/</span></div>
- <div class="line"><a name="l00008"></a><span class="lineno"> 8</span> </div>
- <div class="line"><a name="l00009"></a><span class="lineno"> 9</span> <span class="preprocessor">#ifndef _GLOBAL_H_</span></div>
- <div class="line"><a name="l00010"></a><span class="lineno"> 10</span> <span class="preprocessor">#define _GLOBAL_H_</span></div>
- <div class="line"><a name="l00011"></a><span class="lineno"> 11</span> </div>
- <div class="line"><a name="l00012"></a><span class="lineno"> 12</span> <span class="preprocessor">#include <pthread.h></span></div>
- <div class="line"><a name="l00013"></a><span class="lineno"> 13</span> </div>
- <div class="line"><a name="l00014"></a><span class="lineno"><a class="line" href="global_8h.html#aa8cbb3355883e35c18820bfa63c4ce3a"> 14</a></span> <span class="preprocessor">#define SPI_CHANNEL 1 // 0 or 1 on Raspberry Pi</span></div>
- <div class="line"><a name="l00015"></a><span class="lineno"><a class="line" href="global_8h.html#a0056b7fdd0f81fad9cd38e9fd389a4b6"> 15</a></span> <span class="preprocessor">#define SPI_SPEED 200000 // SPI clock speed in Hz</span></div>
- <div class="line"><a name="l00016"></a><span class="lineno"> 16</span> </div>
- <div class="line"><a name="l00017"></a><span class="lineno"><a class="line" href="global_8h.html#a91dee3a4ce745234c8a4998388d6c645"> 17</a></span> <span class="preprocessor">#define TIMER_DELAY_US 50000 // Basic timer delay in us</span></div>
- <div class="line"><a name="l00018"></a><span class="lineno"> 18</span> <span class="comment">// SQL config</span></div>
- <div class="line"><a name="l00019"></a><span class="lineno"> 19</span> </div>
- <div class="line"><a name="l00020"></a><span class="lineno"><a class="line" href="global_8h.html#ad55c274bf698014e01dbc9afde3fc610"> 20</a></span> <span class="preprocessor">#define SQL_DATABASE "coffee.sqlite"</span></div>
- <div class="line"><a name="l00021"></a><span class="lineno"> 21</span> </div>
- <div class="line"><a name="l00022"></a><span class="lineno"> 22</span> <span class="comment">// Global variables</span></div>
- <div class="line"><a name="l00023"></a><span class="lineno"> 23</span> </div>
- <div class="line"><a name="l00024"></a><span class="lineno"> 24</span> <span class="keyword">extern</span> <span class="keywordtype">int</span> <a class="code" href="global_8h.html#a0b2caeb4b6f130be43e5a2f0267dd453">verbose</a>;</div>
- <div class="line"><a name="l00025"></a><span class="lineno"> 25</span> <span class="keyword">extern</span> <span class="keywordtype">bool</span> <a class="code" href="global_8h.html#ae88c926fe2a10f736eb01b1d1e899a1c">optDate</a>, <a class="code" href="global_8h.html#a7bfeade3d2f19e8baecdcddd7f9162fa">optPower</a>, <a class="code" href="global_8h.html#a2a24ab7c0142e353c9ce9ca1ee1210bb">optCold</a>;</div>
- <div class="line"><a name="l00026"></a><span class="lineno"> 26</span> <span class="keyword">extern</span> pthread_mutex_t <a class="code" href="global_8h.html#a4acff8232e4aec9cd5c6dc200ac55ef3">mutex</a>;</div>
- <div class="line"><a name="l00027"></a><span class="lineno"> 27</span> <span class="keyword">extern</span> pthread_t <a class="code" href="global_8h.html#a5e61240888e929e526f41e19b6c0bd46">thread</a>[];</div>
- <div class="line"><a name="l00028"></a><span class="lineno"> 28</span> </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> <span class="comment">// Thread IDs</span></div>
- <div class="line"><a name="l00031"></a><span class="lineno"><a class="line" href="global_8h.html#a67a7c5f1e4a75f1508395d450895990d"> 31</a></span> <span class="preprocessor">#define THREAD_MAIN 0</span></div>
- <div class="line"><a name="l00032"></a><span class="lineno"><a class="line" href="global_8h.html#a77f390a98c0e73ae38abd20f467d6cce"> 32</a></span> <span class="preprocessor">#define THREAD_STRIPE 1</span></div>
- <div class="line"><a name="l00033"></a><span class="lineno"><a class="line" href="global_8h.html#a843e1fa4b4de70b9f31d42a41a896c1c"> 33</a></span> <span class="preprocessor">#define THREAD_DISPLAY 2</span></div>
- <div class="line"><a name="l00034"></a><span class="lineno"><a class="line" href="global_8h.html#a5f697926bb7bcc4722a9e650a1acdb6a"> 34</a></span> <span class="preprocessor">#define THREAD_COFFEE 3</span></div>
- <div class="line"><a name="l00035"></a><span class="lineno"> 35</span> </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> <span class="keywordtype">void</span> <a class="code" href="global_8h.html#ab6e46b0071bb3330546b7f2b601d0a6c">killThread</a>(<span class="keywordtype">int</span> threadid, <span class="keywordtype">int</span> sig);</div>
- <div class="line"><a name="l00038"></a><span class="lineno"> 38</span> </div>
- <div class="line"><a name="l00039"></a><span class="lineno"> 39</span> <span class="preprocessor">#endif</span></div>
- <div class="ttc" id="global_8h_html_ab6e46b0071bb3330546b7f2b601d0a6c"><div class="ttname"><a href="global_8h.html#ab6e46b0071bb3330546b7f2b601d0a6c">killThread</a></div><div class="ttdeci">void killThread(int threadid, int sig)</div><div class="ttdoc">Sends a signal to a thread. </div><div class="ttdef"><b>Definition:</b> main.cpp:216</div></div>
- <div class="ttc" id="global_8h_html_ae88c926fe2a10f736eb01b1d1e899a1c"><div class="ttname"><a href="global_8h.html#ae88c926fe2a10f736eb01b1d1e899a1c">optDate</a></div><div class="ttdeci">bool optDate</div><div class="ttdef"><b>Definition:</b> main.cpp:33</div></div>
- <div class="ttc" id="global_8h_html_a5e61240888e929e526f41e19b6c0bd46"><div class="ttname"><a href="global_8h.html#a5e61240888e929e526f41e19b6c0bd46">thread</a></div><div class="ttdeci">pthread_t thread[]</div><div class="ttdef"><b>Definition:</b> main.cpp:41</div></div>
- <div class="ttc" id="global_8h_html_a4acff8232e4aec9cd5c6dc200ac55ef3"><div class="ttname"><a href="global_8h.html#a4acff8232e4aec9cd5c6dc200ac55ef3">mutex</a></div><div class="ttdeci">pthread_mutex_t mutex</div><div class="ttdef"><b>Definition:</b> main.cpp:42</div></div>
- <div class="ttc" id="global_8h_html_a0b2caeb4b6f130be43e5a2f0267dd453"><div class="ttname"><a href="global_8h.html#a0b2caeb4b6f130be43e5a2f0267dd453">verbose</a></div><div class="ttdeci">int verbose</div><div class="ttdef"><b>Definition:</b> main.cpp:32</div></div>
- <div class="ttc" id="global_8h_html_a2a24ab7c0142e353c9ce9ca1ee1210bb"><div class="ttname"><a href="global_8h.html#a2a24ab7c0142e353c9ce9ca1ee1210bb">optCold</a></div><div class="ttdeci">bool optCold</div><div class="ttdef"><b>Definition:</b> main.cpp:35</div></div>
- <div class="ttc" id="global_8h_html_a7bfeade3d2f19e8baecdcddd7f9162fa"><div class="ttname"><a href="global_8h.html#a7bfeade3d2f19e8baecdcddd7f9162fa">optPower</a></div><div class="ttdeci">bool optPower</div><div class="ttdef"><b>Definition:</b> main.cpp:34</div></div>
- </div><!-- fragment --></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>
|