123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250 |
- <!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: spi.h File Reference</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>
- <!-- 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><!-- top -->
- <div class="header">
- <div class="summary">
- <a href="#define-members">Macros</a> |
- <a href="#func-members">Functions</a> </div>
- <div class="headertitle">
- <div class="title">spi.h File Reference</div> </div>
- </div><!--header-->
- <div class="contents">
- <div class="textblock"><code>#include <inttypes.h></code><br />
- </div>
- <p><a href="spi_8h_source.html">Go to the source code of this file.</a></p>
- <table class="memberdecls">
- <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="define-members"></a>
- Macros</h2></td></tr>
- <tr class="memitem:aa9f52b418d31ac71ce93f2d7846ded90"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="spi_8h.html#aa9f52b418d31ac71ce93f2d7846ded90">SHIFT_SCLR</a>   21</td></tr>
- <tr class="separator:aa9f52b418d31ac71ce93f2d7846ded90"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:aed6e9b64896ee902a2f02b1e49e65a11"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="spi_8h.html#aed6e9b64896ee902a2f02b1e49e65a11">SHIFT_RCK</a>   22</td></tr>
- <tr class="separator:aed6e9b64896ee902a2f02b1e49e65a11"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:aa846752b3dc2a7a280e1c97191c1e378"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="spi_8h.html#aa846752b3dc2a7a280e1c97191c1e378">SHIFT_G</a>   26</td></tr>
- <tr class="separator:aa846752b3dc2a7a280e1c97191c1e378"><td class="memSeparator" colspan="2"> </td></tr>
- </table><table class="memberdecls">
- <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
- Functions</h2></td></tr>
- <tr class="memitem:a7402e4a56146a9e3df480b206a3f7e7e"><td class="memItemLeft" align="right" valign="top">uint8_t </td><td class="memItemRight" valign="bottom"><a class="el" href="spi_8h.html#a7402e4a56146a9e3df480b206a3f7e7e">spi_readwrite</a> (uint8_t data)</td></tr>
- <tr class="memdesc:a7402e4a56146a9e3df480b206a3f7e7e"><td class="mdescLeft"> </td><td class="mdescRight">Writes the data on the SPI bus and returns the reply. <a href="#a7402e4a56146a9e3df480b206a3f7e7e">More...</a><br /></td></tr>
- <tr class="separator:a7402e4a56146a9e3df480b206a3f7e7e"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:ae909944aa85ae98323073c628be541aa"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="spi_8h.html#ae909944aa85ae98323073c628be541aa">spi_init</a> (void)</td></tr>
- <tr class="memdesc:ae909944aa85ae98323073c628be541aa"><td class="mdescLeft"> </td><td class="mdescRight">Initializes the SPI bus. <a href="#ae909944aa85ae98323073c628be541aa">More...</a><br /></td></tr>
- <tr class="separator:ae909944aa85ae98323073c628be541aa"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:ac7600504b8cf1ac90ce331a5ed23c3db"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="spi_8h.html#ac7600504b8cf1ac90ce331a5ed23c3db">shift_init</a> (void)</td></tr>
- <tr class="memdesc:ac7600504b8cf1ac90ce331a5ed23c3db"><td class="mdescLeft"> </td><td class="mdescRight">Initializes the shift register. <a href="#ac7600504b8cf1ac90ce331a5ed23c3db">More...</a><br /></td></tr>
- <tr class="separator:ac7600504b8cf1ac90ce331a5ed23c3db"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:aec7140cda479ce5f88361739e86ccecd"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="spi_8h.html#aec7140cda479ce5f88361739e86ccecd">shift_data</a> (uint8_t data)</td></tr>
- <tr class="memdesc:aec7140cda479ce5f88361739e86ccecd"><td class="mdescLeft"> </td><td class="mdescRight">Sends a byte to the shift register. <a href="#aec7140cda479ce5f88361739e86ccecd">More...</a><br /></td></tr>
- <tr class="separator:aec7140cda479ce5f88361739e86ccecd"><td class="memSeparator" colspan="2"> </td></tr>
- </table>
- <h2 class="groupheader">Macro Definition Documentation</h2>
- <a class="anchor" id="aa846752b3dc2a7a280e1c97191c1e378"></a>
- <div class="memitem">
- <div class="memproto">
- <table class="memname">
- <tr>
- <td class="memname">#define SHIFT_G   26</td>
- </tr>
- </table>
- </div><div class="memdoc">
- </div>
- </div>
- <a class="anchor" id="aed6e9b64896ee902a2f02b1e49e65a11"></a>
- <div class="memitem">
- <div class="memproto">
- <table class="memname">
- <tr>
- <td class="memname">#define SHIFT_RCK   22</td>
- </tr>
- </table>
- </div><div class="memdoc">
- </div>
- </div>
- <a class="anchor" id="aa9f52b418d31ac71ce93f2d7846ded90"></a>
- <div class="memitem">
- <div class="memproto">
- <table class="memname">
- <tr>
- <td class="memname">#define SHIFT_SCLR   21</td>
- </tr>
- </table>
- </div><div class="memdoc">
- </div>
- </div>
- <h2 class="groupheader">Function Documentation</h2>
- <a class="anchor" id="aec7140cda479ce5f88361739e86ccecd"></a>
- <div class="memitem">
- <div class="memproto">
- <table class="memname">
- <tr>
- <td class="memname">void shift_data </td>
- <td>(</td>
- <td class="paramtype">uint8_t </td>
- <td class="paramname"><em>data</em></td><td>)</td>
- <td></td>
- </tr>
- </table>
- </div><div class="memdoc">
- <p>Sends a byte to the shift register. </p>
- <dl class="params"><dt>Parameters</dt><dd>
- <table class="params">
- <tr><td class="paramname">data</td><td>Data byte </td></tr>
- </table>
- </dd>
- </dl>
- </div>
- </div>
- <a class="anchor" id="ac7600504b8cf1ac90ce331a5ed23c3db"></a>
- <div class="memitem">
- <div class="memproto">
- <table class="memname">
- <tr>
- <td class="memname">void shift_init </td>
- <td>(</td>
- <td class="paramtype">void </td>
- <td class="paramname"></td><td>)</td>
- <td></td>
- </tr>
- </table>
- </div><div class="memdoc">
- <p>Initializes the shift register. </p>
- </div>
- </div>
- <a class="anchor" id="ae909944aa85ae98323073c628be541aa"></a>
- <div class="memitem">
- <div class="memproto">
- <table class="memname">
- <tr>
- <td class="memname">void spi_init </td>
- <td>(</td>
- <td class="paramtype">void </td>
- <td class="paramname"></td><td>)</td>
- <td></td>
- </tr>
- </table>
- </div><div class="memdoc">
- <p>Initializes the SPI bus. </p>
- </div>
- </div>
- <a class="anchor" id="a7402e4a56146a9e3df480b206a3f7e7e"></a>
- <div class="memitem">
- <div class="memproto">
- <table class="memname">
- <tr>
- <td class="memname">uint8_t spi_readwrite </td>
- <td>(</td>
- <td class="paramtype">uint8_t </td>
- <td class="paramname"><em>data</em></td><td>)</td>
- <td></td>
- </tr>
- </table>
- </div><div class="memdoc">
- <p>Writes the data on the SPI bus and returns the reply. </p>
- <dl class="params"><dt>Parameters</dt><dd>
- <table class="params">
- <tr><td class="paramname">data</td><td>byte to write to the bus </td></tr>
- </table>
- </dd>
- </dl>
- <dl class="section return"><dt>Returns</dt><dd>byte read from the bus </dd></dl>
- </div>
- </div>
- </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>
|