Project

General

Profile

Revision 862

Added by Kevin Woo over 15 years ago

Updated analog.c and analog.h documentation and regenerated the docs. No need to remake the library as its just comments.

View differences:

i2c_8c.html
4 4
<link href="doxygen.css" rel="stylesheet" type="text/css">
5 5
<link href="tabs.css" rel="stylesheet" type="text/css">
6 6
</head><body>
7
<!-- Generated by Doxygen 1.5.3 -->
8
<div class="tabs">
9
  <ul>
10
    <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
11
    <li><a href="modules.html"><span>Modules</span></a></li>
12
    <li><a href="annotated.html"><span>Data&nbsp;Structures</span></a></li>
13
    <li class="current"><a href="files.html"><span>Files</span></a></li>
14
    <li><a href="pages.html"><span>Related&nbsp;Pages</span></a></li>
15
  </ul>
7
<!-- Generated by Doxygen 1.5.5 -->
8
<div class="navigation" id="top">
9
  <div class="tabs">
10
    <ul>
11
      <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
12
      <li><a href="pages.html"><span>Related&nbsp;Pages</span></a></li>
13
      <li><a href="modules.html"><span>Modules</span></a></li>
14
      <li><a href="annotated.html"><span>Data&nbsp;Structures</span></a></li>
15
      <li class="current"><a href="files.html"><span>Files</span></a></li>
16
    </ul>
17
  </div>
16 18
</div>
19
<div class="contents">
17 20
<h1>i2c.c File Reference</h1>Implemenation of I2C communications protocol. <a href="#_details">More...</a>
18 21
<p>
19 22
<code>#include &lt;avr/interrupt.h&gt;</code><br>
......
53 56
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.<p>
54 57
In the case where you have master sends and then a master request to the same address, you will not give up control of the line because the send and request addresses are seen as different addresses. In between it will send a restart but will not give up the line.<p>
55 58
<dl class="author" compact><dt><b>Author:</b></dt><dd>CMU Robotics Club, Kevin Woo, Sursh Nidhiry </dd></dl>
56
<dl compact><dt><b><a class="el" href="bug.html#_bug000003">Bug:</a></b></dt><dd>Not tested. </dd></dl>
59
<dl compact><dt><b><a class="el" href="bug.html#_bug000004">Bug:</a></b></dt><dd>Not tested. </dd></dl>
57 60
<hr><h2>Function Documentation</h2>
58 61
<a class="anchor" name="474f42eedbdc093683fdb4b88be3c48f"></a><!-- doxytag: member="i2c.c::ISR" ref="474f42eedbdc093683fdb4b88be3c48f" args="(TWI_vect)" -->
59 62
<div class="memitem">
......
77 80
Uses the status codes from the I2C register to handle the events needed to advance in I2C stages. For instance, you will get a bit for receiving a start ack, then a address ack, then a data ack, etc. The events are handled in each switch case. The status codes are defined by avr-gcc in /util/twi.h but are the same codes as the Atmel documentation.<p>
78 81
Bytes are sent by popping off the ring buffer. It also will keep track of what modes the send is in.<p>
79 82
Errors are handled here as well. 
83
<p>References <a class="el" href="ring__buffer_8h-source.html#l00078">RING_BUFFER_CLEAR</a>, <a class="el" href="ring__buffer_8h-source.html#l00088">RING_BUFFER_EMPTY</a>, <a class="el" href="ring__buffer_8h-source.html#l00136">RING_BUFFER_PEEK</a>, and <a class="el" href="ring__buffer_8h-source.html#l00122">RING_BUFFER_REMOVE</a>.</p>
84

  
80 85
</div>
81 86
</div><p>
82
<hr size="1"><address style="text-align: right;"><small>Generated on Wed Feb 6 20:27:38 2008 for libdragonfly by&nbsp;
87
</div>
88
<hr size="1"><address style="text-align: right;"><small>Generated on Fri Sep 26 13:39:28 2008 for libdragonfly by&nbsp;
83 89
<a href="http://www.doxygen.org/index.html">
84
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.3 </small></address>
90
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.5 </small></address>
85 91
</body>
86 92
</html>

Also available in: Unified diff