You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

159 lines
14 KiB
HTML

<!-- HTML header for doxygen 1.8.7-->
<!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.6.3"/>
<!--BEGIN PROJECT_NAME--><title>avr-libc: avr-libc: twi.h File Reference</title><!--END PROJECT_NAME-->
<!--BEGIN !PROJECT_NAME--><title>avr-libc: twi.h File Reference</title><!--END !PROJECT_NAME-->
<link href="$relpath^tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="$relpath^jquery.js"></script>
<script type="text/javascript" src="$relpath^dynsections.js"></script>
$treeview
$search
$mathjax
<link href="$relpath^$stylesheet" rel="stylesheet" type="text/css" />
$extrastylesheet
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<!--BEGIN TITLEAREA-->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<!--BEGIN PROJECT_LOGO-->
<td id="projectlogo"><img alt="Logo" src="$relpath^$projectlogo"/></td>
<!--END PROJECT_LOGO-->
<!--BEGIN PROJECT_NAME-->
<td style="padding-left: 0.5em;">
<div id="projectname">avr-libc
<!--BEGIN PROJECT_NUMBER-->&#160;<span id="projectnumber">2.0.0</span><!--END PROJECT_NUMBER-->
</div>
<!--BEGIN PROJECT_BRIEF--><div id="projectbrief">$projectbrief</div><!--END PROJECT_BRIEF-->
</td>
<!--END PROJECT_NAME-->
<!--BEGIN !PROJECT_NAME-->
<!--BEGIN PROJECT_BRIEF-->
<td style="padding-left: 0.5em;">
<div id="projectbrief">$projectbrief</div>
</td>
<!--END PROJECT_BRIEF-->
<!--END !PROJECT_NAME-->
<!--BEGIN DISABLE_INDEX-->
<!--BEGIN SEARCHENGINE-->
<td>$searchbox</td>
<!--END SEARCHENGINE-->
<!--END DISABLE_INDEX-->
</tr>
</tbody>
</table>
<table>
<tr>
<td align="left"><a href="http://www.nongnu.org/avr-libc/"><h2>AVR Libc Home Page</h2></a></td>
<td align="center" colspan=4><img src="avrs.png" alt="AVRs" align="middle" border="0"></td>
<td align="right"><a href="https://savannah.nongnu.org/projects/avr-libc/"><h2>AVR Libc Development Pages</h2></a></td>
</tr>
<tr>
<td align="center" width="20%"><a href="index.html"><h2>Main Page</h2></a></td>
<td align="center" width="20%"><a href="pages.html"><h2>User Manual</h2></a></td>
<td align="center" width="20%"><a href="modules.html"><h2>Library Reference</h2></a></td>
<td align="center" width="20%"><a href="FAQ.html"><h2>FAQ</h2></a></td>
<td align="center" width="20%"><a href="group__demos.html"><h2>Example Projects</h2></a></td>
</tr>
</table>
</div>
<!--END TITLEAREA-->
<!-- end header part -->
<!-- Generated by Doxygen 1.6.3 -->
<script type="text/javascript"><!--
var searchBox = new SearchBox("searchBox", "search",false,'Search');
--></script>
<div class="contents">
<h1>twi.h File Reference</h1>
<p><a href="util_2twi_8h_source.html">Go to the source code of this file.</a></p>
<table border="0" cellpadding="0" cellspacing="0">
<tr><td colspan="2"><h2>Defines</h2></td></tr>
<tr><td colspan="2"><div class="groupHeader">TWSR values</div></td></tr>
<tr><td colspan="2"><div class="groupText"><p><a class="anchor" id="amgrp42f820ba9b5b7097b4fd1e83955bb8fc"></a> Mnemonics: <br/>
TW_MT_xxx - master transmitter <br/>
TW_MR_xxx - master receiver <br/>
TW_ST_xxx - slave transmitter <br/>
TW_SR_xxx - slave receiver </p>
</div></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__util__twi.html#ga8ec630c2063d0353c53d140b99382d80">TW_START</a>&nbsp;&nbsp;&nbsp;0x08</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__util__twi.html#ga8dce3e4b7e35355a8add9ed63d1fa3ab">TW_REP_START</a>&nbsp;&nbsp;&nbsp;0x10</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__util__twi.html#ga85cae14b4190042335d25ed9a1b72369">TW_MT_SLA_ACK</a>&nbsp;&nbsp;&nbsp;0x18</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__util__twi.html#gaca64b973c51d6548a962c1d7cae0663e">TW_MT_SLA_NACK</a>&nbsp;&nbsp;&nbsp;0x20</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__util__twi.html#ga4c28186053b5298305b131ad3e1111f7">TW_MT_DATA_ACK</a>&nbsp;&nbsp;&nbsp;0x28</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__util__twi.html#ga91c107a74d268f8578d866ed1bbbd4f3">TW_MT_DATA_NACK</a>&nbsp;&nbsp;&nbsp;0x30</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__util__twi.html#ga5959251c4bd80f48b5a029447d86adb3">TW_MT_ARB_LOST</a>&nbsp;&nbsp;&nbsp;0x38</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__util__twi.html#gad85222308836bfbe099255662ffb510c">TW_MR_ARB_LOST</a>&nbsp;&nbsp;&nbsp;0x38</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__util__twi.html#gac16504b87d15d83b97bb0ce61577bb40">TW_MR_SLA_ACK</a>&nbsp;&nbsp;&nbsp;0x40</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__util__twi.html#ga655325b6f8a1818103b126cc3774d8e8">TW_MR_SLA_NACK</a>&nbsp;&nbsp;&nbsp;0x48</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__util__twi.html#ga3c8c79b2ecb8d22358839890161cc33b">TW_MR_DATA_ACK</a>&nbsp;&nbsp;&nbsp;0x50</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__util__twi.html#ga532f0ffa12f684346c74a5cbec15950e">TW_MR_DATA_NACK</a>&nbsp;&nbsp;&nbsp;0x58</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__util__twi.html#ga0ecd2ca38d00279194460e65028a0533">TW_ST_SLA_ACK</a>&nbsp;&nbsp;&nbsp;0xA8</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__util__twi.html#ga1064659d0758206d43d69cd582d1f5da">TW_ST_ARB_LOST_SLA_ACK</a>&nbsp;&nbsp;&nbsp;0xB0</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__util__twi.html#ga2de84bf7cbf1cd7ae43a6e0f0eeca719">TW_ST_DATA_ACK</a>&nbsp;&nbsp;&nbsp;0xB8</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__util__twi.html#gacc1837317b1d45e9bb49b8e83cfe6d42">TW_ST_DATA_NACK</a>&nbsp;&nbsp;&nbsp;0xC0</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__util__twi.html#gaf92d03d0051d47f5b9375f0ef9293d64">TW_ST_LAST_DATA</a>&nbsp;&nbsp;&nbsp;0xC8</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__util__twi.html#ga9e9e761d674793772e6b3f77fc9d7fab">TW_SR_SLA_ACK</a>&nbsp;&nbsp;&nbsp;0x60</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__util__twi.html#ga1c3ed5ed345d17972002b9fd07f4f829">TW_SR_ARB_LOST_SLA_ACK</a>&nbsp;&nbsp;&nbsp;0x68</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__util__twi.html#ga6eb3b4230887a8b73d7787ff231ea911">TW_SR_GCALL_ACK</a>&nbsp;&nbsp;&nbsp;0x70</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__util__twi.html#ga4756103341a65e0e3889996cdf15b2fa">TW_SR_ARB_LOST_GCALL_ACK</a>&nbsp;&nbsp;&nbsp;0x78</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__util__twi.html#gac50f1a59c74c3109d4913dbecfb472c1">TW_SR_DATA_ACK</a>&nbsp;&nbsp;&nbsp;0x80</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__util__twi.html#ga6c0fa701fe9d96b0b7df29e8af154f94">TW_SR_DATA_NACK</a>&nbsp;&nbsp;&nbsp;0x88</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__util__twi.html#ga4abaad098fd92bed63719ffb01802c8d">TW_SR_GCALL_DATA_ACK</a>&nbsp;&nbsp;&nbsp;0x90</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__util__twi.html#ga42234278f9b01b9af75dbbc617b97890">TW_SR_GCALL_DATA_NACK</a>&nbsp;&nbsp;&nbsp;0x98</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__util__twi.html#ga98d2570f965790884cf1774e716ec629">TW_SR_STOP</a>&nbsp;&nbsp;&nbsp;0xA0</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__util__twi.html#gabcff70642634cb53e9d8e93872f70c90">TW_NO_INFO</a>&nbsp;&nbsp;&nbsp;0xF8</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__util__twi.html#ga90d373160b1d0a3f0c454af83c57df71">TW_BUS_ERROR</a>&nbsp;&nbsp;&nbsp;0x00</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__util__twi.html#ga8d3aca0acc182f459a51797321728168">TW_STATUS_MASK</a></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__util__twi.html#ga4440385d1818b4fe89b20341ea47b75a">TW_STATUS</a>&nbsp;&nbsp;&nbsp;(TWSR &amp; TW_STATUS_MASK)</td></tr>
<tr><td colspan="2"><div class="groupHeader">R/~W bit in SLA+R/W address field.</div></td></tr>
<tr><td colspan="2"><div class="groupText"><p><a class="anchor" id="amgrp8f939fc9c8471549ba6dd5932548fd46"></a> </p>
</div></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__util__twi.html#gaf40f13cadca25e0a83dc096858907819">TW_READ</a>&nbsp;&nbsp;&nbsp;1</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__util__twi.html#gac8a7cb1a91946c6e3955608a91371148">TW_WRITE</a>&nbsp;&nbsp;&nbsp;0</td></tr>
</table>
<hr/><a name="_details"></a><h2>Detailed Description</h2>
</div>
<!--- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&nbsp;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&nbsp;</span>Data Structures</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&nbsp;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&nbsp;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&nbsp;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&nbsp;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&nbsp;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&nbsp;</span>Defines</a></div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="" frameborder="0"
name="MSearchResults" id="MSearchResults">
</iframe>
</div>
<!-- HTML footer for doxygen 1.8.7-->
<!-- start footer part -->
<!--BEGIN GENERATE_TREEVIEW-->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
<ul>
$navpath
<li class="footer">$generatedby
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="$relpath^doxygen.png" alt="doxygen"/></a> 1.6.3 </li>
</ul>
</div>
<!--END GENERATE_TREEVIEW-->
<!--BEGIN !GENERATE_TREEVIEW-->
<hr class="footer"/><address class="footer"><small>
$generatedby &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="$relpath^doxygen.png" alt="doxygen"/>
</a> 1.6.3
</small></address>
<!--END !GENERATE_TREEVIEW-->
</body>
</html>