1
0
mirror of https://github.com/SMFSW/cI2C synced 2024-05-28 14:50:10 +02:00
cI2C/html/ci2c_8h.html
2018-05-27 14:03:03 +00:00

1552 lines
95 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): src/ci2c.h 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="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.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)
&#160;<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">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
$(function() {
initMenu('',true,false,'search.php','Search');
$(document).ready(function() { init_search(); });
});
</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0"
name="MSearchResults" id="MSearchResults">
</iframe>
</div>
<div id="nav-path" class="navpath">
<ul>
<li class="navelem"><a class="el" href="dir_68267d1309a1af8e8297ef4c3efbcdba.html">src</a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="summary">
<a href="#nested-classes">Data Structures</a> &#124;
<a href="#define-members">Macros</a> &#124;
<a href="#typedef-members">Typedefs</a> &#124;
<a href="#enum-members">Enumerations</a> &#124;
<a href="#func-members">Functions</a> </div>
<div class="headertitle">
<div class="title">ci2c.h File Reference</div> </div>
</div><!--header-->
<div class="contents">
<p>arduino <a class="el" href="structi2c.html" title="static ci2c bus config and control parameters ">i2c</a> in plain c declarations
<a href="#details">More...</a></p>
<div class="textblock"><code>#include &lt;Arduino.h&gt;</code><br />
<code>#include &lt;inttypes.h&gt;</code><br />
<code>#include &lt;stdbool.h&gt;</code><br />
</div><div class="textblock"><div class="dynheader">
Include dependency graph for ci2c.h:</div>
<div class="dyncontent">
<div class="center"><img src="ci2c_8h__incl.png" border="0" usemap="#src_2ci2c_8h" alt=""/></div>
<map name="src_2ci2c_8h" id="src_2ci2c_8h">
</map>
</div>
</div><div class="textblock"><div class="dynheader">
This graph shows which files directly or indirectly include this file:</div>
<div class="dyncontent">
<div class="center"><img src="ci2c_8h__dep__incl.png" border="0" usemap="#src_2ci2c_8hdep" alt=""/></div>
<map name="src_2ci2c_8hdep" id="src_2ci2c_8hdep">
<area shape="rect" id="node2" href="ci2c__advanced_8ino.html" title="examples/ci2c_advanced\l/ci2c_advanced.ino" alt="" coords="5,81,173,122"/>
<area shape="rect" id="node3" href="ci2c__master__read_8ino.html" title="examples/ci2c_master\l_read/ci2c_master_read.ino" alt="" coords="198,81,380,122"/>
<area shape="rect" id="node4" href="ci2c__master__write_8ino.html" title="examples/ci2c_master\l_write/ci2c_master_write.ino" alt="" coords="405,81,592,122"/>
<area shape="rect" id="node5" href="ci2c_8c.html" title="arduino master i2c in plain c code " alt="" coords="617,88,695,115"/>
</map>
</div>
</div>
<p><a href="ci2c_8h_source.html">Go to the source code of this file.</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="nested-classes"></a>
Data Structures</h2></td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_struct_i2_c_slave.html">StructI2CSlave</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">ci2c slave config and control parameters <a href="struct_struct_i2_c_slave.html#details">More...</a><br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="define-members"></a>
Macros</h2></td></tr>
<tr class="memitem:a903c1d6745f8a43b91ff42c6aaa3d362"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="ci2c_8h.html#a903c1d6745f8a43b91ff42c6aaa3d362">__attribute__</a>(a)</td></tr>
<tr class="memdesc:a903c1d6745f8a43b91ff42c6aaa3d362"><td class="mdescLeft">&#160;</td><td class="mdescRight">GCC attribute (ignored by Doxygen) <a href="#a903c1d6745f8a43b91ff42c6aaa3d362">More...</a><br /></td></tr>
<tr class="separator:a903c1d6745f8a43b91ff42c6aaa3d362"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5f24fbfb40599863dc8233731f781c4f"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="ci2c_8h.html#a5f24fbfb40599863dc8233731f781c4f">DEF_CI2C_NB_RETRIES</a>&#160;&#160;&#160;3</td></tr>
<tr class="memdesc:a5f24fbfb40599863dc8233731f781c4f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Default cI2C transaction retries. <a href="#a5f24fbfb40599863dc8233731f781c4f">More...</a><br /></td></tr>
<tr class="separator:a5f24fbfb40599863dc8233731f781c4f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1289567006bc93ef027a578d840c1e0d"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="ci2c_8h.html#a1289567006bc93ef027a578d840c1e0d">DEF_CI2C_TIMEOUT</a>&#160;&#160;&#160;100</td></tr>
<tr class="memdesc:a1289567006bc93ef027a578d840c1e0d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Default cI2C timeout. <a href="#a1289567006bc93ef027a578d840c1e0d">More...</a><br /></td></tr>
<tr class="separator:a1289567006bc93ef027a578d840c1e0d"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="typedef-members"></a>
Typedefs</h2></td></tr>
<tr class="memitem:aa06111accc71a55517b8810727523574"><td class="memItemLeft" align="right" valign="top">typedef enum <a class="el" href="ci2c_8h.html#a938af1642c47503bcefa8c8de11d7173">enI2C_RW</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="ci2c_8h.html#aa06111accc71a55517b8810727523574">I2C_RW</a></td></tr>
<tr class="separator:aa06111accc71a55517b8810727523574"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a19bff3ea64e8558c14de3fc951ba6bad"><td class="memItemLeft" align="right" valign="top">typedef enum <a class="el" href="ci2c_8h.html#a6572c289eb10e3543e42d34e710f5b67">enI2C_SPEED</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="ci2c_8h.html#a19bff3ea64e8558c14de3fc951ba6bad">I2C_SPEED</a></td></tr>
<tr class="separator:a19bff3ea64e8558c14de3fc951ba6bad"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a489c20161e94a87325ca7e240032686b"><td class="memItemLeft" align="right" valign="top">typedef enum <a class="el" href="ci2c_8h.html#a72ff1cee208396b40ebb555f1ed83743">enI2C_STATUS</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="ci2c_8h.html#a489c20161e94a87325ca7e240032686b">I2C_STATUS</a></td></tr>
<tr class="separator:a489c20161e94a87325ca7e240032686b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9dadf50a895a9c06f7fb2968166b316a"><td class="memItemLeft" align="right" valign="top">typedef enum <a class="el" href="ci2c_8h.html#a98a8ae8df4864bb7d9a8b4509d863513">enI2C_INT_SIZE</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="ci2c_8h.html#a9dadf50a895a9c06f7fb2968166b316a">I2C_INT_SIZE</a></td></tr>
<tr class="separator:a9dadf50a895a9c06f7fb2968166b316a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af9c7e60b84174c9a42c0883f4c4a9b97"><td class="memItemLeft" align="right" valign="top">typedef bool(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="ci2c_8h.html#af9c7e60b84174c9a42c0883f4c4a9b97">ci2c_fct_ptr</a>) (void *, const uint16_t, uint8_t *, const uint16_t)</td></tr>
<tr class="memdesc:af9c7e60b84174c9a42c0883f4c4a9b97"><td class="mdescLeft">&#160;</td><td class="mdescRight"><a class="el" href="structi2c.html" title="static ci2c bus config and control parameters ">i2c</a> read/write function pointer typedef <a href="#af9c7e60b84174c9a42c0883f4c4a9b97">More...</a><br /></td></tr>
<tr class="separator:af9c7e60b84174c9a42c0883f4c4a9b97"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a916f30ff94044ecc9f8a177446da485a"><td class="memItemLeft" align="right" valign="top">typedef struct <a class="el" href="struct_struct_i2_c_slave.html">StructI2CSlave</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="ci2c_8h.html#a916f30ff94044ecc9f8a177446da485a">I2C_SLAVE</a></td></tr>
<tr class="separator:a916f30ff94044ecc9f8a177446da485a"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="enum-members"></a>
Enumerations</h2></td></tr>
<tr class="memitem:a938af1642c47503bcefa8c8de11d7173"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="ci2c_8h.html#a938af1642c47503bcefa8c8de11d7173">enI2C_RW</a> { <a class="el" href="ci2c_8h.html#a938af1642c47503bcefa8c8de11d7173adbf6337ed546b3c21fd08c397a346bb2">I2C_WRITE</a> = 0,
<a class="el" href="ci2c_8h.html#a938af1642c47503bcefa8c8de11d7173a30040082a257338fe25e5bd5136bc9a8">I2C_READ</a>
}<tr class="memdesc:a938af1642c47503bcefa8c8de11d7173"><td class="mdescLeft">&#160;</td><td class="mdescRight">I2C RW bit enumeration. <a href="ci2c_8h.html#a938af1642c47503bcefa8c8de11d7173">More...</a><br /></td></tr>
</td></tr>
<tr class="separator:a938af1642c47503bcefa8c8de11d7173"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6572c289eb10e3543e42d34e710f5b67"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="ci2c_8h.html#a6572c289eb10e3543e42d34e710f5b67">enI2C_SPEED</a> { <a class="el" href="ci2c_8h.html#a6572c289eb10e3543e42d34e710f5b67acf556067cbb57aaf5f6c71e64fa46cb6">I2C_STD</a> = 100,
<a class="el" href="ci2c_8h.html#a6572c289eb10e3543e42d34e710f5b67ad87a75087baf689cf3a240a769d2b558">I2C_FM</a> = 400,
<a class="el" href="ci2c_8h.html#a6572c289eb10e3543e42d34e710f5b67acab280b484ea06a499900154515f3005">I2C_FMP</a> = 1000,
<a class="el" href="ci2c_8h.html#a6572c289eb10e3543e42d34e710f5b67a6595b5891728545ae73b56eecaedeae6">I2C_HS</a> = 3400
}<tr class="memdesc:a6572c289eb10e3543e42d34e710f5b67"><td class="mdescLeft">&#160;</td><td class="mdescRight">I2C bus speed. <a href="ci2c_8h.html#a6572c289eb10e3543e42d34e710f5b67">More...</a><br /></td></tr>
</td></tr>
<tr class="separator:a6572c289eb10e3543e42d34e710f5b67"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a72ff1cee208396b40ebb555f1ed83743"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="ci2c_8h.html#a72ff1cee208396b40ebb555f1ed83743">enI2C_STATUS</a> { <a class="el" href="ci2c_8h.html#a72ff1cee208396b40ebb555f1ed83743aeceba296bdda2b90e8835c431fe7a72a">I2C_OK</a> = 0x00,
<a class="el" href="ci2c_8h.html#a72ff1cee208396b40ebb555f1ed83743a49e65f3960437d80b8328e7898cc90de">I2C_BUSY</a>,
<a class="el" href="ci2c_8h.html#a72ff1cee208396b40ebb555f1ed83743ae869b289c6b9b73b95dd1b40cbc9d651">I2C_NACK</a>
}<tr class="memdesc:a72ff1cee208396b40ebb555f1ed83743"><td class="mdescLeft">&#160;</td><td class="mdescRight">I2C slave status. <a href="ci2c_8h.html#a72ff1cee208396b40ebb555f1ed83743">More...</a><br /></td></tr>
</td></tr>
<tr class="separator:a72ff1cee208396b40ebb555f1ed83743"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a98a8ae8df4864bb7d9a8b4509d863513"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="ci2c_8h.html#a98a8ae8df4864bb7d9a8b4509d863513">enI2C_INT_SIZE</a> { <a class="el" href="ci2c_8h.html#a98a8ae8df4864bb7d9a8b4509d863513a32d90f6214c5b494454666979a87b595">I2C_NO_REG</a> = 0x00,
<a class="el" href="ci2c_8h.html#a98a8ae8df4864bb7d9a8b4509d863513a61e2f99ae5ece961b270ed978f43ffca">I2C_8B_REG</a>,
<a class="el" href="ci2c_8h.html#a98a8ae8df4864bb7d9a8b4509d863513af7da1353d311749981b6ad185fa4d2d9">I2C_16B_REG</a>
}<tr class="memdesc:a98a8ae8df4864bb7d9a8b4509d863513"><td class="mdescLeft">&#160;</td><td class="mdescRight">I2C slave internal address registers size. <a href="ci2c_8h.html#a98a8ae8df4864bb7d9a8b4509d863513">More...</a><br /></td></tr>
</td></tr>
<tr class="separator:a98a8ae8df4864bb7d9a8b4509d863513"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:af93c2e35e06edcea492607b628d5ae1f"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="ci2c_8h.html#af93c2e35e06edcea492607b628d5ae1f">I2C_slave_init</a> (<a class="el" href="ci2c_8h.html#a916f30ff94044ecc9f8a177446da485a">I2C_SLAVE</a> *slave, const uint8_t sl_addr, const <a class="el" href="ci2c_8h.html#a9dadf50a895a9c06f7fb2968166b316a">I2C_INT_SIZE</a> reg_sz)</td></tr>
<tr class="memdesc:af93c2e35e06edcea492607b628d5ae1f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Init an I2C slave structure for cMI2C communication. <a href="#af93c2e35e06edcea492607b628d5ae1f">More...</a><br /></td></tr>
<tr class="separator:af93c2e35e06edcea492607b628d5ae1f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8d88530833d3685d52ea5486b1316427"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="ci2c_8h.html#a8d88530833d3685d52ea5486b1316427">I2C_slave_set_rw_func</a> (<a class="el" href="ci2c_8h.html#a916f30ff94044ecc9f8a177446da485a">I2C_SLAVE</a> *slave, const <a class="el" href="ci2c_8h.html#af9c7e60b84174c9a42c0883f4c4a9b97">ci2c_fct_ptr</a> func, const <a class="el" href="ci2c_8h.html#aa06111accc71a55517b8810727523574">I2C_RW</a> rw)</td></tr>
<tr class="memdesc:a8d88530833d3685d52ea5486b1316427"><td class="mdescLeft">&#160;</td><td class="mdescRight">Redirect slave I2C read/write function (if needed for advanced use) <a href="#a8d88530833d3685d52ea5486b1316427">More...</a><br /></td></tr>
<tr class="separator:a8d88530833d3685d52ea5486b1316427"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad0eed3132d3284d6f921d13488721226"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="ci2c_8h.html#ad0eed3132d3284d6f921d13488721226">I2C_slave_set_addr</a> (<a class="el" href="ci2c_8h.html#a916f30ff94044ecc9f8a177446da485a">I2C_SLAVE</a> *slave, const uint8_t sl_addr)</td></tr>
<tr class="memdesc:ad0eed3132d3284d6f921d13488721226"><td class="mdescLeft">&#160;</td><td class="mdescRight">Change I2C slave address. <a href="#ad0eed3132d3284d6f921d13488721226">More...</a><br /></td></tr>
<tr class="separator:ad0eed3132d3284d6f921d13488721226"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a47d121773459b24568e5df4f81fbf905"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="ci2c_8h.html#a47d121773459b24568e5df4f81fbf905">I2C_slave_set_reg_size</a> (<a class="el" href="ci2c_8h.html#a916f30ff94044ecc9f8a177446da485a">I2C_SLAVE</a> *slave, const <a class="el" href="ci2c_8h.html#a9dadf50a895a9c06f7fb2968166b316a">I2C_INT_SIZE</a> reg_sz)</td></tr>
<tr class="memdesc:a47d121773459b24568e5df4f81fbf905"><td class="mdescLeft">&#160;</td><td class="mdescRight">Change I2C registers map size (for access) <a href="#a47d121773459b24568e5df4f81fbf905">More...</a><br /></td></tr>
<tr class="separator:a47d121773459b24568e5df4f81fbf905"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a061eb7b1f0b2fe0203d7947d01437042"><td class="memItemLeft" align="right" valign="top">uint8_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="ci2c_8h.html#a061eb7b1f0b2fe0203d7947d01437042">I2C_slave_get_addr</a> (const <a class="el" href="ci2c_8h.html#a916f30ff94044ecc9f8a177446da485a">I2C_SLAVE</a> *slave)</td></tr>
<tr class="memdesc:a061eb7b1f0b2fe0203d7947d01437042"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get I2C slave address. <a href="#a061eb7b1f0b2fe0203d7947d01437042">More...</a><br /></td></tr>
<tr class="separator:a061eb7b1f0b2fe0203d7947d01437042"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:acbece630e3277827b1a0351d0bdad74a"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="ci2c_8h.html#acbece630e3277827b1a0351d0bdad74a">I2C_slave_get_reg_size</a> (const <a class="el" href="ci2c_8h.html#a916f30ff94044ecc9f8a177446da485a">I2C_SLAVE</a> *slave)</td></tr>
<tr class="memdesc:acbece630e3277827b1a0351d0bdad74a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get I2C register map size (for access) <a href="#acbece630e3277827b1a0351d0bdad74a">More...</a><br /></td></tr>
<tr class="separator:acbece630e3277827b1a0351d0bdad74a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a41be982659cb049fcdf88a18e3e4c4e0"><td class="memItemLeft" align="right" valign="top">uint16_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="ci2c_8h.html#a41be982659cb049fcdf88a18e3e4c4e0">I2C_slave_get_reg_addr</a> (const <a class="el" href="ci2c_8h.html#a916f30ff94044ecc9f8a177446da485a">I2C_SLAVE</a> *slave)</td></tr>
<tr class="memdesc:a41be982659cb049fcdf88a18e3e4c4e0"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get I2C current register address (addr may passed this way in procedures if contigous accesses) <a href="#a41be982659cb049fcdf88a18e3e4c4e0">More...</a><br /></td></tr>
<tr class="separator:a41be982659cb049fcdf88a18e3e4c4e0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a99283d800332d700deed19f5a37e61d8"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="ci2c_8h.html#a99283d800332d700deed19f5a37e61d8">I2C_init</a> (const uint16_t <a class="el" href="ci2c_8c.html#a182293bc8273b099986183c0959e77da">speed</a>)</td></tr>
<tr class="memdesc:a99283d800332d700deed19f5a37e61d8"><td class="mdescLeft">&#160;</td><td class="mdescRight">Enable I2c module on arduino board (including pull-ups, enabling of ACK, and setting clock frequency) <a href="#a99283d800332d700deed19f5a37e61d8">More...</a><br /></td></tr>
<tr class="separator:a99283d800332d700deed19f5a37e61d8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a74e1381b536811b202d087471723fb9e"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="ci2c_8h.html#a74e1381b536811b202d087471723fb9e">I2C_uninit</a> ()</td></tr>
<tr class="memdesc:a74e1381b536811b202d087471723fb9e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Disable I2c module on arduino board (releasing pull-ups, and TWI control) <a href="#a74e1381b536811b202d087471723fb9e">More...</a><br /></td></tr>
<tr class="separator:a74e1381b536811b202d087471723fb9e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7c5b1857ae28ade8959a8a06f500ecde"><td class="memItemLeft" align="right" valign="top">uint16_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="ci2c_8h.html#a7c5b1857ae28ade8959a8a06f500ecde">I2C_set_speed</a> (const uint16_t <a class="el" href="ci2c_8c.html#a182293bc8273b099986183c0959e77da">speed</a>)</td></tr>
<tr class="memdesc:a7c5b1857ae28ade8959a8a06f500ecde"><td class="mdescLeft">&#160;</td><td class="mdescRight">Change I2C frequency. <a href="#a7c5b1857ae28ade8959a8a06f500ecde">More...</a><br /></td></tr>
<tr class="separator:a7c5b1857ae28ade8959a8a06f500ecde"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:acd209174a3b5ab213131a93633c19a38"><td class="memItemLeft" align="right" valign="top">uint16_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="ci2c_8h.html#acd209174a3b5ab213131a93633c19a38">I2C_set_timeout</a> (const uint16_t <a class="el" href="ci2c_8c.html#a7f1ad43d3bf79b40bc39dbb5a6c3a5ae">timeout</a>)</td></tr>
<tr class="memdesc:acd209174a3b5ab213131a93633c19a38"><td class="mdescLeft">&#160;</td><td class="mdescRight">Change I2C ack timeout. <a href="#acd209174a3b5ab213131a93633c19a38">More...</a><br /></td></tr>
<tr class="separator:acd209174a3b5ab213131a93633c19a38"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad74e31ebd08a9ddef57f571783f37cc7"><td class="memItemLeft" align="right" valign="top">uint8_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="ci2c_8h.html#ad74e31ebd08a9ddef57f571783f37cc7">I2C_set_retries</a> (const uint8_t <a class="el" href="ci2c_8c.html#a458ee314eb40ab7e0c913a036333cc0d">retries</a>)</td></tr>
<tr class="memdesc:ad74e31ebd08a9ddef57f571783f37cc7"><td class="mdescLeft">&#160;</td><td class="mdescRight">Change I2C message retries (in case of failure) <a href="#ad74e31ebd08a9ddef57f571783f37cc7">More...</a><br /></td></tr>
<tr class="separator:ad74e31ebd08a9ddef57f571783f37cc7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac370df06df51c68217eafcee96e5a3e0"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="ci2c_8h.html#ac370df06df51c68217eafcee96e5a3e0">I2C_is_busy</a> (void)</td></tr>
<tr class="memdesc:ac370df06df51c68217eafcee96e5a3e0"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get I2C busy status. <a href="#ac370df06df51c68217eafcee96e5a3e0">More...</a><br /></td></tr>
<tr class="separator:ac370df06df51c68217eafcee96e5a3e0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a83adef951ffd9fb5105216f6ee464bb9"><td class="memItemLeft" align="right" valign="top"><a class="el" href="ci2c_8h.html#a489c20161e94a87325ca7e240032686b">I2C_STATUS</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="ci2c_8h.html#a83adef951ffd9fb5105216f6ee464bb9">I2C_write</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:a83adef951ffd9fb5105216f6ee464bb9"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function writes the provided data to the address specified. <a href="#a83adef951ffd9fb5105216f6ee464bb9">More...</a><br /></td></tr>
<tr class="separator:a83adef951ffd9fb5105216f6ee464bb9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:add4eec772922da692bdbb84c354a3fa0"><td class="memItemLeft" align="right" valign="top"><a class="el" href="ci2c_8h.html#a489c20161e94a87325ca7e240032686b">I2C_STATUS</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="ci2c_8h.html#add4eec772922da692bdbb84c354a3fa0">I2C_write_next</a> (<a class="el" href="ci2c_8h.html#a916f30ff94044ecc9f8a177446da485a">I2C_SLAVE</a> *slave, uint8_t *data, const uint16_t bytes)</td></tr>
<tr class="memdesc:add4eec772922da692bdbb84c354a3fa0"><td class="mdescLeft">&#160;</td><td class="mdescRight">This inline is a wrapper to I2C_write in case of contigous operations. <a href="#add4eec772922da692bdbb84c354a3fa0">More...</a><br /></td></tr>
<tr class="separator:add4eec772922da692bdbb84c354a3fa0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad5e4a006f6cea5844a810fab30b40f87"><td class="memItemLeft" align="right" valign="top"><a class="el" href="ci2c_8h.html#a489c20161e94a87325ca7e240032686b">I2C_STATUS</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="ci2c_8h.html#ad5e4a006f6cea5844a810fab30b40f87">I2C_read</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:ad5e4a006f6cea5844a810fab30b40f87"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function reads data from the address specified and stores this data in the area provided by the pointer. <a href="#ad5e4a006f6cea5844a810fab30b40f87">More...</a><br /></td></tr>
<tr class="separator:ad5e4a006f6cea5844a810fab30b40f87"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:afc15fc625892e1e50e831d7934073299"><td class="memItemLeft" align="right" valign="top"><a class="el" href="ci2c_8h.html#a489c20161e94a87325ca7e240032686b">I2C_STATUS</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="ci2c_8h.html#afc15fc625892e1e50e831d7934073299">I2C_read_next</a> (<a class="el" href="ci2c_8h.html#a916f30ff94044ecc9f8a177446da485a">I2C_SLAVE</a> *slave, uint8_t *data, const uint16_t bytes)</td></tr>
<tr class="memdesc:afc15fc625892e1e50e831d7934073299"><td class="mdescLeft">&#160;</td><td class="mdescRight">This inline is a wrapper to I2C_read in case of contigous operations. <a href="#afc15fc625892e1e50e831d7934073299">More...</a><br /></td></tr>
<tr class="separator:afc15fc625892e1e50e831d7934073299"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2c25bc5fdf909b7d45d722970eb04d82"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="ci2c_8h.html#a2c25bc5fdf909b7d45d722970eb04d82">I2C_reset</a> (void)</td></tr>
<tr class="memdesc:a2c25bc5fdf909b7d45d722970eb04d82"><td class="mdescLeft">&#160;</td><td class="mdescRight">I2C bus reset (Release SCL and SDA lines and re-enable module) <a href="#a2c25bc5fdf909b7d45d722970eb04d82">More...</a><br /></td></tr>
<tr class="separator:a2c25bc5fdf909b7d45d722970eb04d82"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aaadadbb29f315f2030223665f1988188"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="ci2c_8h.html#aaadadbb29f315f2030223665f1988188">I2C_start</a> (void)</td></tr>
<tr class="memdesc:aaadadbb29f315f2030223665f1988188"><td class="mdescLeft">&#160;</td><td class="mdescRight">Send start condition. <a href="#aaadadbb29f315f2030223665f1988188">More...</a><br /></td></tr>
<tr class="separator:aaadadbb29f315f2030223665f1988188"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a53eb804c24e8e86717f7aaebdab1aa53"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="ci2c_8h.html#a53eb804c24e8e86717f7aaebdab1aa53">I2C_stop</a> (void)</td></tr>
<tr class="memdesc:a53eb804c24e8e86717f7aaebdab1aa53"><td class="mdescLeft">&#160;</td><td class="mdescRight">Send stop condition. <a href="#a53eb804c24e8e86717f7aaebdab1aa53">More...</a><br /></td></tr>
<tr class="separator:a53eb804c24e8e86717f7aaebdab1aa53"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab20db75dfa22dc47df506cab3bd11c60"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="ci2c_8h.html#ab20db75dfa22dc47df506cab3bd11c60">I2C_wr8</a> (const uint8_t dat)</td></tr>
<tr class="memdesc:ab20db75dfa22dc47df506cab3bd11c60"><td class="mdescLeft">&#160;</td><td class="mdescRight">Send byte on bus. <a href="#ab20db75dfa22dc47df506cab3bd11c60">More...</a><br /></td></tr>
<tr class="separator:ab20db75dfa22dc47df506cab3bd11c60"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8d6d7eb118ea1505df039075a00c267b"><td class="memItemLeft" align="right" valign="top">uint8_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="ci2c_8h.html#a8d6d7eb118ea1505df039075a00c267b">I2C_rd8</a> (const bool ack)</td></tr>
<tr class="memdesc:a8d6d7eb118ea1505df039075a00c267b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Receive byte from bus. <a href="#a8d6d7eb118ea1505df039075a00c267b">More...</a><br /></td></tr>
<tr class="separator:a8d6d7eb118ea1505df039075a00c267b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aae536cceb33d07e71af9d459a2fc6dc8"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="ci2c_8h.html#aae536cceb33d07e71af9d459a2fc6dc8">I2C_sndAddr</a> (<a class="el" href="ci2c_8h.html#a916f30ff94044ecc9f8a177446da485a">I2C_SLAVE</a> *slave, const <a class="el" href="ci2c_8h.html#aa06111accc71a55517b8810727523574">I2C_RW</a> rw)</td></tr>
<tr class="memdesc:aae536cceb33d07e71af9d459a2fc6dc8"><td class="mdescLeft">&#160;</td><td class="mdescRight">Send I2C address. <a href="#aae536cceb33d07e71af9d459a2fc6dc8">More...</a><br /></td></tr>
<tr class="separator:aae536cceb33d07e71af9d459a2fc6dc8"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>arduino <a class="el" href="structi2c.html" title="static ci2c bus config and control parameters ">i2c</a> in plain c declarations </p>
<dl class="section author"><dt>Author</dt><dd>SMFSW </dd></dl>
<dl class="section copyright"><dt>Copyright</dt><dd>MIT SMFSW (2017-2018) </dd></dl>
<dl class="section warning"><dt>Warning</dt><dd>Don't access (r/w) last 16b internal address byte alone right after init, this would lead to hazardous result (in such case, make a dummy read of addr 0 before) </dd></dl>
</div><h2 class="groupheader">Macro Definition Documentation</h2>
<a id="a903c1d6745f8a43b91ff42c6aaa3d362"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a903c1d6745f8a43b91ff42c6aaa3d362">&#9670;&nbsp;</a></span>__attribute__</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define __attribute__</td>
<td>(</td>
<td class="paramtype">&#160;</td>
<td class="paramname">a</td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>GCC attribute (ignored by Doxygen) </p>
</div>
</div>
<a id="a5f24fbfb40599863dc8233731f781c4f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a5f24fbfb40599863dc8233731f781c4f">&#9670;&nbsp;</a></span>DEF_CI2C_NB_RETRIES</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define DEF_CI2C_NB_RETRIES&#160;&#160;&#160;3</td>
</tr>
</table>
</div><div class="memdoc">
<p>Default cI2C transaction retries. </p>
</div>
</div>
<a id="a1289567006bc93ef027a578d840c1e0d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a1289567006bc93ef027a578d840c1e0d">&#9670;&nbsp;</a></span>DEF_CI2C_TIMEOUT</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define DEF_CI2C_TIMEOUT&#160;&#160;&#160;100</td>
</tr>
</table>
</div><div class="memdoc">
<p>Default cI2C timeout. </p>
</div>
</div>
<h2 class="groupheader">Typedef Documentation</h2>
<a id="af9c7e60b84174c9a42c0883f4c4a9b97"></a>
<h2 class="memtitle"><span class="permalink"><a href="#af9c7e60b84174c9a42c0883f4c4a9b97">&#9670;&nbsp;</a></span>ci2c_fct_ptr</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">typedef bool(* ci2c_fct_ptr) (void *, const uint16_t, uint8_t *, const uint16_t)</td>
</tr>
</table>
</div><div class="memdoc">
<p><a class="el" href="structi2c.html" title="static ci2c bus config and control parameters ">i2c</a> read/write function pointer typedef </p>
</div>
</div>
<a id="a9dadf50a895a9c06f7fb2968166b316a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a9dadf50a895a9c06f7fb2968166b316a">&#9670;&nbsp;</a></span>I2C_INT_SIZE</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">typedef enum <a class="el" href="ci2c_8h.html#a98a8ae8df4864bb7d9a8b4509d863513">enI2C_INT_SIZE</a> <a class="el" href="ci2c_8h.html#a9dadf50a895a9c06f7fb2968166b316a">I2C_INT_SIZE</a></td>
</tr>
</table>
</div><div class="memdoc">
</div>
</div>
<a id="aa06111accc71a55517b8810727523574"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa06111accc71a55517b8810727523574">&#9670;&nbsp;</a></span>I2C_RW</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">typedef enum <a class="el" href="ci2c_8h.html#a938af1642c47503bcefa8c8de11d7173">enI2C_RW</a> <a class="el" href="ci2c_8h.html#aa06111accc71a55517b8810727523574">I2C_RW</a></td>
</tr>
</table>
</div><div class="memdoc">
</div>
</div>
<a id="a916f30ff94044ecc9f8a177446da485a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a916f30ff94044ecc9f8a177446da485a">&#9670;&nbsp;</a></span>I2C_SLAVE</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">typedef struct <a class="el" href="struct_struct_i2_c_slave.html">StructI2CSlave</a> <a class="el" href="ci2c_8h.html#a916f30ff94044ecc9f8a177446da485a">I2C_SLAVE</a></td>
</tr>
</table>
</div><div class="memdoc">
</div>
</div>
<a id="a19bff3ea64e8558c14de3fc951ba6bad"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a19bff3ea64e8558c14de3fc951ba6bad">&#9670;&nbsp;</a></span>I2C_SPEED</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">typedef enum <a class="el" href="ci2c_8h.html#a6572c289eb10e3543e42d34e710f5b67">enI2C_SPEED</a> <a class="el" href="ci2c_8h.html#a19bff3ea64e8558c14de3fc951ba6bad">I2C_SPEED</a></td>
</tr>
</table>
</div><div class="memdoc">
</div>
</div>
<a id="a489c20161e94a87325ca7e240032686b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a489c20161e94a87325ca7e240032686b">&#9670;&nbsp;</a></span>I2C_STATUS</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">typedef enum <a class="el" href="ci2c_8h.html#a72ff1cee208396b40ebb555f1ed83743">enI2C_STATUS</a> <a class="el" href="ci2c_8h.html#a489c20161e94a87325ca7e240032686b">I2C_STATUS</a></td>
</tr>
</table>
</div><div class="memdoc">
</div>
</div>
<h2 class="groupheader">Enumeration Type Documentation</h2>
<a id="a98a8ae8df4864bb7d9a8b4509d863513"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a98a8ae8df4864bb7d9a8b4509d863513">&#9670;&nbsp;</a></span>enI2C_INT_SIZE</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">enum <a class="el" href="ci2c_8h.html#a98a8ae8df4864bb7d9a8b4509d863513">enI2C_INT_SIZE</a></td>
</tr>
</table>
</div><div class="memdoc">
<p>I2C slave internal address registers size. </p>
<dl class="attribute"><dt><b><a class="el" href="attribute.html#_attribute000007">GCC Attributes:</a></b></dt><dd>packed enum </dd></dl>
<table class="fieldtable">
<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><a id="a98a8ae8df4864bb7d9a8b4509d863513a32d90f6214c5b494454666979a87b595"></a>I2C_NO_REG&#160;</td><td class="fielddoc"><p>Internal address registers not applicable for slave. </p>
</td></tr>
<tr><td class="fieldname"><a id="a98a8ae8df4864bb7d9a8b4509d863513a61e2f99ae5ece961b270ed978f43ffca"></a>I2C_8B_REG&#160;</td><td class="fielddoc"><p>Slave internal address registers space is 8bits wide. </p>
</td></tr>
<tr><td class="fieldname"><a id="a98a8ae8df4864bb7d9a8b4509d863513af7da1353d311749981b6ad185fa4d2d9"></a>I2C_16B_REG&#160;</td><td class="fielddoc"><p>Slave internal address registers space is 16bits wide. </p>
</td></tr>
</table>
</div>
</div>
<a id="a938af1642c47503bcefa8c8de11d7173"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a938af1642c47503bcefa8c8de11d7173">&#9670;&nbsp;</a></span>enI2C_RW</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">enum <a class="el" href="ci2c_8h.html#a938af1642c47503bcefa8c8de11d7173">enI2C_RW</a></td>
</tr>
</table>
</div><div class="memdoc">
<p>I2C RW bit enumeration. </p>
<dl class="attribute"><dt><b><a class="el" href="attribute.html#_attribute000004">GCC Attributes:</a></b></dt><dd>packed enum </dd></dl>
<table class="fieldtable">
<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><a id="a938af1642c47503bcefa8c8de11d7173adbf6337ed546b3c21fd08c397a346bb2"></a>I2C_WRITE&#160;</td><td class="fielddoc"><p>I2C rw bit (write) </p>
</td></tr>
<tr><td class="fieldname"><a id="a938af1642c47503bcefa8c8de11d7173a30040082a257338fe25e5bd5136bc9a8"></a>I2C_READ&#160;</td><td class="fielddoc"><p>I2C rw bit (read) </p>
</td></tr>
</table>
</div>
</div>
<a id="a6572c289eb10e3543e42d34e710f5b67"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a6572c289eb10e3543e42d34e710f5b67">&#9670;&nbsp;</a></span>enI2C_SPEED</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">enum <a class="el" href="ci2c_8h.html#a6572c289eb10e3543e42d34e710f5b67">enI2C_SPEED</a></td>
</tr>
</table>
</div><div class="memdoc">
<p>I2C bus speed. </p>
<dl class="attribute"><dt><b><a class="el" href="attribute.html#_attribute000005">GCC Attributes:</a></b></dt><dd>packed enum </dd></dl>
<table class="fieldtable">
<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><a id="a6572c289eb10e3543e42d34e710f5b67acf556067cbb57aaf5f6c71e64fa46cb6"></a>I2C_STD&#160;</td><td class="fielddoc"><p>I2C Standard (100KHz) </p>
</td></tr>
<tr><td class="fieldname"><a id="a6572c289eb10e3543e42d34e710f5b67ad87a75087baf689cf3a240a769d2b558"></a>I2C_FM&#160;</td><td class="fielddoc"><p>I2C Fast Mode (400KHz) </p>
</td></tr>
<tr><td class="fieldname"><a id="a6572c289eb10e3543e42d34e710f5b67acab280b484ea06a499900154515f3005"></a>I2C_FMP&#160;</td><td class="fielddoc"><p>I2C Fast mode + (1MHz): will set speed to Fast Mode (up to 400KHz on avr) </p>
</td></tr>
<tr><td class="fieldname"><a id="a6572c289eb10e3543e42d34e710f5b67a6595b5891728545ae73b56eecaedeae6"></a>I2C_HS&#160;</td><td class="fielddoc"><p>I2C High Speed (3.4MHz): will set speed to Fast Mode (up to 400KHz on avr) </p>
</td></tr>
</table>
</div>
</div>
<a id="a72ff1cee208396b40ebb555f1ed83743"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a72ff1cee208396b40ebb555f1ed83743">&#9670;&nbsp;</a></span>enI2C_STATUS</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">enum <a class="el" href="ci2c_8h.html#a72ff1cee208396b40ebb555f1ed83743">enI2C_STATUS</a></td>
</tr>
</table>
</div><div class="memdoc">
<p>I2C slave status. </p>
<dl class="attribute"><dt><b><a class="el" href="attribute.html#_attribute000006">GCC Attributes:</a></b></dt><dd>packed enum </dd></dl>
<table class="fieldtable">
<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><a id="a72ff1cee208396b40ebb555f1ed83743aeceba296bdda2b90e8835c431fe7a72a"></a>I2C_OK&#160;</td><td class="fielddoc"><p>I2C OK. </p>
</td></tr>
<tr><td class="fieldname"><a id="a72ff1cee208396b40ebb555f1ed83743a49e65f3960437d80b8328e7898cc90de"></a>I2C_BUSY&#160;</td><td class="fielddoc"><p>I2C Bus busy. </p>
</td></tr>
<tr><td class="fieldname"><a id="a72ff1cee208396b40ebb555f1ed83743ae869b289c6b9b73b95dd1b40cbc9d651"></a>I2C_NACK&#160;</td><td class="fielddoc"><p>I2C Not Acknowledge. </p>
</td></tr>
</table>
</div>
</div>
<h2 class="groupheader">Function Documentation</h2>
<a id="a99283d800332d700deed19f5a37e61d8"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a99283d800332d700deed19f5a37e61d8">&#9670;&nbsp;</a></span>I2C_init()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void I2C_init </td>
<td>(</td>
<td class="paramtype">const uint16_t&#160;</td>
<td class="paramname"><em>speed</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Enable I2c module on arduino board (including pull-ups, enabling of ACK, and setting clock frequency) </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">speed</td><td>- I2C bus speed in KHz </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>nothing </dd></dl>
<div class="dynheader">
Here is the call graph for this function:</div>
<div class="dyncontent">
<div class="center"><img src="ci2c_8h_a99283d800332d700deed19f5a37e61d8_cgraph.png" border="0" usemap="#ci2c_8h_a99283d800332d700deed19f5a37e61d8_cgraph" alt=""/></div>
<map name="ci2c_8h_a99283d800332d700deed19f5a37e61d8_cgraph" id="ci2c_8h_a99283d800332d700deed19f5a37e61d8_cgraph">
<area shape="rect" id="node2" href="ci2c_8c.html#a7c5b1857ae28ade8959a8a06f500ecde" title="Change I2C frequency. " alt="" coords="121,5,231,32"/>
<area shape="rect" id="node3" href="ci2c_8c.html#a2c25bc5fdf909b7d45d722970eb04d82" title="I2C bus reset (Release SCL and SDA lines and re&#45;enable module) " alt="" coords="281,5,359,32"/>
</map>
</div>
<div class="dynheader">
Here is the caller graph for this function:</div>
<div class="dyncontent">
<div class="center"><img src="ci2c_8h_a99283d800332d700deed19f5a37e61d8_icgraph.png" border="0" usemap="#ci2c_8h_a99283d800332d700deed19f5a37e61d8_icgraph" alt=""/></div>
<map name="ci2c_8h_a99283d800332d700deed19f5a37e61d8_icgraph" id="ci2c_8h_a99283d800332d700deed19f5a37e61d8_icgraph">
<area shape="rect" id="node2" href="ci2c__advanced_8ino.html#a4fc01d736fe50cf5b977f755b675f11d" title="setup" alt="" coords="174,5,229,32"/>
<area shape="rect" id="node3" href="ci2c_8h.html#a41be982659cb049fcdf88a18e3e4c4e0" title="Get I2C current register address (addr may passed this way in procedures if contigous accesses) ..." alt="" coords="120,56,283,83"/>
</map>
</div>
</div>
</div>
<a id="ac370df06df51c68217eafcee96e5a3e0"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ac370df06df51c68217eafcee96e5a3e0">&#9670;&nbsp;</a></span>I2C_is_busy()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">bool I2C_is_busy </td>
<td>(</td>
<td class="paramtype">void&#160;</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Get I2C busy status. </p>
<dl class="section return"><dt>Returns</dt><dd>true if busy </dd></dl>
<div class="dynheader">
Here is the caller graph for this function:</div>
<div class="dyncontent">
<div class="center"><img src="ci2c_8h_ac370df06df51c68217eafcee96e5a3e0_icgraph.png" border="0" usemap="#ci2c_8h_ac370df06df51c68217eafcee96e5a3e0_icgraph" alt=""/></div>
<map name="ci2c_8h_ac370df06df51c68217eafcee96e5a3e0_icgraph" id="ci2c_8h_ac370df06df51c68217eafcee96e5a3e0_icgraph">
<area shape="rect" id="node2" href="ci2c_8h.html#a41be982659cb049fcdf88a18e3e4c4e0" title="Get I2C current register address (addr may passed this way in procedures if contigous accesses) ..." alt="" coords="149,5,312,32"/>
</map>
</div>
</div>
</div>
<a id="a8d6d7eb118ea1505df039075a00c267b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a8d6d7eb118ea1505df039075a00c267b">&#9670;&nbsp;</a></span>I2C_rd8()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">uint8_t I2C_rd8 </td>
<td>(</td>
<td class="paramtype">const bool&#160;</td>
<td class="paramname"><em>ack</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Receive byte from bus. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">ack</td><td>- true if wait for ack </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>true if data reception acknowledged (false otherwise) </dd></dl>
<div class="dynheader">
Here is the caller graph for this function:</div>
<div class="dyncontent">
<div class="center"><img src="ci2c_8h_a8d6d7eb118ea1505df039075a00c267b_icgraph.png" border="0" usemap="#ci2c_8h_a8d6d7eb118ea1505df039075a00c267b_icgraph" alt=""/></div>
<map name="ci2c_8h_a8d6d7eb118ea1505df039075a00c267b_icgraph" id="ci2c_8h_a8d6d7eb118ea1505df039075a00c267b_icgraph">
<area shape="rect" id="node2" href="ci2c__advanced_8ino.html#a5d82c84361ed35c102edb0f5e4f677d4" title="This procedure calls appropriate functions to perform a proper receive transaction on I2C bus..." alt="" coords="123,5,247,32"/>
<area shape="rect" id="node4" href="ci2c__advanced_8ino.html#ad357f6e59cf5ec94f3ccaa70a20e1b11" title="This procedure calls appropriate functions to get chip ID of FUJITSU devices. " alt="" coords="127,56,243,83"/>
<area shape="rect" id="node5" href="ci2c_8h.html#afc15fc625892e1e50e831d7934073299" title="This inline is a wrapper to I2C_read in case of contigous operations. " alt="" coords="132,107,239,133"/>
<area shape="rect" id="node3" href="ci2c__advanced_8ino.html#a4fc01d736fe50cf5b977f755b675f11d" title="setup" alt="" coords="297,31,351,57"/>
<area shape="rect" id="node6" href="ci2c__master__read_8ino.html#afe461d27b9c48d5921c00d521181f12f" title="loop" alt="" coords="301,107,347,133"/>
</map>
</div>
</div>
</div>
<a id="ad5e4a006f6cea5844a810fab30b40f87"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ad5e4a006f6cea5844a810fab30b40f87">&#9670;&nbsp;</a></span>I2C_read()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="ci2c_8h.html#a489c20161e94a87325ca7e240032686b">I2C_STATUS</a> I2C_read </td>
<td>(</td>
<td class="paramtype"><a class="el" href="ci2c_8h.html#a916f30ff94044ecc9f8a177446da485a">I2C_SLAVE</a> *&#160;</td>
<td class="paramname"><em>slave</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const uint16_t&#160;</td>
<td class="paramname"><em>reg_addr</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint8_t *&#160;</td>
<td class="paramname"><em>data</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const uint16_t&#160;</td>
<td class="paramname"><em>bytes</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>This function reads data from the address specified and stores this data in the area provided by the pointer. </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>I2C_STATUS status of read attempt </dd></dl>
<div class="dynheader">
Here is the caller graph for this function:</div>
<div class="dyncontent">
<div class="center"><img src="ci2c_8h_ad5e4a006f6cea5844a810fab30b40f87_icgraph.png" border="0" usemap="#ci2c_8h_ad5e4a006f6cea5844a810fab30b40f87_icgraph" alt=""/></div>
<map name="ci2c_8h_ad5e4a006f6cea5844a810fab30b40f87_icgraph" id="ci2c_8h_ad5e4a006f6cea5844a810fab30b40f87_icgraph">
<area shape="rect" id="node2" href="ci2c__advanced_8ino.html#afe461d27b9c48d5921c00d521181f12f" title="loop" alt="" coords="161,5,207,32"/>
<area shape="rect" id="node3" href="ci2c_8h.html#add4eec772922da692bdbb84c354a3fa0" title="This inline is a wrapper to I2C_write in case of contigous operations. " alt="" coords="129,56,239,83"/>
<area shape="rect" id="node4" href="ci2c_8h.html#afc15fc625892e1e50e831d7934073299" title="This inline is a wrapper to I2C_read in case of contigous operations. " alt="" coords="131,107,237,133"/>
<area shape="rect" id="node5" href="ci2c__master__read_8ino.html#afe461d27b9c48d5921c00d521181f12f" title="loop" alt="" coords="289,107,335,133"/>
</map>
</div>
</div>
</div>
<a id="afc15fc625892e1e50e831d7934073299"></a>
<h2 class="memtitle"><span class="permalink"><a href="#afc15fc625892e1e50e831d7934073299">&#9670;&nbsp;</a></span>I2C_read_next()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="ci2c_8h.html#a489c20161e94a87325ca7e240032686b">I2C_STATUS</a> I2C_read_next </td>
<td>(</td>
<td class="paramtype"><a class="el" href="ci2c_8h.html#a916f30ff94044ecc9f8a177446da485a">I2C_SLAVE</a> *&#160;</td>
<td class="paramname"><em>slave</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint8_t *&#160;</td>
<td class="paramname"><em>data</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const uint16_t&#160;</td>
<td class="paramname"><em>bytes</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>This inline is a wrapper to I2C_read in case of contigous operations. </p>
<dl class="attribute"><dt><b><a class="el" href="attribute.html#_attribute000013">GCC Attributes:</a></b></dt><dd>inline </dd></dl>
<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">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>I2C_STATUS status 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_8h_afc15fc625892e1e50e831d7934073299_cgraph.png" border="0" usemap="#ci2c_8h_afc15fc625892e1e50e831d7934073299_cgraph" alt=""/></div>
<map name="ci2c_8h_afc15fc625892e1e50e831d7934073299_cgraph" id="ci2c_8h_afc15fc625892e1e50e831d7934073299_cgraph">
<area shape="rect" id="node2" href="ci2c_8h.html#ad5e4a006f6cea5844a810fab30b40f87" title="This function reads data from the address specified and stores this data in the area provided by the ..." alt="" coords="172,5,247,32"/>
<area shape="rect" id="node3" href="ci2c_8h.html#a2c25bc5fdf909b7d45d722970eb04d82" title="I2C bus reset (Release SCL and SDA lines and re&#45;enable module) " alt="" coords="170,56,249,83"/>
<area shape="rect" id="node4" href="ci2c_8h.html#aaadadbb29f315f2030223665f1988188" title="Send start condition. " alt="" coords="171,107,247,133"/>
<area shape="rect" id="node5" href="ci2c_8h.html#a53eb804c24e8e86717f7aaebdab1aa53" title="Send stop condition. " alt="" coords="172,157,247,184"/>
<area shape="rect" id="node6" href="ci2c_8h.html#ab20db75dfa22dc47df506cab3bd11c60" title="Send byte on bus. " alt="" coords="174,208,245,235"/>
<area shape="rect" id="node7" href="ci2c_8h.html#a8d6d7eb118ea1505df039075a00c267b" title="Receive byte from bus. " alt="" coords="175,259,243,285"/>
<area shape="rect" id="node8" href="ci2c_8h.html#aae536cceb33d07e71af9d459a2fc6dc8" title="Send I2C address. " alt="" coords="160,309,259,336"/>
</map>
</div>
<div class="dynheader">
Here is the caller graph for this function:</div>
<div class="dyncontent">
<div class="center"><img src="ci2c_8h_afc15fc625892e1e50e831d7934073299_icgraph.png" border="0" usemap="#ci2c_8h_afc15fc625892e1e50e831d7934073299_icgraph" alt=""/></div>
<map name="ci2c_8h_afc15fc625892e1e50e831d7934073299_icgraph" id="ci2c_8h_afc15fc625892e1e50e831d7934073299_icgraph">
<area shape="rect" id="node2" href="ci2c__master__read_8ino.html#afe461d27b9c48d5921c00d521181f12f" title="loop" alt="" coords="161,5,207,32"/>
</map>
</div>
</div>
</div>
<a id="a2c25bc5fdf909b7d45d722970eb04d82"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a2c25bc5fdf909b7d45d722970eb04d82">&#9670;&nbsp;</a></span>I2C_reset()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void I2C_reset </td>
<td>(</td>
<td class="paramtype">void&#160;</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>I2C bus reset (Release SCL and SDA lines and re-enable module) </p>
<dl class="section return"><dt>Returns</dt><dd>nothing </dd></dl>
<div class="dynheader">
Here is the caller graph for this function:</div>
<div class="dyncontent">
<div class="center"><img src="ci2c_8h_a2c25bc5fdf909b7d45d722970eb04d82_icgraph.png" border="0" usemap="#ci2c_8h_a2c25bc5fdf909b7d45d722970eb04d82_icgraph" alt=""/></div>
<map name="ci2c_8h_a2c25bc5fdf909b7d45d722970eb04d82_icgraph" id="ci2c_8h_a2c25bc5fdf909b7d45d722970eb04d82_icgraph">
<area shape="rect" id="node2" href="ci2c_8h.html#a7c5b1857ae28ade8959a8a06f500ecde" title="Change I2C frequency. " alt="" coords="134,56,245,83"/>
<area shape="rect" id="node6" href="ci2c_8h.html#afc15fc625892e1e50e831d7934073299" title="This inline is a wrapper to I2C_read in case of contigous operations. " alt="" coords="136,107,243,133"/>
<area shape="rect" id="node3" href="ci2c_8h.html#a99283d800332d700deed19f5a37e61d8" title="Enable I2c module on arduino board (including pull&#45;ups, enabling of ACK, and setting clock frequency)..." alt="" coords="293,5,360,32"/>
<area shape="rect" id="node5" href="ci2c_8h.html#a41be982659cb049fcdf88a18e3e4c4e0" title="Get I2C current register address (addr may passed this way in procedures if contigous accesses) ..." alt="" coords="408,56,571,83"/>
<area shape="rect" id="node4" href="ci2c__advanced_8ino.html#a4fc01d736fe50cf5b977f755b675f11d" title="setup" alt="" coords="462,5,517,32"/>
<area shape="rect" id="node7" href="ci2c__master__read_8ino.html#afe461d27b9c48d5921c00d521181f12f" title="loop" alt="" coords="303,107,350,133"/>
</map>
</div>
</div>
</div>
<a id="ad74e31ebd08a9ddef57f571783f37cc7"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ad74e31ebd08a9ddef57f571783f37cc7">&#9670;&nbsp;</a></span>I2C_set_retries()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">uint8_t I2C_set_retries </td>
<td>(</td>
<td class="paramtype">const uint8_t&#160;</td>
<td class="paramname"><em>retries</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Change I2C message retries (in case of failure) </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">retries</td><td>- I2C number of retries (max of 8) </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Configured number of retries </dd></dl>
<div class="dynheader">
Here is the caller graph for this function:</div>
<div class="dyncontent">
<div class="center"><img src="ci2c_8h_ad74e31ebd08a9ddef57f571783f37cc7_icgraph.png" border="0" usemap="#ci2c_8h_ad74e31ebd08a9ddef57f571783f37cc7_icgraph" alt=""/></div>
<map name="ci2c_8h_ad74e31ebd08a9ddef57f571783f37cc7_icgraph" id="ci2c_8h_ad74e31ebd08a9ddef57f571783f37cc7_icgraph">
<area shape="rect" id="node2" href="ci2c_8h.html#a41be982659cb049fcdf88a18e3e4c4e0" title="Get I2C current register address (addr may passed this way in procedures if contigous accesses) ..." alt="" coords="165,5,328,32"/>
</map>
</div>
</div>
</div>
<a id="a7c5b1857ae28ade8959a8a06f500ecde"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a7c5b1857ae28ade8959a8a06f500ecde">&#9670;&nbsp;</a></span>I2C_set_speed()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">uint16_t I2C_set_speed </td>
<td>(</td>
<td class="paramtype">const uint16_t&#160;</td>
<td class="paramname"><em>speed</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Change I2C frequency. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">speed</td><td>- I2C bus speed in KHz (max 400KHz on AVR) </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Configured bus speed</dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">speed</td><td>- I2C speed in KHz (max 400KHz on avr) </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Configured bus speed </dd></dl>
<div class="dynheader">
Here is the call graph for this function:</div>
<div class="dyncontent">
<div class="center"><img src="ci2c_8h_a7c5b1857ae28ade8959a8a06f500ecde_cgraph.png" border="0" usemap="#ci2c_8h_a7c5b1857ae28ade8959a8a06f500ecde_cgraph" alt=""/></div>
<map name="ci2c_8h_a7c5b1857ae28ade8959a8a06f500ecde_cgraph" id="ci2c_8h_a7c5b1857ae28ade8959a8a06f500ecde_cgraph">
<area shape="rect" id="node2" href="ci2c_8c.html#a2c25bc5fdf909b7d45d722970eb04d82" title="I2C bus reset (Release SCL and SDA lines and re&#45;enable module) " alt="" coords="166,5,245,32"/>
</map>
</div>
<div class="dynheader">
Here is the caller graph for this function:</div>
<div class="dyncontent">
<div class="center"><img src="ci2c_8h_a7c5b1857ae28ade8959a8a06f500ecde_icgraph.png" border="0" usemap="#ci2c_8h_a7c5b1857ae28ade8959a8a06f500ecde_icgraph" alt=""/></div>
<map name="ci2c_8h_a7c5b1857ae28ade8959a8a06f500ecde_icgraph" id="ci2c_8h_a7c5b1857ae28ade8959a8a06f500ecde_icgraph">
<area shape="rect" id="node2" href="ci2c_8h.html#a99283d800332d700deed19f5a37e61d8" title="Enable I2c module on arduino board (including pull&#45;ups, enabling of ACK, and setting clock frequency)..." alt="" coords="165,5,232,32"/>
<area shape="rect" id="node4" href="ci2c_8h.html#a41be982659cb049fcdf88a18e3e4c4e0" title="Get I2C current register address (addr may passed this way in procedures if contigous accesses) ..." alt="" coords="280,56,443,83"/>
<area shape="rect" id="node3" href="ci2c__advanced_8ino.html#a4fc01d736fe50cf5b977f755b675f11d" title="setup" alt="" coords="334,5,389,32"/>
</map>
</div>
</div>
</div>
<a id="acd209174a3b5ab213131a93633c19a38"></a>
<h2 class="memtitle"><span class="permalink"><a href="#acd209174a3b5ab213131a93633c19a38">&#9670;&nbsp;</a></span>I2C_set_timeout()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">uint16_t I2C_set_timeout </td>
<td>(</td>
<td class="paramtype">const uint16_t&#160;</td>
<td class="paramname"><em>timeout</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Change I2C ack timeout. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">timeout</td><td>- I2C ack timeout (500 ms max) </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Configured timeout </dd></dl>
<div class="dynheader">
Here is the caller graph for this function:</div>
<div class="dyncontent">
<div class="center"><img src="ci2c_8h_acd209174a3b5ab213131a93633c19a38_icgraph.png" border="0" usemap="#ci2c_8h_acd209174a3b5ab213131a93633c19a38_icgraph" alt=""/></div>
<map name="ci2c_8h_acd209174a3b5ab213131a93633c19a38_icgraph" id="ci2c_8h_acd209174a3b5ab213131a93633c19a38_icgraph">
<area shape="rect" id="node2" href="ci2c_8h.html#a41be982659cb049fcdf88a18e3e4c4e0" title="Get I2C current register address (addr may passed this way in procedures if contigous accesses) ..." alt="" coords="173,5,336,32"/>
</map>
</div>
</div>
</div>
<a id="a061eb7b1f0b2fe0203d7947d01437042"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a061eb7b1f0b2fe0203d7947d01437042">&#9670;&nbsp;</a></span>I2C_slave_get_addr()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">uint8_t I2C_slave_get_addr </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="ci2c_8h.html#a916f30ff94044ecc9f8a177446da485a">I2C_SLAVE</a> *&#160;</td>
<td class="paramname"><em>slave</em></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Get I2C slave address. </p>
<dl class="attribute"><dt><b><a class="el" href="attribute.html#_attribute000009">GCC Attributes:</a></b></dt><dd>inline </dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">slave</td><td>- pointer to the I2C slave structure </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>I2C slave address </dd></dl>
</div>
</div>
<a id="a41be982659cb049fcdf88a18e3e4c4e0"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a41be982659cb049fcdf88a18e3e4c4e0">&#9670;&nbsp;</a></span>I2C_slave_get_reg_addr()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">uint16_t I2C_slave_get_reg_addr </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="ci2c_8h.html#a916f30ff94044ecc9f8a177446da485a">I2C_SLAVE</a> *&#160;</td>
<td class="paramname"><em>slave</em></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Get I2C current register address (addr may passed this way in procedures if contigous accesses) </p>
<dl class="attribute"><dt><b><a class="el" href="attribute.html#_attribute000011">GCC Attributes:</a></b></dt><dd>inline </dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">slave</td><td>- pointer to the I2C slave structure </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>current register map address </dd></dl>
<div class="dynheader">
Here is the call graph for this function:</div>
<div class="dyncontent">
<div class="center"><img src="ci2c_8h_a41be982659cb049fcdf88a18e3e4c4e0_cgraph.png" border="0" usemap="#ci2c_8h_a41be982659cb049fcdf88a18e3e4c4e0_cgraph" alt=""/></div>
<map name="ci2c_8h_a41be982659cb049fcdf88a18e3e4c4e0_cgraph" id="ci2c_8h_a41be982659cb049fcdf88a18e3e4c4e0_cgraph">
<area shape="rect" id="node2" href="ci2c_8h.html#a99283d800332d700deed19f5a37e61d8" title="Enable I2c module on arduino board (including pull&#45;ups, enabling of ACK, and setting clock frequency)..." alt="" coords="243,5,309,32"/>
<area shape="rect" id="node5" href="ci2c_8h.html#a74e1381b536811b202d087471723fb9e" title="Disable I2c module on arduino board (releasing pull&#45;ups, and TWI control) " alt="" coords="235,56,317,83"/>
<area shape="rect" id="node6" href="ci2c_8h.html#a7c5b1857ae28ade8959a8a06f500ecde" title="Change I2C frequency. " alt="" coords="385,81,495,108"/>
<area shape="rect" id="node7" href="ci2c_8h.html#acd209174a3b5ab213131a93633c19a38" title="Change I2C ack timeout. " alt="" coords="217,157,335,184"/>
<area shape="rect" id="node8" href="ci2c_8h.html#ad74e31ebd08a9ddef57f571783f37cc7" title="Change I2C message retries (in case of failure) " alt="" coords="221,208,331,235"/>
<area shape="rect" id="node9" href="ci2c_8h.html#ac370df06df51c68217eafcee96e5a3e0" title="Get I2C busy status. " alt="" coords="229,259,323,285"/>
<area shape="rect" id="node10" href="ci2c_8h.html#a83adef951ffd9fb5105216f6ee464bb9" title="This function writes the provided data to the address specified. " alt="" coords="237,309,315,336"/>
<area shape="rect" id="node3" href="ci2c_8c.html#a7c5b1857ae28ade8959a8a06f500ecde" title="Change I2C frequency. " alt="" coords="385,19,495,45"/>
<area shape="rect" id="node4" href="ci2c_8c.html#a2c25bc5fdf909b7d45d722970eb04d82" title="I2C bus reset (Release SCL and SDA lines and re&#45;enable module) " alt="" coords="545,51,623,77"/>
</map>
</div>
</div>
</div>
<a id="acbece630e3277827b1a0351d0bdad74a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#acbece630e3277827b1a0351d0bdad74a">&#9670;&nbsp;</a></span>I2C_slave_get_reg_size()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">bool I2C_slave_get_reg_size </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="ci2c_8h.html#a916f30ff94044ecc9f8a177446da485a">I2C_SLAVE</a> *&#160;</td>
<td class="paramname"><em>slave</em></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Get I2C register map size (for access) </p>
<dl class="attribute"><dt><b><a class="el" href="attribute.html#_attribute000010">GCC Attributes:</a></b></dt><dd>inline </dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">slave</td><td>- pointer to the I2C slave structure </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>register map using 16bits if true (1Byte otherwise) </dd></dl>
</div>
</div>
<a id="af93c2e35e06edcea492607b628d5ae1f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#af93c2e35e06edcea492607b628d5ae1f">&#9670;&nbsp;</a></span>I2C_slave_init()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void I2C_slave_init </td>
<td>(</td>
<td class="paramtype"><a class="el" href="ci2c_8h.html#a916f30ff94044ecc9f8a177446da485a">I2C_SLAVE</a> *&#160;</td>
<td class="paramname"><em>slave</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const uint8_t&#160;</td>
<td class="paramname"><em>sl_addr</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const <a class="el" href="ci2c_8h.html#a9dadf50a895a9c06f7fb2968166b316a">I2C_INT_SIZE</a>&#160;</td>
<td class="paramname"><em>reg_sz</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Init an I2C slave structure for cMI2C communication. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">slave</td><td>- pointer to the I2C slave structure to init </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">sl_addr</td><td>- I2C slave address </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">reg_sz</td><td>- internal register map size </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>nothing </dd></dl>
<div class="dynheader">
Here is the call graph for this function:</div>
<div class="dyncontent">
<div class="center"><img src="ci2c_8h_af93c2e35e06edcea492607b628d5ae1f_cgraph.png" border="0" usemap="#ci2c_8h_af93c2e35e06edcea492607b628d5ae1f_cgraph" alt=""/></div>
<map name="ci2c_8h_af93c2e35e06edcea492607b628d5ae1f_cgraph" id="ci2c_8h_af93c2e35e06edcea492607b628d5ae1f_cgraph">
<area shape="rect" id="node2" href="ci2c_8c.html#ad0eed3132d3284d6f921d13488721226" title="Change I2C slave address. " alt="" coords="172,5,311,32"/>
<area shape="rect" id="node3" href="ci2c_8c.html#a47d121773459b24568e5df4f81fbf905" title="Change I2C registers map size (for access) " alt="" coords="160,56,323,83"/>
<area shape="rect" id="node4" href="ci2c_8c.html#a8d88530833d3685d52ea5486b1316427" title="Redirect slave I2C read/write function (if needed for advanced use) " alt="" coords="162,107,321,133"/>
</map>
</div>
<div class="dynheader">
Here is the caller graph for this function:</div>
<div class="dyncontent">
<div class="center"><img src="ci2c_8h_af93c2e35e06edcea492607b628d5ae1f_icgraph.png" border="0" usemap="#ci2c_8h_af93c2e35e06edcea492607b628d5ae1f_icgraph" alt=""/></div>
<map name="ci2c_8h_af93c2e35e06edcea492607b628d5ae1f_icgraph" id="ci2c_8h_af93c2e35e06edcea492607b628d5ae1f_icgraph">
<area shape="rect" id="node2" href="ci2c__advanced_8ino.html#a4fc01d736fe50cf5b977f755b675f11d" title="setup" alt="" coords="326,5,381,32"/>
<area shape="rect" id="node3" href="ci2c__advanced_8ino.html#ad357f6e59cf5ec94f3ccaa70a20e1b11" title="This procedure calls appropriate functions to get chip ID of FUJITSU devices. " alt="" coords="161,31,277,57"/>
</map>
</div>
</div>
</div>
<a id="ad0eed3132d3284d6f921d13488721226"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ad0eed3132d3284d6f921d13488721226">&#9670;&nbsp;</a></span>I2C_slave_set_addr()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">bool I2C_slave_set_addr </td>
<td>(</td>
<td class="paramtype"><a class="el" href="ci2c_8h.html#a916f30ff94044ecc9f8a177446da485a">I2C_SLAVE</a> *&#160;</td>
<td class="paramname"><em>slave</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const uint8_t&#160;</td>
<td class="paramname"><em>sl_addr</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Change I2C slave address. </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 to init </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">sl_addr</td><td>- I2C slave address </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>true if new address set (false if address is &gt;7Fh) </dd></dl>
<div class="dynheader">
Here is the caller graph for this function:</div>
<div class="dyncontent">
<div class="center"><img src="ci2c_8h_ad0eed3132d3284d6f921d13488721226_icgraph.png" border="0" usemap="#ci2c_8h_ad0eed3132d3284d6f921d13488721226_icgraph" alt=""/></div>
<map name="ci2c_8h_ad0eed3132d3284d6f921d13488721226_icgraph" id="ci2c_8h_ad0eed3132d3284d6f921d13488721226_icgraph">
<area shape="rect" id="node2" href="ci2c_8h.html#af93c2e35e06edcea492607b628d5ae1f" title="Init an I2C slave structure for cMI2C communication. " alt="" coords="193,5,298,32"/>
<area shape="rect" id="node3" href="ci2c__advanced_8ino.html#a4fc01d736fe50cf5b977f755b675f11d" title="setup" alt="" coords="513,5,567,32"/>
<area shape="rect" id="node4" href="ci2c__advanced_8ino.html#ad357f6e59cf5ec94f3ccaa70a20e1b11" title="This procedure calls appropriate functions to get chip ID of FUJITSU devices. " alt="" coords="347,31,463,57"/>
</map>
</div>
</div>
</div>
<a id="a47d121773459b24568e5df4f81fbf905"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a47d121773459b24568e5df4f81fbf905">&#9670;&nbsp;</a></span>I2C_slave_set_reg_size()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">bool I2C_slave_set_reg_size </td>
<td>(</td>
<td class="paramtype"><a class="el" href="ci2c_8h.html#a916f30ff94044ecc9f8a177446da485a">I2C_SLAVE</a> *&#160;</td>
<td class="paramname"><em>slave</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const <a class="el" href="ci2c_8h.html#a9dadf50a895a9c06f7fb2968166b316a">I2C_INT_SIZE</a>&#160;</td>
<td class="paramname"><em>reg_sz</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Change I2C registers map size (for access) </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_sz</td><td>- internal register map size </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>true if new size is correct (false otherwise and set to 16bit by default) </dd></dl>
<div class="dynheader">
Here is the caller graph for this function:</div>
<div class="dyncontent">
<div class="center"><img src="ci2c_8h_a47d121773459b24568e5df4f81fbf905_icgraph.png" border="0" usemap="#ci2c_8h_a47d121773459b24568e5df4f81fbf905_icgraph" alt=""/></div>
<map name="ci2c_8h_a47d121773459b24568e5df4f81fbf905_icgraph" id="ci2c_8h_a47d121773459b24568e5df4f81fbf905_icgraph">
<area shape="rect" id="node2" href="ci2c_8h.html#af93c2e35e06edcea492607b628d5ae1f" title="Init an I2C slave structure for cMI2C communication. " alt="" coords="217,5,322,32"/>
<area shape="rect" id="node3" href="ci2c__advanced_8ino.html#a4fc01d736fe50cf5b977f755b675f11d" title="setup" alt="" coords="537,5,591,32"/>
<area shape="rect" id="node4" href="ci2c__advanced_8ino.html#ad357f6e59cf5ec94f3ccaa70a20e1b11" title="This procedure calls appropriate functions to get chip ID of FUJITSU devices. " alt="" coords="371,31,487,57"/>
</map>
</div>
</div>
</div>
<a id="a8d88530833d3685d52ea5486b1316427"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a8d88530833d3685d52ea5486b1316427">&#9670;&nbsp;</a></span>I2C_slave_set_rw_func()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void I2C_slave_set_rw_func </td>
<td>(</td>
<td class="paramtype"><a class="el" href="ci2c_8h.html#a916f30ff94044ecc9f8a177446da485a">I2C_SLAVE</a> *&#160;</td>
<td class="paramname"><em>slave</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const <a class="el" href="ci2c_8h.html#af9c7e60b84174c9a42c0883f4c4a9b97">ci2c_fct_ptr</a>&#160;</td>
<td class="paramname"><em>func</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const <a class="el" href="ci2c_8h.html#aa06111accc71a55517b8810727523574">I2C_RW</a>&#160;</td>
<td class="paramname"><em>rw</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Redirect slave I2C read/write function (if needed for advanced use) </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">slave</td><td>- pointer to the I2C slave structure to init </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">func</td><td>- pointer to read/write function to affect </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">rw</td><td>- 0 = write function, 1 = read function </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>nothing </dd></dl>
<div class="dynheader">
Here is the caller graph for this function:</div>
<div class="dyncontent">
<div class="center"><img src="ci2c_8h_a8d88530833d3685d52ea5486b1316427_icgraph.png" border="0" usemap="#ci2c_8h_a8d88530833d3685d52ea5486b1316427_icgraph" alt=""/></div>
<map name="ci2c_8h_a8d88530833d3685d52ea5486b1316427_icgraph" id="ci2c_8h_a8d88530833d3685d52ea5486b1316427_icgraph">
<area shape="rect" id="node2" href="ci2c__advanced_8ino.html#a4fc01d736fe50cf5b977f755b675f11d" title="setup" alt="" coords="534,31,589,57"/>
<area shape="rect" id="node3" href="ci2c_8h.html#af93c2e35e06edcea492607b628d5ae1f" title="Init an I2C slave structure for cMI2C communication. " alt="" coords="214,31,319,57"/>
<area shape="rect" id="node4" href="ci2c__advanced_8ino.html#ad357f6e59cf5ec94f3ccaa70a20e1b11" title="This procedure calls appropriate functions to get chip ID of FUJITSU devices. " alt="" coords="369,81,485,108"/>
</map>
</div>
</div>
</div>
<a id="aae536cceb33d07e71af9d459a2fc6dc8"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aae536cceb33d07e71af9d459a2fc6dc8">&#9670;&nbsp;</a></span>I2C_sndAddr()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">bool I2C_sndAddr </td>
<td>(</td>
<td class="paramtype"><a class="el" href="ci2c_8h.html#a916f30ff94044ecc9f8a177446da485a">I2C_SLAVE</a> *&#160;</td>
<td class="paramname"><em>slave</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const <a class="el" href="ci2c_8h.html#aa06111accc71a55517b8810727523574">I2C_RW</a>&#160;</td>
<td class="paramname"><em>rw</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Send I2C address. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">slave</td><td>- pointer to the I2C slave structure </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">rw</td><td>- read/write transaction </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>true if I2C chip address sent acknowledged (false otherwise) </dd></dl>
<div class="dynheader">
Here is the caller graph for this function:</div>
<div class="dyncontent">
<div class="center"><img src="ci2c_8h_aae536cceb33d07e71af9d459a2fc6dc8_icgraph.png" border="0" usemap="#ci2c_8h_aae536cceb33d07e71af9d459a2fc6dc8_icgraph" alt=""/></div>
<map name="ci2c_8h_aae536cceb33d07e71af9d459a2fc6dc8_icgraph" id="ci2c_8h_aae536cceb33d07e71af9d459a2fc6dc8_icgraph">
<area shape="rect" id="node2" href="ci2c__advanced_8ino.html#a21e16cd4ec558cb48d7df75c546027a2" title="This procedure calls appropriate functions to perform a proper send transaction on I2C bus..." alt="" coords="153,5,279,32"/>
<area shape="rect" id="node4" href="ci2c__advanced_8ino.html#a5d82c84361ed35c102edb0f5e4f677d4" title="This procedure calls appropriate functions to perform a proper receive transaction on I2C bus..." alt="" coords="154,56,278,83"/>
<area shape="rect" id="node5" href="ci2c__advanced_8ino.html#ad357f6e59cf5ec94f3ccaa70a20e1b11" title="This procedure calls appropriate functions to get chip ID of FUJITSU devices. " alt="" coords="158,107,274,133"/>
<area shape="rect" id="node6" href="ci2c_8h.html#afc15fc625892e1e50e831d7934073299" title="This inline is a wrapper to I2C_read in case of contigous operations. " alt="" coords="163,157,269,184"/>
<area shape="rect" id="node3" href="ci2c__advanced_8ino.html#a4fc01d736fe50cf5b977f755b675f11d" title="setup" alt="" coords="329,56,383,83"/>
<area shape="rect" id="node7" href="ci2c__master__read_8ino.html#afe461d27b9c48d5921c00d521181f12f" title="loop" alt="" coords="333,157,379,184"/>
</map>
</div>
</div>
</div>
<a id="aaadadbb29f315f2030223665f1988188"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aaadadbb29f315f2030223665f1988188">&#9670;&nbsp;</a></span>I2C_start()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">bool I2C_start </td>
<td>(</td>
<td class="paramtype">void&#160;</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Send start condition. </p>
<dl class="section return"><dt>Returns</dt><dd>true if start condition acknowledged (false otherwise) </dd></dl>
<div class="dynheader">
Here is the caller graph for this function:</div>
<div class="dyncontent">
<div class="center"><img src="ci2c_8h_aaadadbb29f315f2030223665f1988188_icgraph.png" border="0" usemap="#ci2c_8h_aaadadbb29f315f2030223665f1988188_icgraph" alt=""/></div>
<map name="ci2c_8h_aaadadbb29f315f2030223665f1988188_icgraph" id="ci2c_8h_aaadadbb29f315f2030223665f1988188_icgraph">
<area shape="rect" id="node2" href="ci2c__advanced_8ino.html#a21e16cd4ec558cb48d7df75c546027a2" title="This procedure calls appropriate functions to perform a proper send transaction on I2C bus..." alt="" coords="131,5,258,32"/>
<area shape="rect" id="node4" href="ci2c__advanced_8ino.html#a5d82c84361ed35c102edb0f5e4f677d4" title="This procedure calls appropriate functions to perform a proper receive transaction on I2C bus..." alt="" coords="133,56,257,83"/>
<area shape="rect" id="node5" href="ci2c__advanced_8ino.html#ad357f6e59cf5ec94f3ccaa70a20e1b11" title="This procedure calls appropriate functions to get chip ID of FUJITSU devices. " alt="" coords="137,107,253,133"/>
<area shape="rect" id="node6" href="ci2c_8h.html#afc15fc625892e1e50e831d7934073299" title="This inline is a wrapper to I2C_read in case of contigous operations. " alt="" coords="141,157,248,184"/>
<area shape="rect" id="node3" href="ci2c__advanced_8ino.html#a4fc01d736fe50cf5b977f755b675f11d" title="setup" alt="" coords="307,56,362,83"/>
<area shape="rect" id="node7" href="ci2c__master__read_8ino.html#afe461d27b9c48d5921c00d521181f12f" title="loop" alt="" coords="311,157,358,184"/>
</map>
</div>
</div>
</div>
<a id="a53eb804c24e8e86717f7aaebdab1aa53"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a53eb804c24e8e86717f7aaebdab1aa53">&#9670;&nbsp;</a></span>I2C_stop()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">bool I2C_stop </td>
<td>(</td>
<td class="paramtype">void&#160;</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Send stop condition. </p>
<dl class="section return"><dt>Returns</dt><dd>true if stop condition acknowledged (false otherwise) </dd></dl>
<div class="dynheader">
Here is the caller graph for this function:</div>
<div class="dyncontent">
<div class="center"><img src="ci2c_8h_a53eb804c24e8e86717f7aaebdab1aa53_icgraph.png" border="0" usemap="#ci2c_8h_a53eb804c24e8e86717f7aaebdab1aa53_icgraph" alt=""/></div>
<map name="ci2c_8h_a53eb804c24e8e86717f7aaebdab1aa53_icgraph" id="ci2c_8h_a53eb804c24e8e86717f7aaebdab1aa53_icgraph">
<area shape="rect" id="node2" href="ci2c__advanced_8ino.html#a21e16cd4ec558cb48d7df75c546027a2" title="This procedure calls appropriate functions to perform a proper send transaction on I2C bus..." alt="" coords="129,5,255,32"/>
<area shape="rect" id="node4" href="ci2c__advanced_8ino.html#a5d82c84361ed35c102edb0f5e4f677d4" title="This procedure calls appropriate functions to perform a proper receive transaction on I2C bus..." alt="" coords="130,56,254,83"/>
<area shape="rect" id="node5" href="ci2c__advanced_8ino.html#ad357f6e59cf5ec94f3ccaa70a20e1b11" title="This procedure calls appropriate functions to get chip ID of FUJITSU devices. " alt="" coords="134,107,250,133"/>
<area shape="rect" id="node6" href="ci2c_8h.html#afc15fc625892e1e50e831d7934073299" title="This inline is a wrapper to I2C_read in case of contigous operations. " alt="" coords="139,157,245,184"/>
<area shape="rect" id="node3" href="ci2c__advanced_8ino.html#a4fc01d736fe50cf5b977f755b675f11d" title="setup" alt="" coords="305,56,359,83"/>
<area shape="rect" id="node7" href="ci2c__master__read_8ino.html#afe461d27b9c48d5921c00d521181f12f" title="loop" alt="" coords="309,157,355,184"/>
</map>
</div>
</div>
</div>
<a id="a74e1381b536811b202d087471723fb9e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a74e1381b536811b202d087471723fb9e">&#9670;&nbsp;</a></span>I2C_uninit()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void I2C_uninit </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Disable I2c module on arduino board (releasing pull-ups, and TWI control) </p>
<dl class="section return"><dt>Returns</dt><dd>nothing </dd></dl>
<div class="dynheader">
Here is the caller graph for this function:</div>
<div class="dyncontent">
<div class="center"><img src="ci2c_8h_a74e1381b536811b202d087471723fb9e_icgraph.png" border="0" usemap="#ci2c_8h_a74e1381b536811b202d087471723fb9e_icgraph" alt=""/></div>
<map name="ci2c_8h_a74e1381b536811b202d087471723fb9e_icgraph" id="ci2c_8h_a74e1381b536811b202d087471723fb9e_icgraph">
<area shape="rect" id="node2" href="ci2c_8h.html#a41be982659cb049fcdf88a18e3e4c4e0" title="Get I2C current register address (addr may passed this way in procedures if contigous accesses) ..." alt="" coords="136,5,299,32"/>
</map>
</div>
</div>
</div>
<a id="ab20db75dfa22dc47df506cab3bd11c60"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ab20db75dfa22dc47df506cab3bd11c60">&#9670;&nbsp;</a></span>I2C_wr8()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">bool I2C_wr8 </td>
<td>(</td>
<td class="paramtype">const uint8_t&#160;</td>
<td class="paramname"><em>dat</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Send byte on bus. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">dat</td><td>- data to be sent </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>true if data sent acknowledged (false otherwise) </dd></dl>
<div class="dynheader">
Here is the caller graph for this function:</div>
<div class="dyncontent">
<div class="center"><img src="ci2c_8h_ab20db75dfa22dc47df506cab3bd11c60_icgraph.png" border="0" usemap="#ci2c_8h_ab20db75dfa22dc47df506cab3bd11c60_icgraph" alt=""/></div>
<map name="ci2c_8h_ab20db75dfa22dc47df506cab3bd11c60_icgraph" id="ci2c_8h_ab20db75dfa22dc47df506cab3bd11c60_icgraph">
<area shape="rect" id="node2" href="ci2c__advanced_8ino.html#a21e16cd4ec558cb48d7df75c546027a2" title="This procedure calls appropriate functions to perform a proper send transaction on I2C bus..." alt="" coords="126,5,253,32"/>
<area shape="rect" id="node4" href="ci2c__advanced_8ino.html#a5d82c84361ed35c102edb0f5e4f677d4" title="This procedure calls appropriate functions to perform a proper receive transaction on I2C bus..." alt="" coords="127,56,251,83"/>
<area shape="rect" id="node5" href="ci2c__advanced_8ino.html#ad357f6e59cf5ec94f3ccaa70a20e1b11" title="This procedure calls appropriate functions to get chip ID of FUJITSU devices. " alt="" coords="131,107,247,133"/>
<area shape="rect" id="node6" href="ci2c_8h.html#afc15fc625892e1e50e831d7934073299" title="This inline is a wrapper to I2C_read in case of contigous operations. " alt="" coords="136,157,243,184"/>
<area shape="rect" id="node3" href="ci2c__advanced_8ino.html#a4fc01d736fe50cf5b977f755b675f11d" title="setup" alt="" coords="302,56,357,83"/>
<area shape="rect" id="node7" href="ci2c__master__read_8ino.html#afe461d27b9c48d5921c00d521181f12f" title="loop" alt="" coords="306,157,353,184"/>
</map>
</div>
</div>
</div>
<a id="a83adef951ffd9fb5105216f6ee464bb9"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a83adef951ffd9fb5105216f6ee464bb9">&#9670;&nbsp;</a></span>I2C_write()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="ci2c_8h.html#a489c20161e94a87325ca7e240032686b">I2C_STATUS</a> I2C_write </td>
<td>(</td>
<td class="paramtype"><a class="el" href="ci2c_8h.html#a916f30ff94044ecc9f8a177446da485a">I2C_SLAVE</a> *&#160;</td>
<td class="paramname"><em>slave</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const uint16_t&#160;</td>
<td class="paramname"><em>reg_addr</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint8_t *&#160;</td>
<td class="paramname"><em>data</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const uint16_t&#160;</td>
<td class="paramname"><em>bytes</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>This function writes the provided data to the address specified. </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>I2C_STATUS status of write attempt </dd></dl>
<div class="dynheader">
Here is the caller graph for this function:</div>
<div class="dyncontent">
<div class="center"><img src="ci2c_8h_a83adef951ffd9fb5105216f6ee464bb9_icgraph.png" border="0" usemap="#ci2c_8h_a83adef951ffd9fb5105216f6ee464bb9_icgraph" alt=""/></div>
<map name="ci2c_8h_a83adef951ffd9fb5105216f6ee464bb9_icgraph" id="ci2c_8h_a83adef951ffd9fb5105216f6ee464bb9_icgraph">
<area shape="rect" id="node2" href="ci2c__master__write_8ino.html#afe461d27b9c48d5921c00d521181f12f" title="loop" alt="" coords="191,5,238,32"/>
<area shape="rect" id="node3" href="ci2c_8h.html#a41be982659cb049fcdf88a18e3e4c4e0" title="Get I2C current register address (addr may passed this way in procedures if contigous accesses) ..." alt="" coords="133,56,296,83"/>
<area shape="rect" id="node4" href="ci2c_8h.html#add4eec772922da692bdbb84c354a3fa0" title="This inline is a wrapper to I2C_write in case of contigous operations. " alt="" coords="159,107,270,133"/>
</map>
</div>
</div>
</div>
<a id="add4eec772922da692bdbb84c354a3fa0"></a>
<h2 class="memtitle"><span class="permalink"><a href="#add4eec772922da692bdbb84c354a3fa0">&#9670;&nbsp;</a></span>I2C_write_next()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="ci2c_8h.html#a489c20161e94a87325ca7e240032686b">I2C_STATUS</a> I2C_write_next </td>
<td>(</td>
<td class="paramtype"><a class="el" href="ci2c_8h.html#a916f30ff94044ecc9f8a177446da485a">I2C_SLAVE</a> *&#160;</td>
<td class="paramname"><em>slave</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint8_t *&#160;</td>
<td class="paramname"><em>data</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const uint16_t&#160;</td>
<td class="paramname"><em>bytes</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>This inline is a wrapper to I2C_write in case of contigous operations. </p>
<dl class="attribute"><dt><b><a class="el" href="attribute.html#_attribute000012">GCC Attributes:</a></b></dt><dd>inline </dd></dl>
<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">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>I2C_STATUS status 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_8h_add4eec772922da692bdbb84c354a3fa0_cgraph.png" border="0" usemap="#ci2c_8h_add4eec772922da692bdbb84c354a3fa0_cgraph" alt=""/></div>
<map name="ci2c_8h_add4eec772922da692bdbb84c354a3fa0_cgraph" id="ci2c_8h_add4eec772922da692bdbb84c354a3fa0_cgraph">
<area shape="rect" id="node2" href="ci2c_8h.html#a83adef951ffd9fb5105216f6ee464bb9" title="This function writes the provided data to the address specified. " alt="" coords="166,5,245,32"/>
<area shape="rect" id="node3" href="ci2c_8h.html#ad5e4a006f6cea5844a810fab30b40f87" title="This function reads data from the address specified and stores this data in the area provided by the ..." alt="" coords="168,56,243,83"/>
</map>
</div>
</div>
</div>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.13
</small></address>
</body>
</html>