Project

General

Profile

Revision 1398

Added by Chris Mar over 14 years ago

recompiled libdragonfly to include new rangefinder doxygen comments

View differences:

i2c_8c.html
1 1
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2 2
<html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
3 3
<title>libdragonfly: i2c.c File Reference</title>
4
<link href="tabs.css" rel="stylesheet" type="text/css">
4 5
<link href="doxygen.css" rel="stylesheet" type="text/css">
5
<link href="tabs.css" rel="stylesheet" type="text/css">
6 6
</head><body>
7
<!-- Generated by Doxygen 1.5.5 -->
7
<!-- Generated by Doxygen 1.5.9 -->
8 8
<div class="navigation" id="top">
9 9
  <div class="tabs">
10 10
    <ul>
......
15 15
      <li class="current"><a href="files.html"><span>Files</span></a></li>
16 16
    </ul>
17 17
  </div>
18
  <div class="tabs">
19
    <ul>
20
      <li><a href="files.html"><span>File&nbsp;List</span></a></li>
21
      <li><a href="globals.html"><span>Globals</span></a></li>
22
    </ul>
23
  </div>
18 24
</div>
19 25
<div class="contents">
20
<h1>i2c.c File Reference</h1>Implemenation of I2C communications protocol. <a href="#_details">More...</a>
26
<h1>i2c.c File Reference</h1>Implemenation of I2C communications protocol.  
27
<a href="#_details">More...</a>
21 28
<p>
22 29
<code>#include &lt;avr/interrupt.h&gt;</code><br>
23 30
<code>#include &lt;util/twi.h&gt;</code><br>
24
<code>#include &quot;<a class="el" href="i2c_8h-source.html">i2c.h</a>&quot;</code><br>
25
<code>#include &quot;<a class="el" href="ring__buffer_8h-source.html">ring_buffer.h</a>&quot;</code><br>
31
<code>#include &quot;<a class="el" href="i2c_8h_source.html">i2c.h</a>&quot;</code><br>
32
<code>#include &quot;<a class="el" href="ring__buffer_8h_source.html">ring_buffer.h</a>&quot;</code><br>
26 33
<table border="0" cellpadding="0" cellspacing="0">
27 34
<tr><td></td></tr>
28 35
<tr><td colspan="2"><br><h2>Defines</h2></td></tr>
......
47 54

  
48 55
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Interrupt to handle I2C interrupts from the I2C hardware.  <a href="#474f42eedbdc093683fdb4b88be3c48f"></a><br></td></tr>
49 56
</table>
50
<hr><a name="_details"></a><h2>Detailed Description</h2>
57
<hr><h2>Detailed Description</h2>
51 58
Implemenation of I2C communications protocol. 
52 59
<p>
53 60
Copyright (c) 2007 Colony Project<p>
......
56 63
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>
57 64
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>
58 65
<dl class="author" compact><dt><b>Author:</b></dt><dd>CMU Robotics Club, Kevin Woo, Sursh Nidhiry </dd></dl>
59
<dl compact><dt><b><a class="el" href="bug.html#_bug000004">Bug:</a></b></dt><dd>Not tested. </dd></dl>
66
<dl class="bug" compact><dt><b><a class="el" href="bug.html#_bug000004">Bug:</a></b></dt><dd>Not tested. </dd></dl>
60 67
<hr><h2>Function Documentation</h2>
61 68
<a class="anchor" name="474f42eedbdc093683fdb4b88be3c48f"></a><!-- doxytag: member="i2c.c::ISR" ref="474f42eedbdc093683fdb4b88be3c48f" args="(TWI_vect)" -->
62 69
<div class="memitem">
......
68 75
          <td class="paramtype">TWI_vect&nbsp;</td>
69 76
          <td class="paramname">          </td>
70 77
          <td>&nbsp;)&nbsp;</td>
71
          <td width="100%"></td>
78
          <td></td>
72 79
        </tr>
73 80
      </table>
74 81
</div>
......
80 87
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>
81 88
Bytes are sent by popping off the ring buffer. It also will keep track of what modes the send is in.<p>
82 89
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>
90
<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 91

  
85 92
</div>
86 93
</div><p>
87 94
</div>
88
<hr size="1"><address style="text-align: right;"><small>Generated on Wed Sep 2 23:20:08 2009 for libdragonfly by&nbsp;
95
<hr size="1"><address style="text-align: right;"><small>Generated on Mon Sep 7 19:07:28 2009 for libdragonfly by&nbsp;
89 96
<a href="http://www.doxygen.org/index.html">
90
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.5 </small></address>
97
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.9 </small></address>
91 98
</body>
92 99
</html>

Also available in: Unified diff