Source

New LiquidCrystal / docs / html / class_i2_c_i_o.html

The default branch has multiple heads

<!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"/>
<title>LCD Library: I2CIO Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body onload='searchBox.OnSelectItem(0);'>
<!-- Generated by Doxygen 1.7.4 -->
<script type="text/javascript"><!--
var searchBox = new SearchBox("searchBox", "search",false,'Search');
--></script>
<div id="top">
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="logoGoogle.jpg"/></td>
  <td style="padding-left: 0.5em;">
   <div id="projectname">LCD Library&#160;<span id="projectnumber">1.2.0</span></div>
   <div id="projectbrief">LCD Library - LCD control class hierarchy library. Drop in replacement for the LiquidCrystal Library.</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
      <li id="searchli">
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="annotated.html"><span>Class&#160;List</span></a></li>
      <li><a href="classes.html"><span>Class&#160;Index</span></a></li>
      <li><a href="hierarchy.html"><span>Class&#160;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Class&#160;Members</span></a></li>
    </ul>
  </div>
</div>
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a>  </div>
  <div class="headertitle">
<div class="title">I2CIO Class Reference</div>  </div>
</div>
<div class="contents">
<!-- doxytag: class="I2CIO" -->
<p><code>#include &lt;<a class="el" href="_i2_c_i_o_8h_source.html">I2CIO.h</a>&gt;</code></p>

<p><a href="class_i2_c_i_o-members.html">List of all members.</a></p>
<table class="memberdecls">
<tr><td colspan="2"><h2><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_i2_c_i_o.html#a6f814653d903dc2ff6e8420eeb7954ae">begin</a> (uint8_t i2cAddr)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">uint8_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_i2_c_i_o.html#ac26221011a8b49bcea9ef62712ea88a7">digitalRead</a> (uint8_t pin)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_i2_c_i_o.html#a473206162522b847546777d16a7c6dcd">digitalWrite</a> (uint8_t pin, uint8_t level)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_i2_c_i_o.html#a32eb7832075ad6011d67874405a0d0a6">I2CIO</a> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_i2_c_i_o.html#a53b94274eb6bb68564cf5243323db887">pinMode</a> (uint8_t pin, uint8_t dir)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_i2_c_i_o.html#a0341888753bc54c4384f5593a870fb34">portMode</a> (uint8_t dir)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">uint8_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_i2_c_i_o.html#a7a3db7bfc15ede0ae9e8c8bd44290ef7">read</a> (void)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_i2_c_i_o.html#ae2063569c927d0008e2593d14504fdcd">write</a> (uint8_t value)</td></tr>
</table>
<hr/><a name="details" id="details"></a><h2>Detailed Description</h2>
<div class="textblock">
<p>Definition at line <a class="el" href="_i2_c_i_o_8h_source.html#l00041">41</a> of file <a class="el" href="_i2_c_i_o_8h_source.html">I2CIO.h</a>.</p>
</div><hr/><h2>Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="a32eb7832075ad6011d67874405a0d0a6"></a><!-- doxytag: member="I2CIO::I2CIO" ref="a32eb7832075ad6011d67874405a0d0a6" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">I2CIO::I2CIO </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Constructor method  Class constructor constructor. </p>

<p>Definition at line <a class="el" href="_i2_c_i_o_8cpp_source.html#l00044">44</a> of file <a class="el" href="_i2_c_i_o_8cpp_source.html">I2CIO.cpp</a>.</p>

