?lang_form? ?lang_select? ?lang_submit? ?lang_endform?
{HEADER END}
{FILE START}

library

?curdirlinks? - Rev 6

?prevdifflink? - Blame - ?getfile?

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
<title>Procyon AVRlib: i2c.c File Reference</title>
<link href="dox.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.4.2 -->
<div class="qindex"><a class="qindex" href="main.html">Main&nbsp;Page</a> | <a class="qindex" href="modules.html">Modules</a> | <a class="qindex" href="annotated.html">Data&nbsp;Structures</a> | <a class="qindex" href="dirs.html">Directories</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Data&nbsp;Fields</a> | <a class="qindex" href="globals.html">Globals</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a></div>
<h1>i2c.c File Reference</h1><hr><a name="_details"></a><h2>Detailed Description</h2>

<p>
Definition in file <a class="el" href="i2c_8c-source.html">i2c.c</a>.
<p>
<code>#include &lt;avr/io.h&gt;</code><br>
<code>#include &lt;avr/interrupt.h&gt;</code><br>
<code>#include "<a class="el" href="i2c_8h-source.html">i2c.h</a>"</code><br>
<code>#include "<a class="el" href="rprintf_8h-source.html">rprintf.h</a>"</code><br>
<code>#include "<a class="el" href="uart2_8h-source.html">uart2.h</a>"</code><br>

<p>
<a href="i2c_8c-source.html">Go to the source code of this file.</a><table border="0" cellpadding="0" cellspacing="0">
<tr><td></td></tr>
<tr><td colspan="2"><br><h2>Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a10" doxytag="i2c.c::i2cInit"></a>
void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="i2c_8c.html#a10">i2cInit</a> (void)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Initialize I2C (TWI) interface. <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a11" doxytag="i2c.c::i2cSetBitrate"></a>
void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="i2c_8c.html#a11">i2cSetBitrate</a> (u16 bitrateKHz)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Set the I2C transaction bitrate (in KHz). <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a12" doxytag="i2c.c::i2cSetLocalDeviceAddr"></a>
void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="i2c_8c.html#a12">i2cSetLocalDeviceAddr</a> (u08 deviceAddr, u08 genCallEn)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Set the local (AVR processor's) I2C device address. <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a13" doxytag="i2c.c::i2cSetSlaveReceiveHandler"></a>
void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="i2c_8c.html#a13">i2cSetSlaveReceiveHandler</a> (void(*i2cSlaveRx_func)(u08 receiveDataLength, u08 *recieveData))</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Set the user function which handles receiving (incoming) data as a slave. <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a14" doxytag="i2c.c::i2cSetSlaveTransmitHandler"></a>
void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="i2c_8c.html#a14">i2cSetSlaveTransmitHandler</a> (u08(*i2cSlaveTx_func)(u08 transmitDataLengthMax, u08 *transmitData))</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Set the user function which handles transmitting (outgoing) data as a slave. <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a15" doxytag="i2c.c::i2cSendStart"></a>
void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="i2c_8c.html#a15">i2cSendStart</a> (void)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Send an I2C start condition in Master mode. <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a16" doxytag="i2c.c::i2cSendStop"></a>
void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="i2c_8c.html#a16">i2cSendStop</a> (void)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Send an I2C stop condition in Master mode. <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a17" doxytag="i2c.c::i2cWaitForComplete"></a>
void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="i2c_8c.html#a17">i2cWaitForComplete</a> (void)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Wait for current I2C operation to complete. <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a18" doxytag="i2c.c::i2cSendByte"></a>
void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="i2c_8c.html#a18">i2cSendByte</a> (u08 data)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Send an (address|R/W) combination or a data byte over I2C. <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a19" doxytag="i2c.c::i2cReceiveByte"></a>
void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="i2c_8c.html#a19">i2cReceiveByte</a> (u08 ackFlag)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Receive a data byte over I2C. <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a20" doxytag="i2c.c::i2cGetReceivedByte"></a>
u08&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="i2c_8c.html#a20">i2cGetReceivedByte</a> (void)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Pick up the data that was received with <a class="el" href="i2c_8c.html#a19">i2cReceiveByte()</a>. <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a21" doxytag="i2c.c::i2cGetStatus"></a>
u08&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="i2c_8c.html#a21">i2cGetStatus</a> (void)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get current I2c bus status from TWSR. <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a22" doxytag="i2c.c::i2cMasterSend"></a>
void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="i2c_8c.html#a22">i2cMasterSend</a> (u08 deviceAddr, u08 length, u08 *data)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">send I2C data to a device on the bus <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a23" doxytag="i2c.c::i2cMasterReceive"></a>
void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="i2c_8c.html#a23">i2cMasterReceive</a> (u08 deviceAddr, u08 length, u08 *data)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">receive I2C data from a device on the bus <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a24" doxytag="i2c.c::i2cMasterSendNI"></a>
u08&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="i2c_8c.html#a24">i2cMasterSendNI</a> (u08 deviceAddr, u08 length, u08 *data)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">send I2C data to a device on the bus (non-interrupt based) <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a25" doxytag="i2c.c::i2cMasterReceiveNI"></a>
u08&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="i2c_8c.html#a25">i2cMasterReceiveNI</a> (u08 deviceAddr, u08 length, u08 *data)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">receive I2C data from a device on the bus (non-interrupt based) <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a26" doxytag="i2c.c::SIGNAL"></a>
&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="i2c_8c.html#a26">SIGNAL</a> (SIG_2WIRE_SERIAL)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">I2C (TWI) interrupt service routine. <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a27" doxytag="i2c.c::i2cGetState"></a>
eI2cStateType&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="i2c_8c.html#a27">i2cGetState</a> (void)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get the current high-level state of the I2C interface. <br></td></tr>
</table>
<hr size="1"><address style="align: right;"><small>Generated on Sun Oct 29 03:41:08 2006 for Procyon AVRlib by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.2 </small></address>
</body>
</html>
{FILE END}
{FOOTER START}

Powered by WebSVN v2.8.3