📄 i2c_8h.html
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"><title>BlueLab: i2c.h File Reference</title><link href="doxygen.css" rel="stylesheet" type="text/css"></head><body><!-- Generated by Doxygen 1.3.8 --><div class="qindex"><a class="qindex" href="index.html">Main Page</a> | <a class="qindex" href="annotated.html">Data Structures</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="functions.html">Data Fields</a> | <a class="qindex" href="globals.html">Globals</a></div><h1>i2c.h File Reference</h1>Access to the i2c bus. <a href="#_details">More...</a><p><h2>Functions</h2><ul><li><a class="el" href="csrtypes_8h.html#a4">uint16</a> <a class="el" href="i2c_8h.html#a0">I2cTransfer</a> (<a class="el" href="csrtypes_8h.html#a4">uint16</a> address, const <a class="el" href="csrtypes_8h.html#a8">uint8</a> *tx, <a class="el" href="csrtypes_8h.html#a4">uint16</a> tx_len, <a class="el" href="csrtypes_8h.html#a8">uint8</a> *rx, <a class="el" href="csrtypes_8h.html#a4">uint16</a> rx_len)<dl class="el"><dd class="mdescRight">Allows transfer of data across the i2c interface. <a href="#a0"></a><br></dl></ul><hr><a name="_details"></a><h2>Detailed Description</h2>Access to the i2c bus. <p>BlueCore can use PIO[8:6] to provide a master i2c interface.<hr><h2>Function Documentation</h2><a class="anchor" name="a0" doxytag="i2c.h::I2cTransfer" ></a><p><table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> <tr> <td class="mdRow"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"> <a class="el" href="csrtypes_8h.html#a4">uint16</a> I2cTransfer </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top"><a class="el" href="csrtypes_8h.html#a4">uint16</a> </td> <td class="mdname" nowrap> <em>address</em>, </td> </tr> <tr> <td class="md" nowrap align="right"></td> <td></td> <td class="md" nowrap>const <a class="el" href="csrtypes_8h.html#a8">uint8</a> * </td> <td class="mdname" nowrap> <em>tx</em>, </td> </tr> <tr> <td class="md" nowrap align="right"></td> <td></td> <td class="md" nowrap><a class="el" href="csrtypes_8h.html#a4">uint16</a> </td> <td class="mdname" nowrap> <em>tx_len</em>, </td> </tr> <tr> <td class="md" nowrap align="right"></td> <td></td> <td class="md" nowrap><a class="el" href="csrtypes_8h.html#a8">uint8</a> * </td> <td class="mdname" nowrap> <em>rx</em>, </td> </tr> <tr> <td class="md" nowrap align="right"></td> <td></td> <td class="md" nowrap><a class="el" href="csrtypes_8h.html#a4">uint16</a> </td> <td class="mdname" nowrap> <em>rx_len</em></td> </tr> <tr> <td></td> <td class="md">) </td> <td class="md" colspan="2"></td> </tr> </table> </td> </tr></table><table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td><p>Allows transfer of data across the i2c interface. <p><dl compact><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td></td><td valign=top><em>address</em> </td><td>The device address of the slave for this transfer. </td></tr> <tr><td></td><td valign=top><em>tx</em> </td><td>A pointer to the data we wish to transmit. </td></tr> <tr><td></td><td valign=top><em>tx_len</em> </td><td>The length of the data we wish to transmit. </td></tr> <tr><td></td><td valign=top><em>rx</em> </td><td>A pointer to the memory we wish to read received data into. </td></tr> <tr><td></td><td valign=top><em>rx_len</em> </td><td>The length of the data we wish to receive.</td></tr> </table></dl>Returns the number of bytes acknowledged including the address bytes and the final data byte (which isn't strictly acknowledged.) </td> </tr></table></body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -