1
0
mirror of https://github.com/SMFSW/cI2C synced 2024-11-22 01:44:21 +01:00
cI2C/html/ci2c_8c.html
2018-05-27 14:03:03 +00:00

1338 lines
75 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.c 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="#define-members">Macros</a> &#124;
<a href="#func-members">Functions</a> </div>
<div class="headertitle">
<div class="title">ci2c.c File Reference</div> </div>
</div><!--header-->
<div class="contents">
<p>arduino master <a class="el" href="structi2c.html" title="static ci2c bus config and control parameters ">i2c</a> in plain c code
<a href="#details">More...</a></p>
<div class="textblock"><code>#include &quot;<a class="el" href="ci2c_8h_source.html">ci2c.h</a>&quot;</code><br />
</div><div class="textblock"><div class="dynheader">
Include dependency graph for ci2c.c:</div>
<div class="dyncontent">
<div class="center"><img src="ci2c_8c__incl.png" border="0" usemap="#src_2ci2c_8c" alt=""/></div>
<map name="src_2ci2c_8c" id="src_2ci2c_8c">
<area shape="rect" id="node2" href="ci2c_8h.html" title="arduino i2c in plain c declarations " alt="" coords="118,80,175,107"/>
</map>
</div>
</div><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="define-members"></a>
Macros</h2></td></tr>
<tr class="memitem:a3018c7600b7bb9866400596a56a57af7"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="ci2c_8c.html#a3018c7600b7bb9866400596a56a57af7">START</a>&#160;&#160;&#160;0x08</td></tr>
<tr class="separator:a3018c7600b7bb9866400596a56a57af7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6810b6c82aba3a84c55e1d5c1c8df339"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="ci2c_8c.html#a6810b6c82aba3a84c55e1d5c1c8df339">REPEATED_START</a>&#160;&#160;&#160;0x10</td></tr>
<tr class="separator:a6810b6c82aba3a84c55e1d5c1c8df339"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab121ce1b01991e03fc303b5bfa00d4bb"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="ci2c_8c.html#ab121ce1b01991e03fc303b5bfa00d4bb">MT_SLA_ACK</a>&#160;&#160;&#160;0x18</td></tr>
<tr class="separator:ab121ce1b01991e03fc303b5bfa00d4bb"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5771368c5b9fee32eb6326e68179a8b2"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="ci2c_8c.html#a5771368c5b9fee32eb6326e68179a8b2">MT_SLA_NACK</a>&#160;&#160;&#160;0x20</td></tr>
<tr class="separator:a5771368c5b9fee32eb6326e68179a8b2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac89a837ee845c12ecd5fed1c59880135"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="ci2c_8c.html#ac89a837ee845c12ecd5fed1c59880135">MT_DATA_ACK</a>&#160;&#160;&#160;0x28</td></tr>
<tr class="separator:ac89a837ee845c12ecd5fed1c59880135"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:acd5f18fcc00de2b96e182394e615af39"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="ci2c_8c.html#acd5f18fcc00de2b96e182394e615af39">MT_DATA_NACK</a>&#160;&#160;&#160;0x30</td></tr>
<tr class="separator:acd5f18fcc00de2b96e182394e615af39"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0387aa647630944a82081197d34983d4"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="ci2c_8c.html#a0387aa647630944a82081197d34983d4">MR_SLA_ACK</a>&#160;&#160;&#160;0x40</td></tr>
<tr class="separator:a0387aa647630944a82081197d34983d4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab9a16d1ba7eca835d25c48a65d0d7cba"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="ci2c_8c.html#ab9a16d1ba7eca835d25c48a65d0d7cba">MR_SLA_NACK</a>&#160;&#160;&#160;0x48</td></tr>
<tr class="separator:ab9a16d1ba7eca835d25c48a65d0d7cba"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aae12087f095e0223a4c630f54babf7b0"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="ci2c_8c.html#aae12087f095e0223a4c630f54babf7b0">MR_DATA_ACK</a>&#160;&#160;&#160;0x50</td></tr>
<tr class="separator:aae12087f095e0223a4c630f54babf7b0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a60e46234d42871678c854e60a16ccefe"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="ci2c_8c.html#a60e46234d42871678c854e60a16ccefe">MR_DATA_NACK</a>&#160;&#160;&#160;0x58</td></tr>
<tr class="separator:a60e46234d42871678c854e60a16ccefe"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aef701044e71efd86b5d74e6d7d6eed8a"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="ci2c_8c.html#aef701044e71efd86b5d74e6d7d6eed8a">LOST_ARBTRTN</a>&#160;&#160;&#160;0x38</td></tr>
<tr class="separator:aef701044e71efd86b5d74e6d7d6eed8a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:afc735dc116b40c85092452b78b35c100"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="ci2c_8c.html#afc735dc116b40c85092452b78b35c100">TWI_STATUS</a>&#160;&#160;&#160;(TWSR &amp; 0xF8)</td></tr>
<tr class="separator:afc735dc116b40c85092452b78b35c100"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad2162468cb363b77f265750ade16b4ad"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="ci2c_8c.html#ad2162468cb363b77f265750ade16b4ad">setRegBit</a>(r, b)&#160;&#160;&#160;r |= (1 &lt;&lt; b)</td></tr>
<tr class="memdesc:ad2162468cb363b77f265750ade16b4ad"><td class="mdescLeft">&#160;</td><td class="mdescRight">set bit <b>b</b> in register <b>r</b> <a href="#ad2162468cb363b77f265750ade16b4ad">More...</a><br /></td></tr>
<tr class="separator:ad2162468cb363b77f265750ade16b4ad"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aecff6f8bac2c67d2f653ec6131d7cb59"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="ci2c_8c.html#aecff6f8bac2c67d2f653ec6131d7cb59">clrRegBit</a>(r, b)&#160;&#160;&#160;r &amp;= (uint8_t) (~(1 &lt;&lt; b))</td></tr>
<tr class="memdesc:aecff6f8bac2c67d2f653ec6131d7cb59"><td class="mdescLeft">&#160;</td><td class="mdescRight">clear bit <b>b</b> in register <b>r</b> <a href="#aecff6f8bac2c67d2f653ec6131d7cb59">More...</a><br /></td></tr>
<tr class="separator:aecff6f8bac2c67d2f653ec6131d7cb59"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a774ca534732d7aa19d7b5b842beacdbf"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="ci2c_8c.html#a774ca534732d7aa19d7b5b842beacdbf">invRegBit</a>(r, b)&#160;&#160;&#160;r ^= (1 &lt;&lt; b)</td></tr>
<tr class="memdesc:a774ca534732d7aa19d7b5b842beacdbf"><td class="mdescLeft">&#160;</td><td class="mdescRight">invert bit <b>b</b> in register <b>r</b> <a href="#a774ca534732d7aa19d7b5b842beacdbf">More...</a><br /></td></tr>
<tr class="separator:a774ca534732d7aa19d7b5b842beacdbf"><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_8c.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_8c.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_8c.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_8c.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:a99283d800332d700deed19f5a37e61d8"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="ci2c_8c.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_8c.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:a2c25bc5fdf909b7d45d722970eb04d82"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="ci2c_8c.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:a7c5b1857ae28ade8959a8a06f500ecde"><td class="memItemLeft" align="right" valign="top">uint16_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="ci2c_8c.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_8c.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_8c.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_8c.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_8c.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: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_8c.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:aaadadbb29f315f2030223665f1988188"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="ci2c_8c.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_8c.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_8c.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_8c.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_8c.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 master <a class="el" href="structi2c.html" title="static ci2c bus config and control parameters ">i2c</a> in plain c code </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="aecff6f8bac2c67d2f653ec6131d7cb59"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aecff6f8bac2c67d2f653ec6131d7cb59">&#9670;&nbsp;</a></span>clrRegBit</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define clrRegBit</td>
<td>(</td>
<td class="paramtype">&#160;</td>
<td class="paramname">r, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">&#160;</td>
<td class="paramname">b&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td>&#160;&#160;&#160;r &amp;= (uint8_t) (~(1 &lt;&lt; b))</td>
</tr>
</table>
</div><div class="memdoc">
<p>clear bit <b>b</b> in register <b>r</b> </p>
</div>
</div>
<a id="a774ca534732d7aa19d7b5b842beacdbf"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a774ca534732d7aa19d7b5b842beacdbf">&#9670;&nbsp;</a></span>invRegBit</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define invRegBit</td>
<td>(</td>
<td class="paramtype">&#160;</td>
<td class="paramname">r, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">&#160;</td>
<td class="paramname">b&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td>&#160;&#160;&#160;r ^= (1 &lt;&lt; b)</td>
</tr>
</table>
</div><div class="memdoc">
<p>invert bit <b>b</b> in register <b>r</b> </p>
</div>
</div>
<a id="aef701044e71efd86b5d74e6d7d6eed8a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aef701044e71efd86b5d74e6d7d6eed8a">&#9670;&nbsp;</a></span>LOST_ARBTRTN</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define LOST_ARBTRTN&#160;&#160;&#160;0x38</td>
</tr>
</table>
</div><div class="memdoc">
</div>
</div>
<a id="aae12087f095e0223a4c630f54babf7b0"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aae12087f095e0223a4c630f54babf7b0">&#9670;&nbsp;</a></span>MR_DATA_ACK</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define MR_DATA_ACK&#160;&#160;&#160;0x50</td>
</tr>
</table>
</div><div class="memdoc">
</div>
</div>
<a id="a60e46234d42871678c854e60a16ccefe"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a60e46234d42871678c854e60a16ccefe">&#9670;&nbsp;</a></span>MR_DATA_NACK</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define MR_DATA_NACK&#160;&#160;&#160;0x58</td>
</tr>
</table>
</div><div class="memdoc">
</div>
</div>
<a id="a0387aa647630944a82081197d34983d4"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a0387aa647630944a82081197d34983d4">&#9670;&nbsp;</a></span>MR_SLA_ACK</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define MR_SLA_ACK&#160;&#160;&#160;0x40</td>
</tr>
</table>
</div><div class="memdoc">
</div>
</div>
<a id="ab9a16d1ba7eca835d25c48a65d0d7cba"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ab9a16d1ba7eca835d25c48a65d0d7cba">&#9670;&nbsp;</a></span>MR_SLA_NACK</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define MR_SLA_NACK&#160;&#160;&#160;0x48</td>
</tr>
</table>
</div><div class="memdoc">
</div>
</div>
<a id="ac89a837ee845c12ecd5fed1c59880135"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ac89a837ee845c12ecd5fed1c59880135">&#9670;&nbsp;</a></span>MT_DATA_ACK</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define MT_DATA_ACK&#160;&#160;&#160;0x28</td>
</tr>
</table>
</div><div class="memdoc">
</div>
</div>
<a id="acd5f18fcc00de2b96e182394e615af39"></a>
<h2 class="memtitle"><span class="permalink"><a href="#acd5f18fcc00de2b96e182394e615af39">&#9670;&nbsp;</a></span>MT_DATA_NACK</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define MT_DATA_NACK&#160;&#160;&#160;0x30</td>
</tr>
</table>
</div><div class="memdoc">
</div>
</div>
<a id="ab121ce1b01991e03fc303b5bfa00d4bb"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ab121ce1b01991e03fc303b5bfa00d4bb">&#9670;&nbsp;</a></span>MT_SLA_ACK</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define MT_SLA_ACK&#160;&#160;&#160;0x18</td>
</tr>
</table>
</div><div class="memdoc">
</div>
</div>
<a id="a5771368c5b9fee32eb6326e68179a8b2"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a5771368c5b9fee32eb6326e68179a8b2">&#9670;&nbsp;</a></span>MT_SLA_NACK</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define MT_SLA_NACK&#160;&#160;&#160;0x20</td>
</tr>
</table>
</div><div class="memdoc">
</div>
</div>
<a id="a6810b6c82aba3a84c55e1d5c1c8df339"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a6810b6c82aba3a84c55e1d5c1c8df339">&#9670;&nbsp;</a></span>REPEATED_START</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define REPEATED_START&#160;&#160;&#160;0x10</td>
</tr>
</table>
</div><div class="memdoc">
</div>
</div>
<a id="ad2162468cb363b77f265750ade16b4ad"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ad2162468cb363b77f265750ade16b4ad">&#9670;&nbsp;</a></span>setRegBit</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define setRegBit</td>
<td>(</td>
<td class="paramtype">&#160;</td>
<td class="paramname">r, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">&#160;</td>
<td class="paramname">b&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td>&#160;&#160;&#160;r |= (1 &lt;&lt; b)</td>
</tr>
</table>
</div><div class="memdoc">
<p>set bit <b>b</b> in register <b>r</b> </p>
</div>
</div>
<a id="a3018c7600b7bb9866400596a56a57af7"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a3018c7600b7bb9866400596a56a57af7">&#9670;&nbsp;</a></span>START</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define START&#160;&#160;&#160;0x08</td>
</tr>
</table>
</div><div class="memdoc">
</div>
</div>
<a id="afc735dc116b40c85092452b78b35c100"></a>
<h2 class="memtitle"><span class="permalink"><a href="#afc735dc116b40c85092452b78b35c100">&#9670;&nbsp;</a></span>TWI_STATUS</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define TWI_STATUS&#160;&#160;&#160;(TWSR &amp; 0xF8)</td>
</tr>
</table>
</div><div class="memdoc">
</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_8c_a99283d800332d700deed19f5a37e61d8_cgraph.png" border="0" usemap="#ci2c_8c_a99283d800332d700deed19f5a37e61d8_cgraph" alt=""/></div>
<map name="ci2c_8c_a99283d800332d700deed19f5a37e61d8_cgraph" id="ci2c_8c_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_8c_a99283d800332d700deed19f5a37e61d8_icgraph.png" border="0" usemap="#ci2c_8c_a99283d800332d700deed19f5a37e61d8_icgraph" alt=""/></div>
<map name="ci2c_8c_a99283d800332d700deed19f5a37e61d8_icgraph" id="ci2c_8c_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_8c_ac370df06df51c68217eafcee96e5a3e0_icgraph.png" border="0" usemap="#ci2c_8c_ac370df06df51c68217eafcee96e5a3e0_icgraph" alt=""/></div>
<map name="ci2c_8c_ac370df06df51c68217eafcee96e5a3e0_icgraph" id="ci2c_8c_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_8c_a8d6d7eb118ea1505df039075a00c267b_icgraph.png" border="0" usemap="#ci2c_8c_a8d6d7eb118ea1505df039075a00c267b_icgraph" alt=""/></div>
<map name="ci2c_8c_a8d6d7eb118ea1505df039075a00c267b_icgraph" id="ci2c_8c_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_8c_ad5e4a006f6cea5844a810fab30b40f87_icgraph.png" border="0" usemap="#ci2c_8c_ad5e4a006f6cea5844a810fab30b40f87_icgraph" alt=""/></div>
<map name="ci2c_8c_ad5e4a006f6cea5844a810fab30b40f87_icgraph" id="ci2c_8c_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="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_8c_a2c25bc5fdf909b7d45d722970eb04d82_icgraph.png" border="0" usemap="#ci2c_8c_a2c25bc5fdf909b7d45d722970eb04d82_icgraph" alt=""/></div>
<map name="ci2c_8c_a2c25bc5fdf909b7d45d722970eb04d82_icgraph" id="ci2c_8c_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_8c_ad74e31ebd08a9ddef57f571783f37cc7_icgraph.png" border="0" usemap="#ci2c_8c_ad74e31ebd08a9ddef57f571783f37cc7_icgraph" alt=""/></div>
<map name="ci2c_8c_ad74e31ebd08a9ddef57f571783f37cc7_icgraph" id="ci2c_8c_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 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_8c_a7c5b1857ae28ade8959a8a06f500ecde_cgraph.png" border="0" usemap="#ci2c_8c_a7c5b1857ae28ade8959a8a06f500ecde_cgraph" alt=""/></div>
<map name="ci2c_8c_a7c5b1857ae28ade8959a8a06f500ecde_cgraph" id="ci2c_8c_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_8c_a7c5b1857ae28ade8959a8a06f500ecde_icgraph.png" border="0" usemap="#ci2c_8c_a7c5b1857ae28ade8959a8a06f500ecde_icgraph" alt=""/></div>
<map name="ci2c_8c_a7c5b1857ae28ade8959a8a06f500ecde_icgraph" id="ci2c_8c_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_8c_acd209174a3b5ab213131a93633c19a38_icgraph.png" border="0" usemap="#ci2c_8c_acd209174a3b5ab213131a93633c19a38_icgraph" alt=""/></div>
<map name="ci2c_8c_acd209174a3b5ab213131a93633c19a38_icgraph" id="ci2c_8c_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="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_8c_af93c2e35e06edcea492607b628d5ae1f_cgraph.png" border="0" usemap="#ci2c_8c_af93c2e35e06edcea492607b628d5ae1f_cgraph" alt=""/></div>
<map name="ci2c_8c_af93c2e35e06edcea492607b628d5ae1f_cgraph" id="ci2c_8c_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_8c_af93c2e35e06edcea492607b628d5ae1f_icgraph.png" border="0" usemap="#ci2c_8c_af93c2e35e06edcea492607b628d5ae1f_icgraph" alt=""/></div>
<map name="ci2c_8c_af93c2e35e06edcea492607b628d5ae1f_icgraph" id="ci2c_8c_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_8c_ad0eed3132d3284d6f921d13488721226_icgraph.png" border="0" usemap="#ci2c_8c_ad0eed3132d3284d6f921d13488721226_icgraph" alt=""/></div>
<map name="ci2c_8c_ad0eed3132d3284d6f921d13488721226_icgraph" id="ci2c_8c_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_8c_a47d121773459b24568e5df4f81fbf905_icgraph.png" border="0" usemap="#ci2c_8c_a47d121773459b24568e5df4f81fbf905_icgraph" alt=""/></div>
<map name="ci2c_8c_a47d121773459b24568e5df4f81fbf905_icgraph" id="ci2c_8c_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_8c_a8d88530833d3685d52ea5486b1316427_icgraph.png" border="0" usemap="#ci2c_8c_a8d88530833d3685d52ea5486b1316427_icgraph" alt=""/></div>
<map name="ci2c_8c_a8d88530833d3685d52ea5486b1316427_icgraph" id="ci2c_8c_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_8c_aae536cceb33d07e71af9d459a2fc6dc8_icgraph.png" border="0" usemap="#ci2c_8c_aae536cceb33d07e71af9d459a2fc6dc8_icgraph" alt=""/></div>
<map name="ci2c_8c_aae536cceb33d07e71af9d459a2fc6dc8_icgraph" id="ci2c_8c_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_8c_aaadadbb29f315f2030223665f1988188_icgraph.png" border="0" usemap="#ci2c_8c_aaadadbb29f315f2030223665f1988188_icgraph" alt=""/></div>
<map name="ci2c_8c_aaadadbb29f315f2030223665f1988188_icgraph" id="ci2c_8c_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_8c_a53eb804c24e8e86717f7aaebdab1aa53_icgraph.png" border="0" usemap="#ci2c_8c_a53eb804c24e8e86717f7aaebdab1aa53_icgraph" alt=""/></div>
<map name="ci2c_8c_a53eb804c24e8e86717f7aaebdab1aa53_icgraph" id="ci2c_8c_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_8c_a74e1381b536811b202d087471723fb9e_icgraph.png" border="0" usemap="#ci2c_8c_a74e1381b536811b202d087471723fb9e_icgraph" alt=""/></div>
<map name="ci2c_8c_a74e1381b536811b202d087471723fb9e_icgraph" id="ci2c_8c_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_8c_ab20db75dfa22dc47df506cab3bd11c60_icgraph.png" border="0" usemap="#ci2c_8c_ab20db75dfa22dc47df506cab3bd11c60_icgraph" alt=""/></div>
<map name="ci2c_8c_ab20db75dfa22dc47df506cab3bd11c60_icgraph" id="ci2c_8c_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_8c_a83adef951ffd9fb5105216f6ee464bb9_icgraph.png" border="0" usemap="#ci2c_8c_a83adef951ffd9fb5105216f6ee464bb9_icgraph" alt=""/></div>
<map name="ci2c_8c_a83adef951ffd9fb5105216f6ee464bb9_icgraph" id="ci2c_8c_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>
<h2 class="groupheader">Variable Documentation</h2>
<a id="abbe792bb2cf67584b86443440a194f46"></a>
<h2 class="memtitle"><span class="permalink"><a href="#abbe792bb2cf67584b86443440a194f46">&#9670;&nbsp;</a></span>busy</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">bool busy</td>
</tr>
</table>
</div><div class="memdoc">
<p>true if already busy (in case of interrupts implementation) </p>
</div>
</div>
<a id="a2de58c0b9a826052097f9623f4d95608"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a2de58c0b9a826052097f9623f4d95608">&#9670;&nbsp;</a></span>cfg</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">struct { ... } <a class="el" href="structcfg.html">cfg</a></td>
</tr>
</table>
</div><div class="memdoc">
</div>
</div>
<a id="a458ee314eb40ab7e0c913a036333cc0d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a458ee314eb40ab7e0c913a036333cc0d">&#9670;&nbsp;</a></span>retries</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">uint8_t retries</td>
</tr>
</table>
</div><div class="memdoc">
<p><a class="el" href="structi2c.html" title="static ci2c bus config and control parameters ">i2c</a> message retries when fail </p>
</div>
</div>
<a id="a182293bc8273b099986183c0959e77da"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a182293bc8273b099986183c0959e77da">&#9670;&nbsp;</a></span>speed</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="ci2c_8h.html#a19bff3ea64e8558c14de3fc951ba6bad">I2C_SPEED</a> speed</td>
</tr>
</table>
</div><div class="memdoc">
<p><a class="el" href="structi2c.html" title="static ci2c bus config and control parameters ">i2c</a> bus speed </p>
</div>
</div>
<a id="a90894a58bc4ed2d63bef128a1a6c7ae8"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a90894a58bc4ed2d63bef128a1a6c7ae8">&#9670;&nbsp;</a></span>start_wait</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">uint16_t start_wait</td>
</tr>
</table>
</div><div class="memdoc">
<p>time start waiting for acknowledge </p>
</div>
</div>
<a id="a7f1ad43d3bf79b40bc39dbb5a6c3a5ae"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a7f1ad43d3bf79b40bc39dbb5a6c3a5ae">&#9670;&nbsp;</a></span>timeout</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">uint16_t timeout</td>
</tr>
</table>
</div><div class="memdoc">
<p><a class="el" href="structi2c.html" title="static ci2c bus config and control parameters ">i2c</a> timeout (ms) </p>
</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>