</div>
</div>
<hr/><h2>Member Function Documentation</h2>
<a class="anchor" id="a6f814653d903dc2ff6e8420eeb7954ae"></a><!-- doxytag: member="I2CIO::begin" ref="a6f814653d903dc2ff6e8420eeb7954ae" args="(uint8_t i2cAddr)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int I2CIO::begin </td>
          <td>(</td>
          <td class="paramtype">uint8_t&#160;</td>
          <td class="paramname"><em>i2cAddr</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Initializes the device.  This method initializes the device allocating an I2C address. This method is the first method that should be call prior to calling any other method form this class. On initialization all pins are configured as INPUT on the device.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">i2cAddr,:</td><td>I2C Address where the device is located. </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>1 if the device was initialized correctly, 0 otherwise </dd></dl>

<p>Definition at line <a class="el" href="_i2_c_i_o_8cpp_source.html#l00057">57</a> of file <a class="el" href="_i2_c_i_o_8cpp_source.html">I2CIO.cpp</a>.</p>

</div>
</div>
<a class="anchor" id="ac26221011a8b49bcea9ef62712ea88a7"></a><!-- doxytag: member="I2CIO::digitalRead" ref="ac26221011a8b49bcea9ef62712ea88a7" args="(uint8_t pin)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">uint8_t I2CIO::digitalRead </td>
          <td>(</td>
          <td class="paramtype">uint8_t&#160;</td>
          <td class="paramname"><em>pin</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Read a pin from the device.  Reads a particular pin from the device. To read a particular pin it has to be configured as INPUT. During initialization all pins are configured as INPUTs by default. Please refer to pinMode or portMode.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">pin[in]</td><td>Pin from the port to read its status. Range (0..7) </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>Returns the pin status (HIGH, LOW) if the pin is configured as an output, reading its value will always return LOW regardless of its real state. </dd></dl>

<p>Definition at line <a class="el" href="_i2_c_i_o_8cpp_source.html#l00153">153</a> of file <a class="el" href="_i2_c_i_o_8cpp_source.html">I2CIO.cpp</a>.</p>

</div>
</div>
<a class="anchor" id="a473206162522b847546777d16a7c6dcd"></a><!-- doxytag: member="I2CIO::digitalWrite" ref="a473206162522b847546777d16a7c6dcd" args="(uint8_t pin, uint8_t level)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int I2CIO::digitalWrite </td>
          <td>(</td>
          <td class="paramtype">uint8_t&#160;</td>
          <td class="paramname"><em>pin</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint8_t&#160;</td>
          <td class="paramname"><em>level</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Writes a digital level to a particular pin.  Write a level to the indicated pin of the device. For this method to have effect, the pin has to be configured as OUTPUT using the pinMode or portMode methods.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">pin[in]</td><td>device pin to change level. Range (0..7).  level[in] logic level to set the pin at (HIGH, LOW). </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>1 on success, 0 otherwise. </dd></dl>

<p>Definition at line <a class="el" href="_i2_c_i_o_8cpp_source.html#l00170">170</a> of file <a class="el" href="_i2_c_i_o_8cpp_source.html">I2CIO.cpp</a>.</p>

</div>
</div>
<a class="anchor" id="a53b94274eb6bb68564cf5243323db887"></a><!-- doxytag: member="I2CIO::pinMode" ref="a53b94274eb6bb68564cf5243323db887" args="(uint8_t pin, uint8_t dir)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void I2CIO::pinMode </td>
          <td>(</td>
          <td class="paramtype">uint8_t&#160;</td>
          <td class="paramname"><em>pin</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint8_t&#160;</td>
          <td class="paramname"><em>dir</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Sets the mode of a particular pin.  Sets the mode of a particular pin to INPUT, OUTPUT. digitalWrite has no effect on pins which are not declared as output.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">pin[in]</td><td>Pin from the I2C IO expander to be configured. Range 0..7 </td></tr>
    <tr><td class="paramname">dir[in]</td><td>Pin direction (INPUT, OUTPUT). </td></tr>
  </table>
  </dd>
</dl>

<p>Definition at line <a class="el" href="_i2_c_i_o_8cpp_source.html#l00076">76</a> of file <a class="el" href="_i2_c_i_o_8cpp_source.html">I2CIO.cpp</a>.</p>

</div>
</div>
<a class="anchor" id="a0341888753bc54c4384f5593a870fb34"></a><!-- doxytag: member="I2CIO::portMode" ref="a0341888753bc54c4384f5593a870fb34" args="(uint8_t dir)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void I2CIO::portMode </td>
          <td>(</td>
          <td class="paramtype">uint8_t&#160;</td>
          <td class="paramname"><em>dir</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Sets all the pins of the device in a particular direction.  This method sets all the pins of the device in a particular direction. This method is useful to set all the pins of the device to be either inputs or outputs. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">dir[in]</td><td>Direction of all the pins of the device (INPUT, OUTPUT). </td></tr>
  </table>
  </dd>
</dl>

<p>Definition at line <a class="el" href="_i2_c_i_o_8cpp_source.html#l00093">93</a> of file <a class="el" href="_i2_c_i_o_8cpp_source.html">I2CIO.cpp</a>.</p>

</div>
</div>
<a class="anchor" id="a7a3db7bfc15ede0ae9e8c8bd44290ef7"></a><!-- doxytag: member="I2CIO::read" ref="a7a3db7bfc15ede0ae9e8c8bd44290ef7" args="(void)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">uint8_t I2CIO::read </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Reads all the pins of the device that are configured as INPUT.  Reads from the device the status of the pins that are configured as INPUT. During initialization all pins are configured as INPUTs by default. Please refer to pinMode or portMode.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">none</td><td></td></tr>
  </table>
  </dd>
</dl>

<p>Definition at line <a class="el" href="_i2_c_i_o_8cpp_source.html#l00111">111</a> of file <a class="el" href="_i2_c_i_o_8cpp_source.html">I2CIO.cpp</a>.</p>

</div>
</div>
<a class="anchor" id="ae2063569c927d0008e2593d14504fdcd"></a><!-- doxytag: member="I2CIO::write" ref="ae2063569c927d0008e2593d14504fdcd" args="(uint8_t value)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int I2CIO::write </td>
          <td>(</td>
          <td class="paramtype">uint8_t&#160;</td>
          <td class="paramname"><em>value</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Write a value to the device.  Writes to a set of pins in the device. The value is the binary representation of all the pins in device. The value written is masked with the configuration of the direction of the pins; to change the state of a particular pin with this method, such pin has to be configured as OUTPUT using the portMode or pinMode methods. If no pins have been configured as OUTPUTs this method will have no effect.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">value[in]</td><td>value to be written to the device. </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>1 on success, 0 otherwise </dd></dl>

<p>Definition at line <a class="el" href="_i2_c_i_o_8cpp_source.html#l00130">130</a> of file <a class="el" href="_i2_c_i_o_8cpp_source.html">I2CIO.cpp</a>.</p>

</div>
</div>
<hr/>The documentation for this class was generated from the following files:<ul>
<li>/Users/fmalpartida/development/ardWorkspace/LiquidCrystal_I2C/LiquiCrystal_I2C/<a class="el" href="_i2_c_i_o_8h_source.html">I2CIO.h</a></li>
<li>/Users/fmalpartida/development/ardWorkspace/LiquidCrystal_I2C/LiquiCrystal_I2C/<a class="el" href="_i2_c_i_o_8cpp_source.html">I2CIO.cpp</a></li>
</ul>
</div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark">&#160;</span>Defines</a></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>

<hr class="footer"/><address class="footer"><small>Generated on Fri Mar 23 2012 20:38:55 for LCD Library by&#160;
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.4 </small></address>
</body>
</html>
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.