mirror of
https://github.com/SMFSW/cI2C
synced 2024-11-01 00:28:43 +01:00
5be682b96f
Commit: b079e7997d
1413 lines
76 KiB
HTML
1413 lines
76 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="doxygen.css" rel="stylesheet" type="text/css" />
|
|
</head>
|
|
<body>
|
|
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
|
<div id="titlearea">
|
|
<table cellspacing="0" cellpadding="0">
|
|
<tbody>
|
|
<tr style="height: 56px;">
|
|
<td id="projectalign" style="padding-left: 0.5em;">
|
|
<div id="projectname">Arduino Hardware I2C for AVR MCUs (plain c)
|
|
 <span id="projectnumber">1.3</span>
|
|
</div>
|
|
<div id="projectbrief">Arduino Hardware I2C for AVR MCUs (plain c) documentation</div>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<!-- end header part -->
|
|
<!-- Generated by Doxygen 1.8.13 -->
|
|
<script type="text/javascript" src="menudata.js"></script>
|
|
<script type="text/javascript" src="menu.js"></script>
|
|
<script type="text/javascript">
|
|
$(function() {
|
|
initMenu('',false,false,'search.php','Search');
|
|
});
|
|
</script>
|
|
<div id="main-nav"></div>
|
|
<div id="nav-path" class="navpath">
|
|
<ul>
|
|
<li class="navelem"><a class="el" href="dir_68267d1309a1af8e8297ef4c3efbcdba.html">src</a></li> </ul>
|
|
</div>
|
|
</div><!-- top -->
|
|
<div class="header">
|
|
<div class="summary">
|
|
<a href="#nested-classes">Data Structures</a> |
|
|
<a href="#define-members">Macros</a> |
|
|
<a href="#typedef-members">Typedefs</a> |
|
|
<a href="#enum-members">Enumerations</a> |
|
|
<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 <Arduino.h></code><br />
|
|
<code>#include <inttypes.h></code><br />
|
|
<code>#include <stdbool.h></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 0 -->
|
|
</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 1 -->
|
|
</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  </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"> </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"> </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 </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"> </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"> </td></tr>
|
|
<tr class="memitem:a5f24fbfb40599863dc8233731f781c4f"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="ci2c_8h.html#a5f24fbfb40599863dc8233731f781c4f">DEF_CI2C_NB_RETRIES</a>   3</td></tr>
|
|
<tr class="memdesc:a5f24fbfb40599863dc8233731f781c4f"><td class="mdescLeft"> </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"> </td></tr>
|
|
<tr class="memitem:a1289567006bc93ef027a578d840c1e0d"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="ci2c_8h.html#a1289567006bc93ef027a578d840c1e0d">DEF_CI2C_TIMEOUT</a>   100</td></tr>
|
|
<tr class="memdesc:a1289567006bc93ef027a578d840c1e0d"><td class="mdescLeft"> </td><td class="mdescRight">Default cI2C timeout. <a href="#a1289567006bc93ef027a578d840c1e0d">More...</a><br /></td></tr>
|
|
<tr class="separator:a1289567006bc93ef027a578d840c1e0d"><td class="memSeparator" colspan="2"> </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> </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"> </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> </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"> </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> </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"> </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> </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"> </td></tr>
|
|
<tr class="memitem:af9c7e60b84174c9a42c0883f4c4a9b97"><td class="memItemLeft" align="right" valign="top">typedef bool(* </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"> </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"> </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> </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"> </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  </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"> </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"> </td></tr>
|
|
<tr class="memitem:a6572c289eb10e3543e42d34e710f5b67"><td class="memItemLeft" align="right" valign="top">enum  </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"> </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"> </td></tr>
|
|
<tr class="memitem:a72ff1cee208396b40ebb555f1ed83743"><td class="memItemLeft" align="right" valign="top">enum  </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"> </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"> </td></tr>
|
|
<tr class="memitem:a98a8ae8df4864bb7d9a8b4509d863513"><td class="memItemLeft" align="right" valign="top">enum  </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"> </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"> </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 </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"> </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"> </td></tr>
|
|
<tr class="memitem:a8d88530833d3685d52ea5486b1316427"><td class="memItemLeft" align="right" valign="top">void </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"> </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"> </td></tr>
|
|
<tr class="memitem:ad0eed3132d3284d6f921d13488721226"><td class="memItemLeft" align="right" valign="top">bool </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"> </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"> </td></tr>
|
|
<tr class="memitem:a47d121773459b24568e5df4f81fbf905"><td class="memItemLeft" align="right" valign="top">bool </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"> </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"> </td></tr>
|
|
<tr class="memitem:a061eb7b1f0b2fe0203d7947d01437042"><td class="memItemLeft" align="right" valign="top">uint8_t </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"> </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"> </td></tr>
|
|
<tr class="memitem:acbece630e3277827b1a0351d0bdad74a"><td class="memItemLeft" align="right" valign="top">bool </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"> </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"> </td></tr>
|
|
<tr class="memitem:a41be982659cb049fcdf88a18e3e4c4e0"><td class="memItemLeft" align="right" valign="top">uint16_t </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"> </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"> </td></tr>
|
|
<tr class="memitem:a99283d800332d700deed19f5a37e61d8"><td class="memItemLeft" align="right" valign="top">void </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"> </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"> </td></tr>
|
|
<tr class="memitem:a74e1381b536811b202d087471723fb9e"><td class="memItemLeft" align="right" valign="top">void </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"> </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"> </td></tr>
|
|
<tr class="memitem:a7c5b1857ae28ade8959a8a06f500ecde"><td class="memItemLeft" align="right" valign="top">uint16_t </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"> </td><td class="mdescRight">Change I2C frequency. <a href="#a7c5b1857ae28ade8959a8a06f500ecde">More...</a><br /></td></tr>
|
|
<tr class="separator:a7c5b1857ae28ade8959a8a06f500ecde"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:acd209174a3b5ab213131a93633c19a38"><td class="memItemLeft" align="right" valign="top">uint16_t </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"> </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"> </td></tr>
|
|
<tr class="memitem:ad74e31ebd08a9ddef57f571783f37cc7"><td class="memItemLeft" align="right" valign="top">uint8_t </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"> </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"> </td></tr>
|
|
<tr class="memitem:ac370df06df51c68217eafcee96e5a3e0"><td class="memItemLeft" align="right" valign="top">bool </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"> </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"> </td></tr>
|
|
<tr class="memitem:a83adef951ffd9fb5105216f6ee464bb9"><td class="memItemLeft" align="right" valign="top"><a class="el" href="ci2c_8h.html#a489c20161e94a87325ca7e240032686b">I2C_STATUS</a> </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"> </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"> </td></tr>
|
|
<tr class="memitem:add4eec772922da692bdbb84c354a3fa0"><td class="memItemLeft" align="right" valign="top"><a class="el" href="ci2c_8h.html#a489c20161e94a87325ca7e240032686b">I2C_STATUS</a> </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"> </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"> </td></tr>
|
|
<tr class="memitem:ad5e4a006f6cea5844a810fab30b40f87"><td class="memItemLeft" align="right" valign="top"><a class="el" href="ci2c_8h.html#a489c20161e94a87325ca7e240032686b">I2C_STATUS</a> </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"> </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"> </td></tr>
|
|
<tr class="memitem:afc15fc625892e1e50e831d7934073299"><td class="memItemLeft" align="right" valign="top"><a class="el" href="ci2c_8h.html#a489c20161e94a87325ca7e240032686b">I2C_STATUS</a> </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"> </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"> </td></tr>
|
|
<tr class="memitem:a2c25bc5fdf909b7d45d722970eb04d82"><td class="memItemLeft" align="right" valign="top">void </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"> </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"> </td></tr>
|
|
<tr class="memitem:aaadadbb29f315f2030223665f1988188"><td class="memItemLeft" align="right" valign="top">bool </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"> </td><td class="mdescRight">Send start condition. <a href="#aaadadbb29f315f2030223665f1988188">More...</a><br /></td></tr>
|
|
<tr class="separator:aaadadbb29f315f2030223665f1988188"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a53eb804c24e8e86717f7aaebdab1aa53"><td class="memItemLeft" align="right" valign="top">bool </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"> </td><td class="mdescRight">Send stop condition. <a href="#a53eb804c24e8e86717f7aaebdab1aa53">More...</a><br /></td></tr>
|
|
<tr class="separator:a53eb804c24e8e86717f7aaebdab1aa53"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:ab20db75dfa22dc47df506cab3bd11c60"><td class="memItemLeft" align="right" valign="top">bool </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"> </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"> </td></tr>
|
|
<tr class="memitem:a8d6d7eb118ea1505df039075a00c267b"><td class="memItemLeft" align="right" valign="top">uint8_t </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"> </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"> </td></tr>
|
|
<tr class="memitem:aae536cceb33d07e71af9d459a2fc6dc8"><td class="memItemLeft" align="right" valign="top">bool </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"> </td><td class="mdescRight">Send I2C address. <a href="#aae536cceb33d07e71af9d459a2fc6dc8">More...</a><br /></td></tr>
|
|
<tr class="separator:aae536cceb33d07e71af9d459a2fc6dc8"><td class="memSeparator" colspan="2"> </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) </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">◆ </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"> </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">◆ </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   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">◆ </a></span>DEF_CI2C_TIMEOUT</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">#define DEF_CI2C_TIMEOUT   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">◆ </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">◆ </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">◆ </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">◆ </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">◆ </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">◆ </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">◆ </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 </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 </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 </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">◆ </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 </td><td class="fielddoc"><p>I2C rw bit (write) </p>
|
|
</td></tr>
|
|
<tr><td class="fieldname"><a id="a938af1642c47503bcefa8c8de11d7173a30040082a257338fe25e5bd5136bc9a8"></a>I2C_READ </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">◆ </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 </td><td class="fielddoc"><p>I2C Standard (100KHz) </p>
|
|
</td></tr>
|
|
<tr><td class="fieldname"><a id="a6572c289eb10e3543e42d34e710f5b67ad87a75087baf689cf3a240a769d2b558"></a>I2C_FM </td><td class="fielddoc"><p>I2C Fast Mode (400KHz) </p>
|
|
</td></tr>
|
|
<tr><td class="fieldname"><a id="a6572c289eb10e3543e42d34e710f5b67acab280b484ea06a499900154515f3005"></a>I2C_FMP </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 </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">◆ </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 </td><td class="fielddoc"><p>I2C OK. </p>
|
|
</td></tr>
|
|
<tr><td class="fieldname"><a id="a72ff1cee208396b40ebb555f1ed83743a49e65f3960437d80b8328e7898cc90de"></a>I2C_BUSY </td><td class="fielddoc"><p>I2C Bus busy. </p>
|
|
</td></tr>
|
|
<tr><td class="fieldname"><a id="a72ff1cee208396b40ebb555f1ed83743ae869b289c6b9b73b95dd1b40cbc9d651"></a>I2C_NACK </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">◆ </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 </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 2 -->
|
|
</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 3 -->
|
|
</div>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="ac370df06df51c68217eafcee96e5a3e0"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#ac370df06df51c68217eafcee96e5a3e0">◆ </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 </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 4 -->
|
|
</div>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="a8d6d7eb118ea1505df039075a00c267b"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#a8d6d7eb118ea1505df039075a00c267b">◆ </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 </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 5 -->
|
|
</div>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="ad5e4a006f6cea5844a810fab30b40f87"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#ad5e4a006f6cea5844a810fab30b40f87">◆ </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> * </td>
|
|
<td class="paramname"><em>slave</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">const uint16_t </td>
|
|
<td class="paramname"><em>reg_addr</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">uint8_t * </td>
|
|
<td class="paramname"><em>data</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">const uint16_t </td>
|
|
<td class="paramname"><em>bytes</em> </td>
|
|
</tr>
|
|
<tr>
|
|
<td></td>
|
|
<td>)</td>
|
|
<td></td><td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>This 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 6 -->
|
|
</div>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="afc15fc625892e1e50e831d7934073299"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#afc15fc625892e1e50e831d7934073299">◆ </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> * </td>
|
|
<td class="paramname"><em>slave</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">uint8_t * </td>
|
|
<td class="paramname"><em>data</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">const uint16_t </td>
|
|
<td class="paramname"><em>bytes</em> </td>
|
|
</tr>
|
|
<tr>
|
|
<td></td>
|
|
<td>)</td>
|
|
<td></td><td></td>
|
|
</tr>
|
|
</table>
|
|
</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 7 -->
|
|
</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 8 -->
|
|
</div>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="a2c25bc5fdf909b7d45d722970eb04d82"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#a2c25bc5fdf909b7d45d722970eb04d82">◆ </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 </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 9 -->
|
|
</div>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="ad74e31ebd08a9ddef57f571783f37cc7"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#ad74e31ebd08a9ddef57f571783f37cc7">◆ </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 </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 10 -->
|
|
</div>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="a7c5b1857ae28ade8959a8a06f500ecde"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#a7c5b1857ae28ade8959a8a06f500ecde">◆ </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 </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 11 -->
|
|
</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 12 -->
|
|
</div>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="acd209174a3b5ab213131a93633c19a38"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#acd209174a3b5ab213131a93633c19a38">◆ </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 </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 13 -->
|
|
</div>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="a061eb7b1f0b2fe0203d7947d01437042"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#a061eb7b1f0b2fe0203d7947d01437042">◆ </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> * </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">◆ </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> * </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 14 -->
|
|
</div>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="acbece630e3277827b1a0351d0bdad74a"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#acbece630e3277827b1a0351d0bdad74a">◆ </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> * </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">◆ </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> * </td>
|
|
<td class="paramname"><em>slave</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">const uint8_t </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> </td>
|
|
<td class="paramname"><em>reg_sz</em> </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 15 -->
|
|
</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 16 -->
|
|
</div>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="ad0eed3132d3284d6f921d13488721226"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#ad0eed3132d3284d6f921d13488721226">◆ </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> * </td>
|
|
<td class="paramname"><em>slave</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">const uint8_t </td>
|
|
<td class="paramname"><em>sl_addr</em> </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 >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 17 -->
|
|
</div>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="a47d121773459b24568e5df4f81fbf905"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#a47d121773459b24568e5df4f81fbf905">◆ </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> * </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> </td>
|
|
<td class="paramname"><em>reg_sz</em> </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 18 -->
|
|
</div>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="a8d88530833d3685d52ea5486b1316427"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#a8d88530833d3685d52ea5486b1316427">◆ </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> * </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> </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> </td>
|
|
<td class="paramname"><em>rw</em> </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 19 -->
|
|
</div>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="aae536cceb33d07e71af9d459a2fc6dc8"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#aae536cceb33d07e71af9d459a2fc6dc8">◆ </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> * </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> </td>
|
|
<td class="paramname"><em>rw</em> </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 20 -->
|
|
</div>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="aaadadbb29f315f2030223665f1988188"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#aaadadbb29f315f2030223665f1988188">◆ </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 </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 21 -->
|
|
</div>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="a53eb804c24e8e86717f7aaebdab1aa53"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#a53eb804c24e8e86717f7aaebdab1aa53">◆ </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 </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 22 -->
|
|
</div>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="a74e1381b536811b202d087471723fb9e"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#a74e1381b536811b202d087471723fb9e">◆ </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 23 -->
|
|
</div>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="ab20db75dfa22dc47df506cab3bd11c60"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#ab20db75dfa22dc47df506cab3bd11c60">◆ </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 </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 24 -->
|
|
</div>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="a83adef951ffd9fb5105216f6ee464bb9"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#a83adef951ffd9fb5105216f6ee464bb9">◆ </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> * </td>
|
|
<td class="paramname"><em>slave</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">const uint16_t </td>
|
|
<td class="paramname"><em>reg_addr</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">uint8_t * </td>
|
|
<td class="paramname"><em>data</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">const uint16_t </td>
|
|
<td class="paramname"><em>bytes</em> </td>
|
|
</tr>
|
|
<tr>
|
|
<td></td>
|
|
<td>)</td>
|
|
<td></td><td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>This 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 25 -->
|
|
</div>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="add4eec772922da692bdbb84c354a3fa0"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#add4eec772922da692bdbb84c354a3fa0">◆ </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> * </td>
|
|
<td class="paramname"><em>slave</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">uint8_t * </td>
|
|
<td class="paramname"><em>data</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">const uint16_t </td>
|
|
<td class="paramname"><em>bytes</em> </td>
|
|
</tr>
|
|
<tr>
|
|
<td></td>
|
|
<td>)</td>
|
|
<td></td><td></td>
|
|
</tr>
|
|
</table>
|
|
</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 26 -->
|
|
</div>
|
|
|
|
</div>
|
|
</div>
|
|
</div><!-- contents -->
|
|
<!-- start footer part -->
|
|
<hr class="footer"/><address class="footer"><small>
|
|
Generated by  <a href="http://www.doxygen.org/index.html">
|
|
<img class="footer" src="doxygen.png" alt="doxygen"/>
|
|
</a> 1.8.13
|
|
</small></address>
|
|
</body>
|
|
</html>
|