lcd_8h_source.html 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157
  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: lcd.h Source File</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. </div><!-- top -->
  69. <!-- window showing the filter options -->
  70. <div id="MSearchSelectWindow"
  71. onmouseover="return searchBox.OnSearchSelectShow()"
  72. onmouseout="return searchBox.OnSearchSelectHide()"
  73. onkeydown="return searchBox.OnSearchSelectKey(event)">
  74. </div>
  75. <!-- iframe showing the search results (closed by default) -->
  76. <div id="MSearchResultsWindow">
  77. <iframe src="javascript:void(0)" frameborder="0"
  78. name="MSearchResults" id="MSearchResults">
  79. </iframe>
  80. </div>
  81. <div class="header">
  82. <div class="headertitle">
  83. <div class="title">lcd.h</div> </div>
  84. </div><!--header-->
  85. <div class="contents">
  86. <a href="lcd_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>&#160;<span class="comment">/*</span></div>
  87. <div class="line"><a name="l00002"></a><span class="lineno"> 2</span>&#160;<span class="comment"> * lcd.h</span></div>
  88. <div class="line"><a name="l00003"></a><span class="lineno"> 3</span>&#160;<span class="comment"> *</span></div>
  89. <div class="line"><a name="l00004"></a><span class="lineno"> 4</span>&#160;<span class="comment"> * Created on: Aug 3, 2016</span></div>
  90. <div class="line"><a name="l00005"></a><span class="lineno"> 5</span>&#160;<span class="comment"> * Author: sebastian</span></div>
  91. <div class="line"><a name="l00006"></a><span class="lineno"> 6</span>&#160;<span class="comment"> */</span></div>
  92. <div class="line"><a name="l00007"></a><span class="lineno"> 7</span>&#160;</div>
  93. <div class="line"><a name="l00008"></a><span class="lineno"> 8</span>&#160;<span class="preprocessor">#ifndef LCD_H_</span></div>
  94. <div class="line"><a name="l00009"></a><span class="lineno"> 9</span>&#160;<span class="preprocessor">#define LCD_H_</span></div>
  95. <div class="line"><a name="l00010"></a><span class="lineno"> 10</span>&#160;</div>
  96. <div class="line"><a name="l00011"></a><span class="lineno"><a class="line" href="lcd_8h.html#a6bfe3f4a880b075a72d2a8318bd10f8e"> 11</a></span>&#160;<span class="preprocessor">#define MAX_LCDS 8</span></div>
  97. <div class="line"><a name="l00012"></a><span class="lineno"> 12</span>&#160;</div>
  98. <div class="line"><a name="l00013"></a><span class="lineno"> 13</span>&#160;<span class="preprocessor">#ifdef __cplusplus</span></div>
  99. <div class="line"><a name="l00014"></a><span class="lineno"> 14</span>&#160;<span class="keyword">extern</span> <span class="stringliteral">&quot;C&quot;</span> {</div>
  100. <div class="line"><a name="l00015"></a><span class="lineno"> 15</span>&#160;<span class="preprocessor">#endif</span></div>
  101. <div class="line"><a name="l00016"></a><span class="lineno"> 16</span>&#160;</div>
  102. <div class="line"><a name="l00017"></a><span class="lineno"> 17</span>&#160;<span class="keyword">extern</span> <span class="keywordtype">void</span> <a class="code" href="lcd_8h.html#a688913764edb3a241c26da5e51d70ac2">lcdHome</a> (<span class="keyword">const</span> <span class="keywordtype">int</span> fd) ;</div>
  103. <div class="line"><a name="l00018"></a><span class="lineno"> 18</span>&#160;<span class="keyword">extern</span> <span class="keywordtype">void</span> <a class="code" href="lcd_8h.html#ae1b4dfd9571742b5ca0aba92882b57a6">lcdClear</a> (<span class="keyword">const</span> <span class="keywordtype">int</span> fd) ;</div>
  104. <div class="line"><a name="l00019"></a><span class="lineno"> 19</span>&#160;<span class="keyword">extern</span> <span class="keywordtype">void</span> <a class="code" href="lcd_8h.html#af08385cd21eea125d63d6919ecfbea4a">lcdDisplay</a> (<span class="keyword">const</span> <span class="keywordtype">int</span> fd, <span class="keywordtype">int</span> <a class="code" href="coffee_8cpp.html#a89f234133d3efe315836311cbf21c64b">state</a>) ;</div>
  105. <div class="line"><a name="l00020"></a><span class="lineno"> 20</span>&#160;<span class="keyword">extern</span> <span class="keywordtype">void</span> <a class="code" href="lcd_8h.html#a8aa13c894973d52eeed51d10bf869df2">lcdCursor</a> (<span class="keyword">const</span> <span class="keywordtype">int</span> fd, <span class="keywordtype">int</span> state) ;</div>
  106. <div class="line"><a name="l00021"></a><span class="lineno"> 21</span>&#160;<span class="keyword">extern</span> <span class="keywordtype">void</span> <a class="code" href="lcd_8h.html#af39d67df7e36291184f69691bb97285b">lcdCursorBlink</a> (<span class="keyword">const</span> <span class="keywordtype">int</span> fd, <span class="keywordtype">int</span> state) ;</div>
  107. <div class="line"><a name="l00022"></a><span class="lineno"> 22</span>&#160;<span class="keyword">extern</span> <span class="keywordtype">void</span> <a class="code" href="lcd_8h.html#abb6341df42d0e652db66e51fbf0ba486">lcdSendCommand</a> (<span class="keyword">const</span> <span class="keywordtype">int</span> fd, <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> command) ;</div>
  108. <div class="line"><a name="l00023"></a><span class="lineno"> 23</span>&#160;<span class="keyword">extern</span> <span class="keywordtype">void</span> <a class="code" href="lcd_8h.html#a5d09137f6373e95a692c4b3403729254">lcdPosition</a> (<span class="keyword">const</span> <span class="keywordtype">int</span> fd, <span class="keywordtype">int</span> x, <span class="keywordtype">int</span> y) ;</div>
  109. <div class="line"><a name="l00024"></a><span class="lineno"> 24</span>&#160;<span class="keyword">extern</span> <span class="keywordtype">void</span> <a class="code" href="lcd_8h.html#a74d902393394e4d3cebdcf0d81bbaeeb">lcdCharDef</a> (<span class="keyword">const</span> <span class="keywordtype">int</span> fd, <span class="keywordtype">int</span> index, <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> data [8]) ;</div>
  110. <div class="line"><a name="l00025"></a><span class="lineno"> 25</span>&#160;<span class="keyword">extern</span> <span class="keywordtype">void</span> <a class="code" href="lcd_8h.html#a21c60441ee22710add0c9bda1310ed66">lcdPutchar</a> (<span class="keyword">const</span> <span class="keywordtype">int</span> fd, <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> data) ;</div>
  111. <div class="line"><a name="l00026"></a><span class="lineno"> 26</span>&#160;<span class="keyword">extern</span> <span class="keywordtype">void</span> <a class="code" href="lcd_8h.html#a805efc4a96cca29544672151a9594c20">lcdPuts</a> (<span class="keyword">const</span> <span class="keywordtype">int</span> fd, <span class="keyword">const</span> <span class="keywordtype">char</span> *<span class="keywordtype">string</span>) ;</div>
  112. <div class="line"><a name="l00027"></a><span class="lineno"> 27</span>&#160;<span class="keyword">extern</span> <span class="keywordtype">void</span> <a class="code" href="lcd_8h.html#a49c322ad29410ea292f8d976baf6deb9">lcdPrintf</a> (<span class="keyword">const</span> <span class="keywordtype">int</span> fd, <span class="keyword">const</span> <span class="keywordtype">char</span> *message, ...) ;</div>
  113. <div class="line"><a name="l00028"></a><span class="lineno"> 28</span>&#160;</div>
  114. <div class="line"><a name="l00029"></a><span class="lineno"> 29</span>&#160;<span class="keyword">extern</span> <span class="keywordtype">int</span> <a class="code" href="lcd_8h.html#a47f05b4cef2cf066cf1cbb1beb7ceb31">lcdInitI</a> (<span class="keyword">const</span> <span class="keywordtype">int</span> rows, <span class="keyword">const</span> <span class="keywordtype">int</span> cols, <span class="keyword">const</span> <span class="keywordtype">int</span> bits,</div>
  115. <div class="line"><a name="l00030"></a><span class="lineno"> 30</span>&#160; <span class="keyword">const</span> <span class="keywordtype">int</span> rs, <span class="keyword">const</span> <span class="keywordtype">int</span> strb) ;</div>
  116. <div class="line"><a name="l00031"></a><span class="lineno"> 31</span>&#160;</div>
  117. <div class="line"><a name="l00032"></a><span class="lineno"> 32</span>&#160;<span class="keyword">extern</span> <span class="keywordtype">int</span> <a class="code" href="lcd_8h.html#a88d70347308e92cb29eb45b505cad39e">lcdInit</a> (<span class="keywordtype">void</span>) ;</div>
  118. <div class="line"><a name="l00033"></a><span class="lineno"> 33</span>&#160;</div>
  119. <div class="line"><a name="l00034"></a><span class="lineno"> 34</span>&#160;<span class="preprocessor">#ifdef __cplusplus</span></div>
  120. <div class="line"><a name="l00035"></a><span class="lineno"> 35</span>&#160;}</div>
  121. <div class="line"><a name="l00036"></a><span class="lineno"> 36</span>&#160;<span class="preprocessor">#endif</span></div>
  122. <div class="line"><a name="l00037"></a><span class="lineno"> 37</span>&#160;</div>
  123. <div class="line"><a name="l00038"></a><span class="lineno"> 38</span>&#160;<span class="comment">// Pinbelegung für das LCD, an verwendete Pins anpassen</span></div>
  124. <div class="line"><a name="l00039"></a><span class="lineno"> 39</span>&#160;</div>
  125. <div class="line"><a name="l00040"></a><span class="lineno"><a class="line" href="lcd_8h.html#a26089a10ddd59a0dc7283c19ccc02533"> 40</a></span>&#160;<span class="preprocessor">#define LCD_RW 24</span></div>
  126. <div class="line"><a name="l00041"></a><span class="lineno"><a class="line" href="lcd_8h.html#a4781e073871c6f27f89b9463ad3a4ed1"> 41</a></span>&#160;<span class="preprocessor">#define LCD_RS 27</span></div>
  127. <div class="line"><a name="l00042"></a><span class="lineno"><a class="line" href="lcd_8h.html#a1640ffbc0d8ec0f7edb04a2b93918072"> 42</a></span>&#160;<span class="preprocessor">#define LCD_EN 23</span></div>
  128. <div class="line"><a name="l00043"></a><span class="lineno"> 43</span>&#160;</div>
  129. <div class="line"><a name="l00044"></a><span class="lineno"> 44</span>&#160;</div>
  130. <div class="line"><a name="l00045"></a><span class="lineno"> 45</span>&#160;</div>
  131. <div class="line"><a name="l00046"></a><span class="lineno"> 46</span>&#160;</div>
  132. <div class="line"><a name="l00047"></a><span class="lineno"> 47</span>&#160;<span class="preprocessor">#endif </span><span class="comment">/* LCD_H_ */</span><span class="preprocessor"></span></div>
  133. <div class="ttc" id="lcd_8h_html_a49c322ad29410ea292f8d976baf6deb9"><div class="ttname"><a href="lcd_8h.html#a49c322ad29410ea292f8d976baf6deb9">lcdPrintf</a></div><div class="ttdeci">void lcdPrintf(const int fd, const char *message,...)</div><div class="ttdef"><b>Definition:</b> lcd.cpp:307</div></div>
  134. <div class="ttc" id="lcd_8h_html_a5d09137f6373e95a692c4b3403729254"><div class="ttname"><a href="lcd_8h.html#a5d09137f6373e95a692c4b3403729254">lcdPosition</a></div><div class="ttdeci">void lcdPosition(const int fd, int x, int y)</div><div class="ttdef"><b>Definition:</b> lcd.cpp:233</div></div>
  135. <div class="ttc" id="lcd_8h_html_a74d902393394e4d3cebdcf0d81bbaeeb"><div class="ttname"><a href="lcd_8h.html#a74d902393394e4d3cebdcf0d81bbaeeb">lcdCharDef</a></div><div class="ttdeci">void lcdCharDef(const int fd, int index, unsigned char data[8])</div><div class="ttdef"><b>Definition:</b> lcd.cpp:255</div></div>
  136. <div class="ttc" id="lcd_8h_html_af39d67df7e36291184f69691bb97285b"><div class="ttname"><a href="lcd_8h.html#af39d67df7e36291184f69691bb97285b">lcdCursorBlink</a></div><div class="ttdeci">void lcdCursorBlink(const int fd, int state)</div><div class="ttdef"><b>Definition:</b> lcd.cpp:204</div></div>
  137. <div class="ttc" id="lcd_8h_html_ae1b4dfd9571742b5ca0aba92882b57a6"><div class="ttname"><a href="lcd_8h.html#ae1b4dfd9571742b5ca0aba92882b57a6">lcdClear</a></div><div class="ttdeci">void lcdClear(const int fd)</div><div class="ttdef"><b>Definition:</b> lcd.cpp:167</div></div>
  138. <div class="ttc" id="lcd_8h_html_a688913764edb3a241c26da5e51d70ac2"><div class="ttname"><a href="lcd_8h.html#a688913764edb3a241c26da5e51d70ac2">lcdHome</a></div><div class="ttdeci">void lcdHome(const int fd)</div><div class="ttdef"><b>Definition:</b> lcd.cpp:159</div></div>
  139. <div class="ttc" id="lcd_8h_html_a805efc4a96cca29544672151a9594c20"><div class="ttname"><a href="lcd_8h.html#a805efc4a96cca29544672151a9594c20">lcdPuts</a></div><div class="ttdeci">void lcdPuts(const int fd, const char *string)</div><div class="ttdef"><b>Definition:</b> lcd.cpp:296</div></div>
  140. <div class="ttc" id="lcd_8h_html_a88d70347308e92cb29eb45b505cad39e"><div class="ttname"><a href="lcd_8h.html#a88d70347308e92cb29eb45b505cad39e">lcdInit</a></div><div class="ttdeci">int lcdInit(void)</div><div class="ttdef"><b>Definition:</b> lcd.cpp:324</div></div>
  141. <div class="ttc" id="lcd_8h_html_a8aa13c894973d52eeed51d10bf869df2"><div class="ttname"><a href="lcd_8h.html#a8aa13c894973d52eeed51d10bf869df2">lcdCursor</a></div><div class="ttdeci">void lcdCursor(const int fd, int state)</div><div class="ttdef"><b>Definition:</b> lcd.cpp:193</div></div>
  142. <div class="ttc" id="lcd_8h_html_af08385cd21eea125d63d6919ecfbea4a"><div class="ttname"><a href="lcd_8h.html#af08385cd21eea125d63d6919ecfbea4a">lcdDisplay</a></div><div class="ttdeci">void lcdDisplay(const int fd, int state)</div><div class="ttdef"><b>Definition:</b> lcd.cpp:182</div></div>
  143. <div class="ttc" id="lcd_8h_html_abb6341df42d0e652db66e51fbf0ba486"><div class="ttname"><a href="lcd_8h.html#abb6341df42d0e652db66e51fbf0ba486">lcdSendCommand</a></div><div class="ttdeci">void lcdSendCommand(const int fd, unsigned char command)</div><div class="ttdef"><b>Definition:</b> lcd.cpp:221</div></div>
  144. <div class="ttc" id="lcd_8h_html_a47f05b4cef2cf066cf1cbb1beb7ceb31"><div class="ttname"><a href="lcd_8h.html#a47f05b4cef2cf066cf1cbb1beb7ceb31">lcdInitI</a></div><div class="ttdeci">int lcdInitI(const int rows, const int cols, const int bits, const int rs, const int strb)</div><div class="ttdef"><b>Definition:</b> lcd.cpp:339</div></div>
  145. <div class="ttc" id="lcd_8h_html_a21c60441ee22710add0c9bda1310ed66"><div class="ttname"><a href="lcd_8h.html#a21c60441ee22710add0c9bda1310ed66">lcdPutchar</a></div><div class="ttdeci">void lcdPutchar(const int fd, unsigned char data)</div><div class="ttdef"><b>Definition:</b> lcd.cpp:273</div></div>
  146. <div class="ttc" id="coffee_8cpp_html_a89f234133d3efe315836311cbf21c64b"><div class="ttname"><a href="coffee_8cpp.html#a89f234133d3efe315836311cbf21c64b">state</a></div><div class="ttdeci">int state</div><div class="ttdef"><b>Definition:</b> coffee.cpp:27</div></div>
  147. </div><!-- fragment --></div><!-- contents -->
  148. <!-- start footer part -->
  149. <hr class="footer"/><address class="footer"><small>
  150. Generated by &#160;<a href="http://www.doxygen.org/index.html">
  151. <img class="footer" src="doxygen.png" alt="doxygen"/>
  152. </a> 1.8.10
  153. </small></address>
  154. </body>
  155. </html>