timer_8h.html 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232
  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: timer.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="#nested-classes">Data Structures</a> &#124;
  84. <a href="#define-members">Macros</a> &#124;
  85. <a href="#func-members">Functions</a> </div>
  86. <div class="headertitle">
  87. <div class="title">timer.h File Reference</div> </div>
  88. </div><!--header-->
  89. <div class="contents">
  90. <p><a href="timer_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="nested-classes"></a>
  93. Data Structures</h2></td></tr>
  94. <tr class="memitem:"><td class="memItemLeft" align="right" valign="top">class &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classtimer.html">timer</a></td></tr>
  95. <tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">Timer Class This class allows the creation of multiple timers that are based by a divider on a single system timer. <a href="classtimer.html#details">More...</a><br /></td></tr>
  96. <tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
  97. </table><table class="memberdecls">
  98. <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="define-members"></a>
  99. Macros</h2></td></tr>
  100. <tr class="memitem:ad6f1d374549d22100d676d5fcac0a7e5"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="timer_8h.html#ad6f1d374549d22100d676d5fcac0a7e5">SIG</a>&#160;&#160;&#160;SIGRTMIN</td></tr>
  101. <tr class="separator:ad6f1d374549d22100d676d5fcac0a7e5"><td class="memSeparator" colspan="2">&#160;</td></tr>
  102. <tr class="memitem:af3ec03c16ee82e8578cfd8fd133d7a6f"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="timer_8h.html#af3ec03c16ee82e8578cfd8fd133d7a6f">errExit</a>(msg) &#160;&#160;&#160;do { perror(msg); exit(EXIT_FAILURE); } while (0)</td></tr>
  103. <tr class="separator:af3ec03c16ee82e8578cfd8fd133d7a6f"><td class="memSeparator" colspan="2">&#160;</td></tr>
  104. <tr class="memitem:a2694a39dfd1fa087ca6f9f391c91dae7"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="timer_8h.html#a2694a39dfd1fa087ca6f9f391c91dae7">CLOCKID</a>&#160;&#160;&#160;CLOCK_REALTIME</td></tr>
  105. <tr class="separator:a2694a39dfd1fa087ca6f9f391c91dae7"><td class="memSeparator" colspan="2">&#160;</td></tr>
  106. </table><table class="memberdecls">
  107. <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
  108. Functions</h2></td></tr>
  109. <tr class="memitem:a9e737e3249388fb2e50d868bad69c688"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="timer_8h.html#a9e737e3249388fb2e50d868bad69c688">initTimers</a> (void)</td></tr>
  110. <tr class="memdesc:a9e737e3249388fb2e50d868bad69c688"><td class="mdescLeft">&#160;</td><td class="mdescRight">inits the system timer based on signals <a href="#a9e737e3249388fb2e50d868bad69c688">More...</a><br /></td></tr>
  111. <tr class="separator:a9e737e3249388fb2e50d868bad69c688"><td class="memSeparator" colspan="2">&#160;</td></tr>
  112. <tr class="memitem:a43ed436d8c1803ced3029a909320a841"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="timer_8h.html#a43ed436d8c1803ced3029a909320a841">stopTimers</a> (void)</td></tr>
  113. <tr class="memdesc:a43ed436d8c1803ced3029a909320a841"><td class="mdescLeft">&#160;</td><td class="mdescRight">Stops all existing timers. <a href="#a43ed436d8c1803ced3029a909320a841">More...</a><br /></td></tr>
  114. <tr class="separator:a43ed436d8c1803ced3029a909320a841"><td class="memSeparator" colspan="2">&#160;</td></tr>
  115. <tr class="memitem:ae9859727c0e51a70b4ff5f47d2527a77"><td class="memItemLeft" align="right" valign="top">void *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="timer_8h.html#ae9859727c0e51a70b4ff5f47d2527a77">nullThread</a> (void *threadid)</td></tr>
  116. <tr class="memdesc:ae9859727c0e51a70b4ff5f47d2527a77"><td class="mdescLeft">&#160;</td><td class="mdescRight">This is a dummy thread. <a href="#ae9859727c0e51a70b4ff5f47d2527a77">More...</a><br /></td></tr>
  117. <tr class="separator:ae9859727c0e51a70b4ff5f47d2527a77"><td class="memSeparator" colspan="2">&#160;</td></tr>
  118. </table>
  119. <h2 class="groupheader">Macro Definition Documentation</h2>
  120. <a class="anchor" id="a2694a39dfd1fa087ca6f9f391c91dae7"></a>
  121. <div class="memitem">
  122. <div class="memproto">
  123. <table class="memname">
  124. <tr>
  125. <td class="memname">#define CLOCKID&#160;&#160;&#160;CLOCK_REALTIME</td>
  126. </tr>
  127. </table>
  128. </div><div class="memdoc">
  129. </div>
  130. </div>
  131. <a class="anchor" id="af3ec03c16ee82e8578cfd8fd133d7a6f"></a>
  132. <div class="memitem">
  133. <div class="memproto">
  134. <table class="memname">
  135. <tr>
  136. <td class="memname">#define errExit</td>
  137. <td>(</td>
  138. <td class="paramtype">&#160;</td>
  139. <td class="paramname">msg</td><td>)</td>
  140. <td>&#160;&#160;&#160;do { perror(msg); exit(EXIT_FAILURE); } while (0)</td>
  141. </tr>
  142. </table>
  143. </div><div class="memdoc">
  144. </div>
  145. </div>
  146. <a class="anchor" id="ad6f1d374549d22100d676d5fcac0a7e5"></a>
  147. <div class="memitem">
  148. <div class="memproto">
  149. <table class="memname">
  150. <tr>
  151. <td class="memname">#define SIG&#160;&#160;&#160;SIGRTMIN</td>
  152. </tr>
  153. </table>
  154. </div><div class="memdoc">
  155. </div>
  156. </div>
  157. <h2 class="groupheader">Function Documentation</h2>
  158. <a class="anchor" id="a9e737e3249388fb2e50d868bad69c688"></a>
  159. <div class="memitem">
  160. <div class="memproto">
  161. <table class="memname">
  162. <tr>
  163. <td class="memname">void initTimers </td>
  164. <td>(</td>
  165. <td class="paramtype">void&#160;</td>
  166. <td class="paramname"></td><td>)</td>
  167. <td></td>
  168. </tr>
  169. </table>
  170. </div><div class="memdoc">
  171. <p>inits the system timer based on signals </p>
  172. </div>
  173. </div>
  174. <a class="anchor" id="ae9859727c0e51a70b4ff5f47d2527a77"></a>
  175. <div class="memitem">
  176. <div class="memproto">
  177. <table class="memname">
  178. <tr>
  179. <td class="memname">void* nullThread </td>
  180. <td>(</td>
  181. <td class="paramtype">void *&#160;</td>
  182. <td class="paramname"><em>threadid</em></td><td>)</td>
  183. <td></td>
  184. </tr>
  185. </table>
  186. </div><div class="memdoc">
  187. <p>This is a dummy thread. </p>
  188. <dl class="params"><dt>Parameters</dt><dd>
  189. <table class="params">
  190. <tr><td class="paramname">*threadid</td><td>Thread ID </td></tr>
  191. </table>
  192. </dd>
  193. </dl>
  194. </div>
  195. </div>
  196. <a class="anchor" id="a43ed436d8c1803ced3029a909320a841"></a>
  197. <div class="memitem">
  198. <div class="memproto">
  199. <table class="memname">
  200. <tr>
  201. <td class="memname">void stopTimers </td>
  202. <td>(</td>
  203. <td class="paramtype">void&#160;</td>
  204. <td class="paramname"></td><td>)</td>
  205. <td></td>
  206. </tr>
  207. </table>
  208. </div><div class="memdoc">
  209. <p>Stops all existing timers. </p>
  210. </div>
  211. </div>
  212. </div><!-- contents -->
  213. <!-- start footer part -->
  214. <hr class="footer"/><address class="footer"><small>
  215. Generated by &#160;<a href="http://www.doxygen.org/index.html">
  216. <img class="footer" src="doxygen.png" alt="doxygen"/>
  217. </a> 1.8.10
  218. </small></address>
  219. </body>
  220. </html>