diff options
Diffstat (limited to 'group__i2c.html')
-rw-r--r-- | group__i2c.html | 404 |
1 files changed, 0 insertions, 404 deletions
diff --git a/group__i2c.html b/group__i2c.html deleted file mode 100644 index af989f8d..00000000 --- a/group__i2c.html +++ /dev/null @@ -1,404 +0,0 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://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.9.1"/> -<meta name="viewport" content="width=device-width, initial-scale=1"/> -<title>Sensor Watch: I2C Controller Driver</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">Sensor Watch -  <span id="projectnumber">0.0.0</span> - </div> - <div id="projectbrief">A board replacement for the classic Casio F-91W wristwatch, powered by a Microchip SAM L22 microcontroller.</div> - </td> - </tr> - </tbody> -</table> -</div> -<!-- end header part --> -<!-- Generated by Doxygen 1.9.1 --> -<script type="text/javascript"> -/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */ -var searchBox = new SearchBox("searchBox", "search",false,'Search','.html'); -/* @license-end */ -</script> -<script type="text/javascript" src="menudata.js"></script> -<script type="text/javascript" src="menu.js"></script> -<script type="text/javascript"> -/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */ -$(function() { - initMenu('',true,false,'search.php','Search'); - $(document).ready(function() { init_search(); }); -}); -/* @license-end */</script> -<div id="main-nav"></div> -</div><!-- top --> -<!-- 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 class="header"> - <div class="summary"> -<a href="#func-members">Functions</a> </div> - <div class="headertitle"> -<div class="title">I2C Controller Driver</div> </div> -</div><!--header--> -<div class="contents"> - -<p>This section covers functions related to the SAM L22's built-I2C driver, including configuring the I2C bus, putting values directly on the bus and reading data from registers on I2C devices. -<a href="#details">More...</a></p> -<table class="memberdecls"> -<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a> -Functions</h2></td></tr> -<tr class="memitem:gab9f25517d9dc3c32a707266dfd413e5b"><td class="memItemLeft" align="right" valign="top"><a id="gab9f25517d9dc3c32a707266dfd413e5b"></a> -void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__i2c.html#gab9f25517d9dc3c32a707266dfd413e5b">watch_enable_i2c</a> (void)</td></tr> -<tr class="memdesc:gab9f25517d9dc3c32a707266dfd413e5b"><td class="mdescLeft"> </td><td class="mdescRight">Enables the I2C peripheral. Call this before attempting to interface with I2C devices. <br /></td></tr> -<tr class="separator:gab9f25517d9dc3c32a707266dfd413e5b"><td class="memSeparator" colspan="2"> </td></tr> -<tr class="memitem:ga2189bdff3dcb40f451d0aa988ea99760"><td class="memItemLeft" align="right" valign="top"><a id="ga2189bdff3dcb40f451d0aa988ea99760"></a> -void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__i2c.html#ga2189bdff3dcb40f451d0aa988ea99760">watch_disable_i2c</a> (void)</td></tr> -<tr class="memdesc:ga2189bdff3dcb40f451d0aa988ea99760"><td class="mdescLeft"> </td><td class="mdescRight">Disables the I2C peripheral. <br /></td></tr> -<tr class="separator:ga2189bdff3dcb40f451d0aa988ea99760"><td class="memSeparator" colspan="2"> </td></tr> -<tr class="memitem:ga8b44030f78c30dd4026b349fc0c8cf08"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__i2c.html#ga8b44030f78c30dd4026b349fc0c8cf08">watch_i2c_send</a> (int16_t addr, uint8_t *buf, uint16_t length)</td></tr> -<tr class="memdesc:ga8b44030f78c30dd4026b349fc0c8cf08"><td class="mdescLeft"> </td><td class="mdescRight">Sends a series of values to a device on the I2C bus. <a href="group__i2c.html#ga8b44030f78c30dd4026b349fc0c8cf08">More...</a><br /></td></tr> -<tr class="separator:ga8b44030f78c30dd4026b349fc0c8cf08"><td class="memSeparator" colspan="2"> </td></tr> -<tr class="memitem:ga426971387b87286c8decca7342c06b4b"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__i2c.html#ga426971387b87286c8decca7342c06b4b">watch_i2c_receive</a> (int16_t addr, uint8_t *buf, uint16_t length)</td></tr> -<tr class="memdesc:ga426971387b87286c8decca7342c06b4b"><td class="mdescLeft"> </td><td class="mdescRight">Receives a series of values from a device on the I2C bus. <a href="group__i2c.html#ga426971387b87286c8decca7342c06b4b">More...</a><br /></td></tr> -<tr class="separator:ga426971387b87286c8decca7342c06b4b"><td class="memSeparator" colspan="2"> </td></tr> -<tr class="memitem:gaf0a4c78215cbd85ab557fc6c786eb6ad"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__i2c.html#gaf0a4c78215cbd85ab557fc6c786eb6ad">watch_i2c_write8</a> (int16_t addr, uint8_t reg, uint8_t data)</td></tr> -<tr class="memdesc:gaf0a4c78215cbd85ab557fc6c786eb6ad"><td class="mdescLeft"> </td><td class="mdescRight">Writes a byte to a register in an I2C device. <a href="group__i2c.html#gaf0a4c78215cbd85ab557fc6c786eb6ad">More...</a><br /></td></tr> -<tr class="separator:gaf0a4c78215cbd85ab557fc6c786eb6ad"><td class="memSeparator" colspan="2"> </td></tr> -<tr class="memitem:gac5644140ddda98198f9d5deabbeaf781"><td class="memItemLeft" align="right" valign="top">uint8_t </td><td class="memItemRight" valign="bottom"><a class="el" href="group__i2c.html#gac5644140ddda98198f9d5deabbeaf781">watch_i2c_read8</a> (int16_t addr, uint8_t reg)</td></tr> -<tr class="memdesc:gac5644140ddda98198f9d5deabbeaf781"><td class="mdescLeft"> </td><td class="mdescRight">Reads a byte from a register in an I2C device. <a href="group__i2c.html#gac5644140ddda98198f9d5deabbeaf781">More...</a><br /></td></tr> -<tr class="separator:gac5644140ddda98198f9d5deabbeaf781"><td class="memSeparator" colspan="2"> </td></tr> -<tr class="memitem:gaed749d3ca5e6e3aedcf1aefed3d7663e"><td class="memItemLeft" align="right" valign="top">uint16_t </td><td class="memItemRight" valign="bottom"><a class="el" href="group__i2c.html#gaed749d3ca5e6e3aedcf1aefed3d7663e">watch_i2c_read16</a> (int16_t addr, uint8_t reg)</td></tr> -<tr class="memdesc:gaed749d3ca5e6e3aedcf1aefed3d7663e"><td class="mdescLeft"> </td><td class="mdescRight">Reads an unsigned little-endian word from a register in an I2C device. <a href="group__i2c.html#gaed749d3ca5e6e3aedcf1aefed3d7663e">More...</a><br /></td></tr> -<tr class="separator:gaed749d3ca5e6e3aedcf1aefed3d7663e"><td class="memSeparator" colspan="2"> </td></tr> -<tr class="memitem:ga6732b5655fdada88d083e4b4d05d1ca8"><td class="memItemLeft" align="right" valign="top">uint32_t </td><td class="memItemRight" valign="bottom"><a class="el" href="group__i2c.html#ga6732b5655fdada88d083e4b4d05d1ca8">watch_i2c_read24</a> (int16_t addr, uint8_t reg)</td></tr> -<tr class="memdesc:ga6732b5655fdada88d083e4b4d05d1ca8"><td class="mdescLeft"> </td><td class="mdescRight">Reads three bytes as an unsigned little-endian int from a register in an I2C device. <a href="group__i2c.html#ga6732b5655fdada88d083e4b4d05d1ca8">More...</a><br /></td></tr> -<tr class="separator:ga6732b5655fdada88d083e4b4d05d1ca8"><td class="memSeparator" colspan="2"> </td></tr> -<tr class="memitem:ga3d1c750d1b228b11333d10fc9647d651"><td class="memItemLeft" align="right" valign="top">uint32_t </td><td class="memItemRight" valign="bottom"><a class="el" href="group__i2c.html#ga3d1c750d1b228b11333d10fc9647d651">watch_i2c_read32</a> (int16_t addr, uint8_t reg)</td></tr> -<tr class="memdesc:ga3d1c750d1b228b11333d10fc9647d651"><td class="mdescLeft"> </td><td class="mdescRight">Reads an unsigned little-endian int from a register in an I2C device. <a href="group__i2c.html#ga3d1c750d1b228b11333d10fc9647d651">More...</a><br /></td></tr> -<tr class="separator:ga3d1c750d1b228b11333d10fc9647d651"><td class="memSeparator" colspan="2"> </td></tr> -</table> -<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2> -<p>This section covers functions related to the SAM L22's built-I2C driver, including configuring the I2C bus, putting values directly on the bus and reading data from registers on I2C devices. </p> -<h2 class="groupheader">Function Documentation</h2> -<a id="gaed749d3ca5e6e3aedcf1aefed3d7663e"></a> -<h2 class="memtitle"><span class="permalink"><a href="#gaed749d3ca5e6e3aedcf1aefed3d7663e">◆ </a></span>watch_i2c_read16()</h2> - -<div class="memitem"> -<div class="memproto"> - <table class="memname"> - <tr> - <td class="memname">uint16_t watch_i2c_read16 </td> - <td>(</td> - <td class="paramtype">int16_t </td> - <td class="paramname"><em>addr</em>, </td> - </tr> - <tr> - <td class="paramkey"></td> - <td></td> - <td class="paramtype">uint8_t </td> - <td class="paramname"><em>reg</em> </td> - </tr> - <tr> - <td></td> - <td>)</td> - <td></td><td></td> - </tr> - </table> -</div><div class="memdoc"> - -<p>Reads an unsigned little-endian word from a register in an I2C device. </p> -<dl class="params"><dt>Parameters</dt><dd> - <table class="params"> - <tr><td class="paramname">addr</td><td>The address of the device you wish to address. </td></tr> - <tr><td class="paramname">reg</td><td>The register on the device that you wish to read. </td></tr> - </table> - </dd> -</dl> -<dl class="section return"><dt>Returns</dt><dd>An unsigned word representing the value of the register that was read. </dd></dl> -<dl class="section note"><dt>Note</dt><dd>This reads two bytes into the word in bus order. If the device returns the LSB first and then the MSB, you can use this value as returned. If the device returns the data in big-endian order or uses some other kind of fancy bit packing, you may need to shuffle some bits around. </dd></dl> - -</div> -</div> -<a id="ga6732b5655fdada88d083e4b4d05d1ca8"></a> -<h2 class="memtitle"><span class="permalink"><a href="#ga6732b5655fdada88d083e4b4d05d1ca8">◆ </a></span>watch_i2c_read24()</h2> - -<div class="memitem"> -<div class="memproto"> - <table class="memname"> - <tr> - <td class="memname">uint32_t watch_i2c_read24 </td> - <td>(</td> - <td class="paramtype">int16_t </td> - <td class="paramname"><em>addr</em>, </td> - </tr> - <tr> - <td class="paramkey"></td> - <td></td> - <td class="paramtype">uint8_t </td> - <td class="paramname"><em>reg</em> </td> - </tr> - <tr> - <td></td> - <td>)</td> - <td></td><td></td> - </tr> - </table> -</div><div class="memdoc"> - -<p>Reads three bytes as an unsigned little-endian int from a register in an I2C device. </p> -<dl class="params"><dt>Parameters</dt><dd> - <table class="params"> - <tr><td class="paramname">addr</td><td>The address of the device you wish to address. </td></tr> - <tr><td class="paramname">reg</td><td>The register on the device that you wish to read. </td></tr> - </table> - </dd> -</dl> -<dl class="section return"><dt>Returns</dt><dd>An unsigned word representing the value of the register that was read. </dd></dl> -<dl class="section note"><dt>Note</dt><dd>This reads three bytes into the word in bus order. If the device returns these bytes LSB first, you can use this value as returned. If there is a sign bit, the device returns the data in big-endian order, or it uses some other kind of fancy bit packing, you may need to shuffle some bits around. </dd></dl> - -</div> -</div> -<a id="ga3d1c750d1b228b11333d10fc9647d651"></a> -<h2 class="memtitle"><span class="permalink"><a href="#ga3d1c750d1b228b11333d10fc9647d651">◆ </a></span>watch_i2c_read32()</h2> - -<div class="memitem"> -<div class="memproto"> - <table class="memname"> - <tr> - <td class="memname">uint32_t watch_i2c_read32 </td> - <td>(</td> - <td class="paramtype">int16_t </td> - <td class="paramname"><em>addr</em>, </td> - </tr> - <tr> - <td class="paramkey"></td> - <td></td> - <td class="paramtype">uint8_t </td> - <td class="paramname"><em>reg</em> </td> - </tr> - <tr> - <td></td> - <td>)</td> - <td></td><td></td> - </tr> - </table> -</div><div class="memdoc"> - -<p>Reads an unsigned little-endian int from a register in an I2C device. </p> -<dl class="params"><dt>Parameters</dt><dd> - <table class="params"> - <tr><td class="paramname">addr</td><td>The address of the device you wish to address. </td></tr> - <tr><td class="paramname">reg</td><td>The register on the device that you wish to read. </td></tr> - </table> - </dd> -</dl> -<dl class="section return"><dt>Returns</dt><dd>An unsigned word representing the value of the register that was read. </dd></dl> -<dl class="section note"><dt>Note</dt><dd>This reads three bytes into the word in bus order. If the device returns these bytes LSB first, you can use this value as returned. If the device returns the data in big-endian order, or it uses some other kind of fancy bit packing, you may need to shuffle some bits around. </dd></dl> - -</div> -</div> -<a id="gac5644140ddda98198f9d5deabbeaf781"></a> -<h2 class="memtitle"><span class="permalink"><a href="#gac5644140ddda98198f9d5deabbeaf781">◆ </a></span>watch_i2c_read8()</h2> - -<div class="memitem"> -<div class="memproto"> - <table class="memname"> - <tr> - <td class="memname">uint8_t watch_i2c_read8 </td> - <td>(</td> - <td class="paramtype">int16_t </td> - <td class="paramname"><em>addr</em>, </td> - </tr> - <tr> - <td class="paramkey"></td> - <td></td> - <td class="paramtype">uint8_t </td> - <td class="paramname"><em>reg</em> </td> - </tr> - <tr> - <td></td> - <td>)</td> - <td></td><td></td> - </tr> - </table> -</div><div class="memdoc"> - -<p>Reads a byte from a register in an I2C device. </p> -<dl class="params"><dt>Parameters</dt><dd> - <table class="params"> - <tr><td class="paramname">addr</td><td>The address of the device you wish to address. </td></tr> - <tr><td class="paramname">reg</td><td>The register on the device that you wish to read. </td></tr> - </table> - </dd> -</dl> -<dl class="section return"><dt>Returns</dt><dd>An unsigned byte representing the value of the register that was read. </dd></dl> - -</div> -</div> -<a id="ga426971387b87286c8decca7342c06b4b"></a> -<h2 class="memtitle"><span class="permalink"><a href="#ga426971387b87286c8decca7342c06b4b">◆ </a></span>watch_i2c_receive()</h2> - -<div class="memitem"> -<div class="memproto"> - <table class="memname"> - <tr> - <td class="memname">void watch_i2c_receive </td> - <td>(</td> - <td class="paramtype">int16_t </td> - <td class="paramname"><em>addr</em>, </td> - </tr> - <tr> - <td class="paramkey"></td> - <td></td> - <td class="paramtype">uint8_t * </td> - <td class="paramname"><em>buf</em>, </td> - </tr> - <tr> - <td class="paramkey"></td> - <td></td> - <td class="paramtype">uint16_t </td> - <td class="paramname"><em>length</em> </td> - </tr> - <tr> - <td></td> - <td>)</td> - <td></td><td></td> - </tr> - </table> -</div><div class="memdoc"> - -<p>Receives a series of values from a device on the I2C bus. </p> -<dl class="params"><dt>Parameters</dt><dd> - <table class="params"> - <tr><td class="paramname">addr</td><td>The address of the device you wish to hear from. </td></tr> - <tr><td class="paramname">buf</td><td>Storage for the incoming bytes; on return, it will contain the received data. </td></tr> - <tr><td class="paramname">length</td><td>The number of bytes that you wish to receive. </td></tr> - </table> - </dd> -</dl> - -</div> -</div> -<a id="ga8b44030f78c30dd4026b349fc0c8cf08"></a> -<h2 class="memtitle"><span class="permalink"><a href="#ga8b44030f78c30dd4026b349fc0c8cf08">◆ </a></span>watch_i2c_send()</h2> - -<div class="memitem"> -<div class="memproto"> - <table class="memname"> - <tr> - <td class="memname">void watch_i2c_send </td> - <td>(</td> - <td class="paramtype">int16_t </td> - <td class="paramname"><em>addr</em>, </td> - </tr> - <tr> - <td class="paramkey"></td> - <td></td> - <td class="paramtype">uint8_t * </td> - <td class="paramname"><em>buf</em>, </td> - </tr> - <tr> - <td class="paramkey"></td> - <td></td> - <td class="paramtype">uint16_t </td> - <td class="paramname"><em>length</em> </td> - </tr> - <tr> - <td></td> - <td>)</td> - <td></td><td></td> - </tr> - </table> -</div><div class="memdoc"> - -<p>Sends a series of values to a device on the I2C bus. </p> -<dl class="params"><dt>Parameters</dt><dd> - <table class="params"> - <tr><td class="paramname">addr</td><td>The address of the device you wish to talk to. </td></tr> - <tr><td class="paramname">buf</td><td>A series of unsigned bytes; the data you wish to transmit. </td></tr> - <tr><td class="paramname">length</td><td>The number of bytes in buf that you wish to send. </td></tr> - </table> - </dd> -</dl> - -</div> -</div> -<a id="gaf0a4c78215cbd85ab557fc6c786eb6ad"></a> -<h2 class="memtitle"><span class="permalink"><a href="#gaf0a4c78215cbd85ab557fc6c786eb6ad">◆ </a></span>watch_i2c_write8()</h2> - -<div class="memitem"> -<div class="memproto"> - <table class="memname"> - <tr> - <td class="memname">void watch_i2c_write8 </td> - <td>(</td> - <td class="paramtype">int16_t </td> - <td class="paramname"><em>addr</em>, </td> - </tr> - <tr> - <td class="paramkey"></td> - <td></td> - <td class="paramtype">uint8_t </td> - <td class="paramname"><em>reg</em>, </td> - </tr> - <tr> - <td class="paramkey"></td> - <td></td> - <td class="paramtype">uint8_t </td> - <td class="paramname"><em>data</em> </td> - </tr> - <tr> - <td></td> - <td>)</td> - <td></td><td></td> - </tr> - </table> -</div><div class="memdoc"> - -<p>Writes a byte to a register in an I2C device. </p> -<dl class="params"><dt>Parameters</dt><dd> - <table class="params"> - <tr><td class="paramname">addr</td><td>The address of the device you wish to address. </td></tr> - <tr><td class="paramname">reg</td><td>The register on the device that you wish to set. </td></tr> - <tr><td class="paramname">data</td><td>The value that you wish to set the register to. </td></tr> - </table> - </dd> -</dl> - -</div> -</div> -</div><!-- contents --> -<!-- start footer part --> -<hr class="footer"/><address class="footer"><small> -Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.1 -</small></address> -</body> -</html> |