mirror of
https://github.com/SMFSW/cI2C
synced 2024-11-22 09:54:23 +01:00
5be682b96f
Commit: b079e7997d
347 lines
17 KiB
HTML
347 lines
17 KiB
HTML
<!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.13"/>
|
|
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
|
<title>Arduino Hardware I2C for AVR MCUs (plain c): examples/ci2c_advanced/ci2c_advanced.ino 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="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">Arduino Hardware I2C for AVR MCUs (plain c)
|
|
 <span id="projectnumber">1.3</span>
|
|
</div>
|
|
<div id="projectbrief">Arduino Hardware I2C for AVR MCUs (plain c) documentation</div>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<!-- end header part -->
|
|
<!-- Generated by Doxygen 1.8.13 -->
|
|
<script type="text/javascript" src="menudata.js"></script>
|
|
<script type="text/javascript" src="menu.js"></script>
|
|
<script type="text/javascript">
|
|
$(function() {
|
|
initMenu('',false,false,'search.php','Search');
|
|
});
|
|
</script>
|
|
<div id="main-nav"></div>
|
|
<div id="nav-path" class="navpath">
|
|
<ul>
|
|
<li class="navelem"><a class="el" href="dir_d28a4824dc47e487b107a5db32ef43c4.html">examples</a></li><li class="navelem"><a class="el" href="dir_419b297866c2b522bec278c4530a3ff4.html">ci2c_advanced</a></li> </ul>
|
|
</div>
|
|
</div><!-- top -->
|
|
<div class="header">
|
|
<div class="summary">
|
|
<a href="#func-members">Functions</a> |
|
|
<a href="#var-members">Variables</a> </div>
|
|
<div class="headertitle">
|
|
<div class="title">ci2c_advanced.ino File Reference</div> </div>
|
|
</div><!--header-->
|
|
<div class="contents">
|
|
<div class="textblock"><code>#include <<a class="el" href="ci2c_8h_source.html">ci2c.h</a>></code><br />
|
|
</div><div class="textblock"><div class="dynheader">
|
|
Include dependency graph for ci2c_advanced.ino:</div>
|
|
<div class="dyncontent">
|
|
<div class="center"><img src="ci2c__advanced_8ino__incl.png" border="0" usemap="#examples_2ci2c__advanced_2ci2c__advanced_8ino" alt=""/></div>
|
|
<!-- MAP 0 -->
|
|
</div>
|
|
</div><table class="memberdecls">
|
|
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
|
|
Functions</h2></td></tr>
|
|
<tr class="memitem:a4fc01d736fe50cf5b977f755b675f11d"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="ci2c__advanced_8ino.html#a4fc01d736fe50cf5b977f755b675f11d">setup</a> ()</td></tr>
|
|
<tr class="separator:a4fc01d736fe50cf5b977f755b675f11d"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:afe461d27b9c48d5921c00d521181f12f"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="ci2c__advanced_8ino.html#afe461d27b9c48d5921c00d521181f12f">loop</a> ()</td></tr>
|
|
<tr class="separator:afe461d27b9c48d5921c00d521181f12f"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a21e16cd4ec558cb48d7df75c546027a2"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="ci2c__advanced_8ino.html#a21e16cd4ec558cb48d7df75c546027a2">I2C_wr_advanced</a> (<a class="el" href="ci2c_8h.html#a916f30ff94044ecc9f8a177446da485a">I2C_SLAVE</a> *slave, const uint16_t reg_addr, uint8_t *data, const uint16_t bytes)</td></tr>
|
|
<tr class="memdesc:a21e16cd4ec558cb48d7df75c546027a2"><td class="mdescLeft"> </td><td class="mdescRight">This procedure calls appropriate functions to perform a proper send transaction on I2C bus. <a href="#a21e16cd4ec558cb48d7df75c546027a2">More...</a><br /></td></tr>
|
|
<tr class="separator:a21e16cd4ec558cb48d7df75c546027a2"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a5d82c84361ed35c102edb0f5e4f677d4"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="ci2c__advanced_8ino.html#a5d82c84361ed35c102edb0f5e4f677d4">I2C_rd_advanced</a> (<a class="el" href="ci2c_8h.html#a916f30ff94044ecc9f8a177446da485a">I2C_SLAVE</a> *slave, const uint16_t reg_addr, uint8_t *data, const uint16_t bytes)</td></tr>
|
|
<tr class="memdesc:a5d82c84361ed35c102edb0f5e4f677d4"><td class="mdescLeft"> </td><td class="mdescRight">This procedure calls appropriate functions to perform a proper receive transaction on I2C bus. <a href="#a5d82c84361ed35c102edb0f5e4f677d4">More...</a><br /></td></tr>
|
|
<tr class="separator:a5d82c84361ed35c102edb0f5e4f677d4"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:ad357f6e59cf5ec94f3ccaa70a20e1b11"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="ci2c__advanced_8ino.html#ad357f6e59cf5ec94f3ccaa70a20e1b11">I2C_get_chip_id</a> (<a class="el" href="ci2c_8h.html#a916f30ff94044ecc9f8a177446da485a">I2C_SLAVE</a> *slave, uint8_t *data)</td></tr>
|
|
<tr class="memdesc:ad357f6e59cf5ec94f3ccaa70a20e1b11"><td class="mdescLeft"> </td><td class="mdescRight">This procedure calls appropriate functions to get chip ID of FUJITSU devices. <a href="#ad357f6e59cf5ec94f3ccaa70a20e1b11">More...</a><br /></td></tr>
|
|
<tr class="separator:ad357f6e59cf5ec94f3ccaa70a20e1b11"><td class="memSeparator" colspan="2"> </td></tr>
|
|
</table><table class="memberdecls">
|
|
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="var-members"></a>
|
|
Variables</h2></td></tr>
|
|
<tr class="memitem:a2fc323c2ac98fd84324b5f6c4196e876"><td class="memItemLeft" align="right" valign="top">const uint8_t </td><td class="memItemRight" valign="bottom"><a class="el" href="ci2c__advanced_8ino.html#a2fc323c2ac98fd84324b5f6c4196e876">blank</a> = 0xEE</td></tr>
|
|
<tr class="separator:a2fc323c2ac98fd84324b5f6c4196e876"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a59b901a6dacd5ea8c9ceaa93cd8a1b2b"><td class="memItemLeft" align="right" valign="top"><a class="el" href="ci2c_8h.html#a916f30ff94044ecc9f8a177446da485a">I2C_SLAVE</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="ci2c__advanced_8ino.html#a59b901a6dacd5ea8c9ceaa93cd8a1b2b">FRAM</a></td></tr>
|
|
<tr class="separator:a59b901a6dacd5ea8c9ceaa93cd8a1b2b"><td class="memSeparator" colspan="2"> </td></tr>
|
|
</table>
|
|
<h2 class="groupheader">Function Documentation</h2>
|
|
<a id="ad357f6e59cf5ec94f3ccaa70a20e1b11"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#ad357f6e59cf5ec94f3ccaa70a20e1b11">◆ </a></span>I2C_get_chip_id()</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">bool I2C_get_chip_id </td>
|
|
<td>(</td>
|
|
<td class="paramtype"><a class="el" href="ci2c_8h.html#a916f30ff94044ecc9f8a177446da485a">I2C_SLAVE</a> * </td>
|
|
<td class="paramname"><em>slave</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">uint8_t * </td>
|
|
<td class="paramname"><em>data</em> </td>
|
|
</tr>
|
|
<tr>
|
|
<td></td>
|
|
<td>)</td>
|
|
<td></td><td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>This procedure calls appropriate functions to get chip ID of FUJITSU devices. </p>
|
|
<dl class="params"><dt>Parameters</dt><dd>
|
|
<table class="params">
|
|
<tr><td class="paramdir">[in,out]</td><td class="paramname">slave</td><td>- pointer to the I2C slave structure </td></tr>
|
|
<tr><td class="paramdir">[in,out]</td><td class="paramname">data</td><td>- pointer to the first byte of a block of data to read </td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
<dl class="section return"><dt>Returns</dt><dd>Boolean indicating success/fail of read attempt </dd></dl>
|
|
<div class="dynheader">
|
|
Here is the call graph for this function:</div>
|
|
<div class="dyncontent">
|
|
<div class="center"><img src="ci2c__advanced_8ino_ad357f6e59cf5ec94f3ccaa70a20e1b11_cgraph.png" border="0" usemap="#ci2c__advanced_8ino_ad357f6e59cf5ec94f3ccaa70a20e1b11_cgraph" alt=""/></div>
|
|
<!-- MAP 1 -->
|
|
</div>
|
|
<div class="dynheader">
|
|
Here is the caller graph for this function:</div>
|
|
<div class="dyncontent">
|
|
<div class="center"><img src="ci2c__advanced_8ino_ad357f6e59cf5ec94f3ccaa70a20e1b11_icgraph.png" border="0" usemap="#ci2c__advanced_8ino_ad357f6e59cf5ec94f3ccaa70a20e1b11_icgraph" alt=""/></div>
|
|
<!-- MAP 2 -->
|
|
</div>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="a5d82c84361ed35c102edb0f5e4f677d4"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#a5d82c84361ed35c102edb0f5e4f677d4">◆ </a></span>I2C_rd_advanced()</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">bool I2C_rd_advanced </td>
|
|
<td>(</td>
|
|
<td class="paramtype"><a class="el" href="ci2c_8h.html#a916f30ff94044ecc9f8a177446da485a">I2C_SLAVE</a> * </td>
|
|
<td class="paramname"><em>slave</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">const uint16_t </td>
|
|
<td class="paramname"><em>reg_addr</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">uint8_t * </td>
|
|
<td class="paramname"><em>data</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">const uint16_t </td>
|
|
<td class="paramname"><em>bytes</em> </td>
|
|
</tr>
|
|
<tr>
|
|
<td></td>
|
|
<td>)</td>
|
|
<td></td><td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>This procedure calls appropriate functions to perform a proper receive transaction on I2C bus. </p>
|
|
<dl class="params"><dt>Parameters</dt><dd>
|
|
<table class="params">
|
|
<tr><td class="paramdir">[in,out]</td><td class="paramname">slave</td><td>- pointer to the I2C slave structure </td></tr>
|
|
<tr><td class="paramdir">[in]</td><td class="paramname">reg_addr</td><td>- register address in register map </td></tr>
|
|
<tr><td class="paramdir">[in,out]</td><td class="paramname">data</td><td>- pointer to the first byte of a block of data to read </td></tr>
|
|
<tr><td class="paramdir">[in]</td><td class="paramname">bytes</td><td>- indicates how many bytes of data to read </td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
<dl class="section return"><dt>Returns</dt><dd>Boolean indicating success/fail of read attempt </dd></dl>
|
|
<div class="dynheader">
|
|
Here is the call graph for this function:</div>
|
|
<div class="dyncontent">
|
|
<div class="center"><img src="ci2c__advanced_8ino_a5d82c84361ed35c102edb0f5e4f677d4_cgraph.png" border="0" usemap="#ci2c__advanced_8ino_a5d82c84361ed35c102edb0f5e4f677d4_cgraph" alt=""/></div>
|
|
<!-- MAP 3 -->
|
|
</div>
|
|
<div class="dynheader">
|
|
Here is the caller graph for this function:</div>
|
|
<div class="dyncontent">
|
|
<div class="center"><img src="ci2c__advanced_8ino_a5d82c84361ed35c102edb0f5e4f677d4_icgraph.png" border="0" usemap="#ci2c__advanced_8ino_a5d82c84361ed35c102edb0f5e4f677d4_icgraph" alt=""/></div>
|
|
<!-- MAP 4 -->
|
|
</div>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="a21e16cd4ec558cb48d7df75c546027a2"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#a21e16cd4ec558cb48d7df75c546027a2">◆ </a></span>I2C_wr_advanced()</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">bool I2C_wr_advanced </td>
|
|
<td>(</td>
|
|
<td class="paramtype"><a class="el" href="ci2c_8h.html#a916f30ff94044ecc9f8a177446da485a">I2C_SLAVE</a> * </td>
|
|
<td class="paramname"><em>slave</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">const uint16_t </td>
|
|
<td class="paramname"><em>reg_addr</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">uint8_t * </td>
|
|
<td class="paramname"><em>data</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">const uint16_t </td>
|
|
<td class="paramname"><em>bytes</em> </td>
|
|
</tr>
|
|
<tr>
|
|
<td></td>
|
|
<td>)</td>
|
|
<td></td><td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>This procedure calls appropriate functions to perform a proper send transaction on I2C bus. </p>
|
|
<dl class="params"><dt>Parameters</dt><dd>
|
|
<table class="params">
|
|
<tr><td class="paramdir">[in,out]</td><td class="paramname">slave</td><td>- pointer to the I2C slave structure </td></tr>
|
|
<tr><td class="paramdir">[in]</td><td class="paramname">reg_addr</td><td>- register address in register map </td></tr>
|
|
<tr><td class="paramdir">[in]</td><td class="paramname">data</td><td>- pointer to the first byte of a block of data to write </td></tr>
|
|
<tr><td class="paramdir">[in]</td><td class="paramname">bytes</td><td>- indicates how many bytes of data to write </td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
<dl class="section return"><dt>Returns</dt><dd>Boolean indicating success/fail of write attempt </dd></dl>
|
|
<div class="dynheader">
|
|
Here is the call graph for this function:</div>
|
|
<div class="dyncontent">
|
|
<div class="center"><img src="ci2c__advanced_8ino_a21e16cd4ec558cb48d7df75c546027a2_cgraph.png" border="0" usemap="#ci2c__advanced_8ino_a21e16cd4ec558cb48d7df75c546027a2_cgraph" alt=""/></div>
|
|
<!-- MAP 5 -->
|
|
</div>
|
|
<div class="dynheader">
|
|
Here is the caller graph for this function:</div>
|
|
<div class="dyncontent">
|
|
<div class="center"><img src="ci2c__advanced_8ino_a21e16cd4ec558cb48d7df75c546027a2_icgraph.png" border="0" usemap="#ci2c__advanced_8ino_a21e16cd4ec558cb48d7df75c546027a2_icgraph" alt=""/></div>
|
|
<!-- MAP 6 -->
|
|
</div>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="afe461d27b9c48d5921c00d521181f12f"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#afe461d27b9c48d5921c00d521181f12f">◆ </a></span>loop()</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">void loop </td>
|
|
<td>(</td>
|
|
<td class="paramname"></td><td>)</td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
<div class="dynheader">
|
|
Here is the call graph for this function:</div>
|
|
<div class="dyncontent">
|
|
<div class="center"><img src="ci2c__advanced_8ino_afe461d27b9c48d5921c00d521181f12f_cgraph.png" border="0" usemap="#ci2c__advanced_8ino_afe461d27b9c48d5921c00d521181f12f_cgraph" alt=""/></div>
|
|
<!-- MAP 7 -->
|
|
</div>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="a4fc01d736fe50cf5b977f755b675f11d"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#a4fc01d736fe50cf5b977f755b675f11d">◆ </a></span>setup()</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">void setup </td>
|
|
<td>(</td>
|
|
<td class="paramname"></td><td>)</td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
<div class="dynheader">
|
|
Here is the call graph for this function:</div>
|
|
<div class="dyncontent">
|
|
<div class="center"><img src="ci2c__advanced_8ino_a4fc01d736fe50cf5b977f755b675f11d_cgraph.png" border="0" usemap="#ci2c__advanced_8ino_a4fc01d736fe50cf5b977f755b675f11d_cgraph" alt=""/></div>
|
|
<!-- MAP 8 -->
|
|
</div>
|
|
|
|
</div>
|
|
</div>
|
|
<h2 class="groupheader">Variable Documentation</h2>
|
|
<a id="a2fc323c2ac98fd84324b5f6c4196e876"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#a2fc323c2ac98fd84324b5f6c4196e876">◆ </a></span>blank</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">const uint8_t blank = 0xEE</td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
</div>
|
|
</div>
|
|
<a id="a59b901a6dacd5ea8c9ceaa93cd8a1b2b"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#a59b901a6dacd5ea8c9ceaa93cd8a1b2b">◆ </a></span>FRAM</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname"><a class="el" href="ci2c_8h.html#a916f30ff94044ecc9f8a177446da485a">I2C_SLAVE</a> FRAM</td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
</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.13
|
|
</small></address>
|
|
</body>
|
|
</html>
|