Commits

F Malpartida committed 2ec4883

Upgraded LCD API to 1.1.0 and prepared for RC1

Comments (0)

Files changed (62)

 // read and write uint8_t operations and basic pin level routines to set or read
 // a particular IO port.
 //
-// This library is only compatible with Arduino's SDK version 1.0
 //
 // @version API 1.0.0
 //
 // read and write uint8_t operations and basic pin level routines to set or read
 // a particular IO port.
 //
-// This library is only compatible with Arduino's SDK version 1.0
-//
 // @version API 1.0.0
 //
 // @author F. Malpartida - fmalpartida@gmail.com
 // backpacks such as the I2CLCDextraIO using the PCF8574* I2C IO Expander ASIC.
 //
 //
-// @version API 1.0.0
+// @version API 1.1.0
 //
 // @author F. Malpartida - fmalpartida@gmail.com
 // ---------------------------------------------------------------------------
 // it has been extended to drive 4 and 8 bit mode control, LCDs and I2C extension
 // backpacks such as the I2CLCDextraIO using the PCF8574* I2C IO Expander ASIC.
 //
-// @version API 1.0.0
+// @version API 1.1.0
 //
 //
 // @author F. Malpartida - fmalpartida@gmail.com

LiquidCrystal.cpp

 // to the original functionality of the Arduino LiquidCrystal library.
 //
 //
-// This library is only compatible with Arduino's SDK version 1.0
-//
-//
 // @author F. Malpartida - fmalpartida@gmail.com
 // ---------------------------------------------------------------------------
 #include <stdio.h>
 // to the original functionality of the Arduino LiquidCrystal library.
 //
 //
-// This library is only compatible with Arduino's SDK version 1.0
-//
-//
 // @author F. Malpartida - fmalpartida@gmail.com
 // ---------------------------------------------------------------------------
 #ifndef LiquidCrystal_4bit_h

LiquidCrystal_I2C.cpp

 // to the original functionality of the Arduino LiquidCrystal library.
 //
 //
-// This library is only compatible with Arduino's SDK version 1.0
-//
 //
 // @author F. Malpartida - fmalpartida@gmail.com
 // ---------------------------------------------------------------------------

LiquidCrystal_I2C.h

 // to the original functionality of the Arduino LiquidCrystal library.
 //
 //
-// This library is only compatible with Arduino's SDK version 1.0
-//
-//
 // @author F. Malpartida - fmalpartida@gmail.com
 // ---------------------------------------------------------------------------
 #ifndef LiquidCrystal_I2C_h

LiquidCrystal_SR.cpp

 //             on the "official" LiquidCrystal library.
 //
 //
-// This library is only compatible with Arduino's SDK version 1.0
-//
-//
 // @author F. Malpartida - fmalpartida@gmail.com
 // ---------------------------------------------------------------------------
 #include <stdio.h>

LiquidCrystal_SR.h

 //             on the "official" LiquidCrystal library.
 //
 //
-// This library is only compatible with Arduino's SDK version 1.0
-//
 //
 // @author F. Malpartida - fmalpartida@gmail.com
 // ---------------------------------------------------------------------------

docs/html/_fast_i_o_8cpp.html

 </iframe>
 </div>
 
-<hr class="footer"/><address class="footer"><small>Generated on Sat Feb 18 2012 21:46:46 for LCD Library by&#160;
+<hr class="footer"/><address class="footer"><small>Generated on Sat Feb 18 2012 22:11:26 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>

docs/html/_fast_i_o_8cpp_source.html

 </iframe>
 </div>
 
-<hr class="footer"/><address class="footer"><small>Generated on Sat Feb 18 2012 21:46:46 for LCD Library by&#160;
+<hr class="footer"/><address class="footer"><small>Generated on Sat Feb 18 2012 22:11:26 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>

docs/html/_fast_i_o_8h.html

 </iframe>
 </div>
 
-<hr class="footer"/><address class="footer"><small>Generated on Sat Feb 18 2012 21:46:46 for LCD Library by&#160;
+<hr class="footer"/><address class="footer"><small>Generated on Sat Feb 18 2012 22:11:26 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>

docs/html/_fast_i_o_8h_source.html

 </iframe>
 </div>
 
-<hr class="footer"/><address class="footer"><small>Generated on Sat Feb 18 2012 21:46:46 for LCD Library by&#160;
+<hr class="footer"/><address class="footer"><small>Generated on Sat Feb 18 2012 22:11:26 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>

docs/html/_i2_c_i_o_8cpp.html

 </iframe>
 </div>
 
-<hr class="footer"/><address class="footer"><small>Generated on Sat Feb 18 2012 21:46:46 for LCD Library by&#160;
+<hr class="footer"/><address class="footer"><small>Generated on Sat Feb 18 2012 22:11:26 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>

docs/html/_i2_c_i_o_8cpp_source.html

 <a name="l00019"></a>00019 <span class="comment">// read and write uint8_t operations and basic pin level routines to set or read</span>
 <a name="l00020"></a>00020 <span class="comment">// a particular IO port.</span>
 <a name="l00021"></a>00021 <span class="comment">//</span>
-<a name="l00022"></a>00022 <span class="comment">// This library is only compatible with Arduino&#39;s SDK version 1.0</span>
-<a name="l00023"></a>00023 <span class="comment">//</span>
-<a name="l00024"></a>00024 <span class="comment">// @version API 1.0.0</span>
-<a name="l00025"></a>00025 <span class="comment">//</span>
-<a name="l00026"></a>00026 <span class="comment">// @author F. Malpartida - fmalpartida@gmail.com</span>
-<a name="l00027"></a>00027 <span class="comment">// ---------------------------------------------------------------------------</span>
-<a name="l00028"></a>00028 <span class="preprocessor">#if (ARDUINO &lt;  100)</span>
-<a name="l00029"></a>00029 <span class="preprocessor"></span><span class="preprocessor">#include &lt;WProgram.h&gt;</span>
-<a name="l00030"></a>00030 <span class="preprocessor">#else</span>
-<a name="l00031"></a>00031 <span class="preprocessor"></span><span class="preprocessor">#include &lt;Arduino.h&gt;</span>
-<a name="l00032"></a>00032 <span class="preprocessor">#endif</span>
-<a name="l00033"></a>00033 <span class="preprocessor"></span>
-<a name="l00034"></a>00034 <span class="preprocessor">#include &lt;inttypes.h&gt;</span>
-<a name="l00035"></a>00035 <span class="preprocessor">#include &quot;../Wire/Wire.h&quot;</span>
-<a name="l00036"></a>00036 
-<a name="l00037"></a>00037 <span class="preprocessor">#include &quot;<a class="code" href="_i2_c_i_o_8h.html">I2CIO.h</a>&quot;</span>
-<a name="l00038"></a>00038 
-<a name="l00039"></a>00039 <span class="comment">// CLASS VARIABLES</span>
-<a name="l00040"></a>00040 <span class="comment">// ---------------------------------------------------------------------------</span>
+<a name="l00022"></a>00022 <span class="comment">//</span>
+<a name="l00023"></a>00023 <span class="comment">// @version API 1.0.0</span>
+<a name="l00024"></a>00024 <span class="comment">//</span>
+<a name="l00025"></a>00025 <span class="comment">// @author F. Malpartida - fmalpartida@gmail.com</span>
+<a name="l00026"></a>00026 <span class="comment">// ---------------------------------------------------------------------------</span>
+<a name="l00027"></a>00027 <span class="preprocessor">#if (ARDUINO &lt;  100)</span>
+<a name="l00028"></a>00028 <span class="preprocessor"></span><span class="preprocessor">#include &lt;WProgram.h&gt;</span>
+<a name="l00029"></a>00029 <span class="preprocessor">#else</span>
+<a name="l00030"></a>00030 <span class="preprocessor"></span><span class="preprocessor">#include &lt;Arduino.h&gt;</span>
+<a name="l00031"></a>00031 <span class="preprocessor">#endif</span>
+<a name="l00032"></a>00032 <span class="preprocessor"></span>
+<a name="l00033"></a>00033 <span class="preprocessor">#include &lt;inttypes.h&gt;</span>
+<a name="l00034"></a>00034 <span class="preprocessor">#include &quot;../Wire/Wire.h&quot;</span>
+<a name="l00035"></a>00035 
+<a name="l00036"></a>00036 <span class="preprocessor">#include &quot;<a class="code" href="_i2_c_i_o_8h.html">I2CIO.h</a>&quot;</span>
+<a name="l00037"></a>00037 
+<a name="l00038"></a>00038 <span class="comment">// CLASS VARIABLES</span>
+<a name="l00039"></a>00039 <span class="comment">// ---------------------------------------------------------------------------</span>
+<a name="l00040"></a>00040 
 <a name="l00041"></a>00041 
-<a name="l00042"></a>00042 
-<a name="l00043"></a>00043 <span class="comment">// CONSTRUCTOR</span>
-<a name="l00044"></a>00044 <span class="comment">// ---------------------------------------------------------------------------</span>
-<a name="l00045"></a><a class="code" href="class_i2_c_i_o.html#a32eb7832075ad6011d67874405a0d0a6">00045</a> <a class="code" href="class_i2_c_i_o.html#a32eb7832075ad6011d67874405a0d0a6">I2CIO::I2CIO</a> ( )
-<a name="l00046"></a>00046 {
-<a name="l00047"></a>00047    _i2cAddr     = 0x0;
-<a name="l00048"></a>00048    _dirMask     = 0xFF;    <span class="comment">// mark all as INPUTs</span>
-<a name="l00049"></a>00049    _shadow      = 0x0;     <span class="comment">// no values set</span>
-<a name="l00050"></a>00050    _initialised = <span class="keyword">false</span>;
-<a name="l00051"></a>00051 }
-<a name="l00052"></a>00052 
-<a name="l00053"></a>00053 <span class="comment">// PUBLIC METHODS</span>
-<a name="l00054"></a>00054 <span class="comment">// ---------------------------------------------------------------------------</span>
-<a name="l00055"></a>00055 
-<a name="l00056"></a>00056 <span class="comment">//</span>
-<a name="l00057"></a>00057 <span class="comment">// begin</span>
-<a name="l00058"></a><a class="code" href="class_i2_c_i_o.html#a6f814653d903dc2ff6e8420eeb7954ae">00058</a> <span class="keywordtype">int</span> <a class="code" href="class_i2_c_i_o.html#a6f814653d903dc2ff6e8420eeb7954ae">I2CIO::begin</a> (  uint8_t i2cAddr )
-<a name="l00059"></a>00059 {
-<a name="l00060"></a>00060    _i2cAddr = i2cAddr;
-<a name="l00061"></a>00061    
-<a name="l00062"></a>00062    Wire.begin ( );
-<a name="l00063"></a>00063       
-<a name="l00064"></a>00064    _initialised = Wire.requestFrom ( _i2cAddr, (uint8_t)1 );
-<a name="l00065"></a>00065 
-<a name="l00066"></a>00066 <span class="preprocessor">#if (ARDUINO &lt;  100)</span>
-<a name="l00067"></a>00067 <span class="preprocessor"></span>   _shadow = Wire.receive ();
-<a name="l00068"></a>00068 <span class="preprocessor">#else</span>
-<a name="l00069"></a>00069 <span class="preprocessor"></span>   _shadow = Wire.read (); <span class="comment">// Remove the byte read don&#39;t need it.</span>
-<a name="l00070"></a>00070 <span class="preprocessor">#endif</span>
-<a name="l00071"></a>00071 <span class="preprocessor"></span>   
-<a name="l00072"></a>00072    <span class="keywordflow">return</span> ( _initialised );
-<a name="l00073"></a>00073 }
-<a name="l00074"></a>00074 
-<a name="l00075"></a>00075 <span class="comment">//</span>
-<a name="l00076"></a>00076 <span class="comment">// pinMode</span>
-<a name="l00077"></a><a class="code" href="class_i2_c_i_o.html#a53b94274eb6bb68564cf5243323db887">00077</a> <span class="keywordtype">void</span> <a class="code" href="class_i2_c_i_o.html#a53b94274eb6bb68564cf5243323db887">I2CIO::pinMode</a> ( uint8_t pin, uint8_t dir )
-<a name="l00078"></a>00078 {
-<a name="l00079"></a>00079    <span class="keywordflow">if</span> ( _initialised )
-<a name="l00080"></a>00080    {
-<a name="l00081"></a>00081       <span class="keywordflow">if</span> ( OUTPUT == dir )
-<a name="l00082"></a>00082       {
-<a name="l00083"></a>00083          _dirMask &amp;= ~( 1 &lt;&lt; pin );
-<a name="l00084"></a>00084       }
-<a name="l00085"></a>00085       <span class="keywordflow">else</span> 
-<a name="l00086"></a>00086       {
-<a name="l00087"></a>00087          _dirMask |= ( 1 &lt;&lt; pin );
-<a name="l00088"></a>00088       }
-<a name="l00089"></a>00089    }
-<a name="l00090"></a>00090 }
-<a name="l00091"></a>00091 
-<a name="l00092"></a>00092 <span class="comment">//</span>
-<a name="l00093"></a>00093 <span class="comment">// portMode</span>
-<a name="l00094"></a><a class="code" href="class_i2_c_i_o.html#a0341888753bc54c4384f5593a870fb34">00094</a> <span class="keywordtype">void</span> <a class="code" href="class_i2_c_i_o.html#a0341888753bc54c4384f5593a870fb34">I2CIO::portMode</a> ( uint8_t dir )
-<a name="l00095"></a>00095 {
-<a name="l00096"></a>00096    
-<a name="l00097"></a>00097    <span class="keywordflow">if</span> ( _initialised )
-<a name="l00098"></a>00098    {
-<a name="l00099"></a>00099       <span class="keywordflow">if</span> ( dir == INPUT )
-<a name="l00100"></a>00100       {
-<a name="l00101"></a>00101          _dirMask = 0xFF;
-<a name="l00102"></a>00102       }
-<a name="l00103"></a>00103       <span class="keywordflow">else</span>
-<a name="l00104"></a>00104       {
-<a name="l00105"></a>00105          _dirMask = 0x00;
-<a name="l00106"></a>00106       }
-<a name="l00107"></a>00107    }
-<a name="l00108"></a>00108 }
-<a name="l00109"></a>00109 
-<a name="l00110"></a>00110 <span class="comment">//</span>
-<a name="l00111"></a>00111 <span class="comment">// read</span>
-<a name="l00112"></a><a class="code" href="class_i2_c_i_o.html#a7a3db7bfc15ede0ae9e8c8bd44290ef7">00112</a> uint8_t <a class="code" href="class_i2_c_i_o.html#a7a3db7bfc15ede0ae9e8c8bd44290ef7">I2CIO::read</a> ( <span class="keywordtype">void</span> )
-<a name="l00113"></a>00113 {
-<a name="l00114"></a>00114    uint8_t retVal = 0;
-<a name="l00115"></a>00115    
-<a name="l00116"></a>00116    <span class="keywordflow">if</span> ( _initialised )
-<a name="l00117"></a>00117    {
-<a name="l00118"></a>00118       Wire.requestFrom ( _i2cAddr, (uint8_t)1 );
-<a name="l00119"></a>00119 <span class="preprocessor">#if (ARDUINO &lt;  100)</span>
-<a name="l00120"></a>00120 <span class="preprocessor"></span>      retVal = ( _dirMask &amp; Wire.receive ( ) );
-<a name="l00121"></a>00121 <span class="preprocessor">#else</span>
-<a name="l00122"></a>00122 <span class="preprocessor"></span>      retVal = ( _dirMask &amp; Wire.read ( ) );
-<a name="l00123"></a>00123 <span class="preprocessor">#endif      </span>
-<a name="l00124"></a>00124 <span class="preprocessor"></span>      
-<a name="l00125"></a>00125    }
-<a name="l00126"></a>00126    <span class="keywordflow">return</span> ( retVal );
-<a name="l00127"></a>00127 }
-<a name="l00128"></a>00128 
-<a name="l00129"></a>00129 <span class="comment">//</span>
-<a name="l00130"></a>00130 <span class="comment">// write</span>
-<a name="l00131"></a><a class="code" href="class_i2_c_i_o.html#ae2063569c927d0008e2593d14504fdcd">00131</a> <span class="keywordtype">int</span> <a class="code" href="class_i2_c_i_o.html#ae2063569c927d0008e2593d14504fdcd">I2CIO::write</a> ( uint8_t value )
-<a name="l00132"></a>00132 {
-<a name="l00133"></a>00133    <span class="keywordtype">int</span> status = 0;
-<a name="l00134"></a>00134    
-<a name="l00135"></a>00135    <span class="keywordflow">if</span> ( _initialised )
-<a name="l00136"></a>00136    {
-<a name="l00137"></a>00137       <span class="comment">// Only write HIGH the values of the ports that have been initialised as</span>
-<a name="l00138"></a>00138       <span class="comment">// outputs updating the output shadow of the device</span>
-<a name="l00139"></a>00139       _shadow = ( value &amp; ~(_dirMask) );
-<a name="l00140"></a>00140    
-<a name="l00141"></a>00141       Wire.beginTransmission ( _i2cAddr );
-<a name="l00142"></a>00142 <span class="preprocessor">#if (ARDUINO &lt;  100)</span>
-<a name="l00143"></a>00143 <span class="preprocessor"></span>      Wire.send ( _shadow );
-<a name="l00144"></a>00144 <span class="preprocessor">#else</span>
-<a name="l00145"></a>00145 <span class="preprocessor"></span>      Wire.write ( _shadow );
-<a name="l00146"></a>00146 <span class="preprocessor">#endif  </span>
-<a name="l00147"></a>00147 <span class="preprocessor"></span>      status = Wire.endTransmission ();
-<a name="l00148"></a>00148    }
-<a name="l00149"></a>00149    <span class="keywordflow">return</span> ( (status == 0) );
-<a name="l00150"></a>00150 }
-<a name="l00151"></a>00151 
-<a name="l00152"></a>00152 <span class="comment">//</span>
-<a name="l00153"></a>00153 <span class="comment">// digitalRead</span>
-<a name="l00154"></a><a class="code" href="class_i2_c_i_o.html#ac26221011a8b49bcea9ef62712ea88a7">00154</a> uint8_t <a class="code" href="class_i2_c_i_o.html#ac26221011a8b49bcea9ef62712ea88a7">I2CIO::digitalRead</a> ( uint8_t pin )
-<a name="l00155"></a>00155 {
-<a name="l00156"></a>00156    uint8_t pinVal = 0;
-<a name="l00157"></a>00157    
-<a name="l00158"></a>00158    <span class="comment">// Check if initialised and that the pin is within range of the device</span>
-<a name="l00159"></a>00159    <span class="comment">// -------------------------------------------------------------------</span>
-<a name="l00160"></a>00160    <span class="keywordflow">if</span> ( ( _initialised ) &amp;&amp; ( pin &lt;= 7 ) )
-<a name="l00161"></a>00161    {
-<a name="l00162"></a>00162       <span class="comment">// Remove the values which are not inputs and get the value of the pin</span>
-<a name="l00163"></a>00163       pinVal = this-&gt;<a class="code" href="class_i2_c_i_o.html#a7a3db7bfc15ede0ae9e8c8bd44290ef7">read</a>() &amp; _dirMask;
-<a name="l00164"></a>00164       pinVal = ( pinVal &gt;&gt; pin ) &amp; 0x01; <span class="comment">// Get the pin value</span>
-<a name="l00165"></a>00165    }
-<a name="l00166"></a>00166    <span class="keywordflow">return</span> (pinVal);
-<a name="l00167"></a>00167 }
-<a name="l00168"></a>00168 
-<a name="l00169"></a>00169 <span class="comment">//</span>
-<a name="l00170"></a>00170 <span class="comment">// digitalWrite</span>
-<a name="l00171"></a><a class="code" href="class_i2_c_i_o.html#a473206162522b847546777d16a7c6dcd">00171</a> <span class="keywordtype">int</span> <a class="code" href="class_i2_c_i_o.html#a473206162522b847546777d16a7c6dcd">I2CIO::digitalWrite</a> ( uint8_t pin, uint8_t level )
-<a name="l00172"></a>00172 {
-<a name="l00173"></a>00173    uint8_t writeVal;
-<a name="l00174"></a>00174    <span class="keywordtype">int</span> status = 0;
-<a name="l00175"></a>00175    
-<a name="l00176"></a>00176    <span class="comment">// Check if initialised and that the pin is within range of the device</span>
-<a name="l00177"></a>00177    <span class="comment">// -------------------------------------------------------------------</span>
-<a name="l00178"></a>00178    <span class="keywordflow">if</span> ( ( _initialised ) &amp;&amp; ( pin &lt;= 7 ) )
-<a name="l00179"></a>00179    {
-<a name="l00180"></a>00180       <span class="comment">// Only write to HIGH the port if the port has been configured as</span>
-<a name="l00181"></a>00181       <span class="comment">// an OUTPUT pin. Add the new state of the pin to the shadow</span>
-<a name="l00182"></a>00182       writeVal = ( 1 &lt;&lt; pin ) &amp; ~_dirMask;
-<a name="l00183"></a>00183       <span class="keywordflow">if</span> ( level == HIGH )
-<a name="l00184"></a>00184       {
-<a name="l00185"></a>00185          _shadow |= writeVal;
-<a name="l00186"></a>00186                                                       
-<a name="l00187"></a>00187       }
-<a name="l00188"></a>00188       <span class="keywordflow">else</span> 
-<a name="l00189"></a>00189       {
-<a name="l00190"></a>00190          _shadow &amp;= ~writeVal;
-<a name="l00191"></a>00191       }
-<a name="l00192"></a>00192       status = this-&gt;<a class="code" href="class_i2_c_i_o.html#ae2063569c927d0008e2593d14504fdcd">write</a> ( _shadow );
-<a name="l00193"></a>00193    }
-<a name="l00194"></a>00194    <span class="keywordflow">return</span> ( status );
-<a name="l00195"></a>00195 }
-<a name="l00196"></a>00196 
-<a name="l00197"></a>00197 <span class="comment">//</span>
-<a name="l00198"></a>00198 <span class="comment">// PRIVATE METHODS</span>
-<a name="l00199"></a>00199 <span class="comment">// ---------------------------------------------------------------------------</span>
+<a name="l00042"></a>00042 <span class="comment">// CONSTRUCTOR</span>
+<a name="l00043"></a>00043 <span class="comment">// ---------------------------------------------------------------------------</span>
+<a name="l00044"></a><a class="code" href="class_i2_c_i_o.html#a32eb7832075ad6011d67874405a0d0a6">00044</a> <a class="code" href="class_i2_c_i_o.html#a32eb7832075ad6011d67874405a0d0a6">I2CIO::I2CIO</a> ( )
+<a name="l00045"></a>00045 {
+<a name="l00046"></a>00046    _i2cAddr     = 0x0;
+<a name="l00047"></a>00047    _dirMask     = 0xFF;    <span class="comment">// mark all as INPUTs</span>
+<a name="l00048"></a>00048    _shadow      = 0x0;     <span class="comment">// no values set</span>
+<a name="l00049"></a>00049    _initialised = <span class="keyword">false</span>;
+<a name="l00050"></a>00050 }
+<a name="l00051"></a>00051 
+<a name="l00052"></a>00052 <span class="comment">// PUBLIC METHODS</span>
+<a name="l00053"></a>00053 <span class="comment">// ---------------------------------------------------------------------------</span>
+<a name="l00054"></a>00054 
+<a name="l00055"></a>00055 <span class="comment">//</span>
+<a name="l00056"></a>00056 <span class="comment">// begin</span>
+<a name="l00057"></a><a class="code" href="class_i2_c_i_o.html#a6f814653d903dc2ff6e8420eeb7954ae">00057</a> <span class="keywordtype">int</span> <a class="code" href="class_i2_c_i_o.html#a6f814653d903dc2ff6e8420eeb7954ae">I2CIO::begin</a> (  uint8_t i2cAddr )
+<a name="l00058"></a>00058 {
+<a name="l00059"></a>00059    _i2cAddr = i2cAddr;
+<a name="l00060"></a>00060    
+<a name="l00061"></a>00061    Wire.begin ( );
+<a name="l00062"></a>00062       
+<a name="l00063"></a>00063    _initialised = Wire.requestFrom ( _i2cAddr, (uint8_t)1 );
+<a name="l00064"></a>00064 
+<a name="l00065"></a>00065 <span class="preprocessor">#if (ARDUINO &lt;  100)</span>
+<a name="l00066"></a>00066 <span class="preprocessor"></span>   _shadow = Wire.receive ();
+<a name="l00067"></a>00067 <span class="preprocessor">#else</span>
+<a name="l00068"></a>00068 <span class="preprocessor"></span>   _shadow = Wire.read (); <span class="comment">// Remove the byte read don&#39;t need it.</span>
+<a name="l00069"></a>00069 <span class="preprocessor">#endif</span>
+<a name="l00070"></a>00070 <span class="preprocessor"></span>   
+<a name="l00071"></a>00071    <span class="keywordflow">return</span> ( _initialised );
+<a name="l00072"></a>00072 }
+<a name="l00073"></a>00073 
+<a name="l00074"></a>00074 <span class="comment">//</span>
+<a name="l00075"></a>00075 <span class="comment">// pinMode</span>
+<a name="l00076"></a><a class="code" href="class_i2_c_i_o.html#a53b94274eb6bb68564cf5243323db887">00076</a> <span class="keywordtype">void</span> <a class="code" href="class_i2_c_i_o.html#a53b94274eb6bb68564cf5243323db887">I2CIO::pinMode</a> ( uint8_t pin, uint8_t dir )
+<a name="l00077"></a>00077 {
+<a name="l00078"></a>00078    <span class="keywordflow">if</span> ( _initialised )
+<a name="l00079"></a>00079    {
+<a name="l00080"></a>00080       <span class="keywordflow">if</span> ( OUTPUT == dir )
+<a name="l00081"></a>00081       {
+<a name="l00082"></a>00082          _dirMask &amp;= ~( 1 &lt;&lt; pin );
+<a name="l00083"></a>00083       }
+<a name="l00084"></a>00084       <span class="keywordflow">else</span> 
+<a name="l00085"></a>00085       {
+<a name="l00086"></a>00086          _dirMask |= ( 1 &lt;&lt; pin );
+<a name="l00087"></a>00087       }
+<a name="l00088"></a>00088    }
+<a name="l00089"></a>00089 }
+<a name="l00090"></a>00090 
+<a name="l00091"></a>00091 <span class="comment">//</span>
+<a name="l00092"></a>00092 <span class="comment">// portMode</span>
+<a name="l00093"></a><a class="code" href="class_i2_c_i_o.html#a0341888753bc54c4384f5593a870fb34">00093</a> <span class="keywordtype">void</span> <a class="code" href="class_i2_c_i_o.html#a0341888753bc54c4384f5593a870fb34">I2CIO::portMode</a> ( uint8_t dir )
+<a name="l00094"></a>00094 {
+<a name="l00095"></a>00095    
+<a name="l00096"></a>00096    <span class="keywordflow">if</span> ( _initialised )
+<a name="l00097"></a>00097    {
+<a name="l00098"></a>00098       <span class="keywordflow">if</span> ( dir == INPUT )
+<a name="l00099"></a>00099       {
+<a name="l00100"></a>00100          _dirMask = 0xFF;
+<a name="l00101"></a>00101       }
+<a name="l00102"></a>00102       <span class="keywordflow">else</span>
+<a name="l00103"></a>00103       {
+<a name="l00104"></a>00104          _dirMask = 0x00;
+<a name="l00105"></a>00105       }
+<a name="l00106"></a>00106    }
+<a name="l00107"></a>00107 }
+<a name="l00108"></a>00108 
+<a name="l00109"></a>00109 <span class="comment">//</span>
+<a name="l00110"></a>00110 <span class="comment">// read</span>
+<a name="l00111"></a><a class="code" href="class_i2_c_i_o.html#a7a3db7bfc15ede0ae9e8c8bd44290ef7">00111</a> uint8_t <a class="code" href="class_i2_c_i_o.html#a7a3db7bfc15ede0ae9e8c8bd44290ef7">I2CIO::read</a> ( <span class="keywordtype">void</span> )
+<a name="l00112"></a>00112 {
+<a name="l00113"></a>00113    uint8_t retVal = 0;
+<a name="l00114"></a>00114    
+<a name="l00115"></a>00115    <span class="keywordflow">if</span> ( _initialised )
+<a name="l00116"></a>00116    {
+<a name="l00117"></a>00117       Wire.requestFrom ( _i2cAddr, (uint8_t)1 );
+<a name="l00118"></a>00118 <span class="preprocessor">#if (ARDUINO &lt;  100)</span>
+<a name="l00119"></a>00119 <span class="preprocessor"></span>      retVal = ( _dirMask &amp; Wire.receive ( ) );
+<a name="l00120"></a>00120 <span class="preprocessor">#else</span>
+<a name="l00121"></a>00121 <span class="preprocessor"></span>      retVal = ( _dirMask &amp; Wire.read ( ) );
+<a name="l00122"></a>00122 <span class="preprocessor">#endif      </span>
+<a name="l00123"></a>00123 <span class="preprocessor"></span>      
+<a name="l00124"></a>00124    }
+<a name="l00125"></a>00125    <span class="keywordflow">return</span> ( retVal );
+<a name="l00126"></a>00126 }
+<a name="l00127"></a>00127 
+<a name="l00128"></a>00128 <span class="comment">//</span>
+<a name="l00129"></a>00129 <span class="comment">// write</span>
+<a name="l00130"></a><a class="code" href="class_i2_c_i_o.html#ae2063569c927d0008e2593d14504fdcd">00130</a> <span class="keywordtype">int</span> <a class="code" href="class_i2_c_i_o.html#ae2063569c927d0008e2593d14504fdcd">I2CIO::write</a> ( uint8_t value )
+<a name="l00131"></a>00131 {
+<a name="l00132"></a>00132    <span class="keywordtype">int</span> status = 0;
+<a name="l00133"></a>00133    
+<a name="l00134"></a>00134    <span class="keywordflow">if</span> ( _initialised )
+<a name="l00135"></a>00135    {
+<a name="l00136"></a>00136       <span class="comment">// Only write HIGH the values of the ports that have been initialised as</span>
+<a name="l00137"></a>00137       <span class="comment">// outputs updating the output shadow of the device</span>
+<a name="l00138"></a>00138       _shadow = ( value &amp; ~(_dirMask) );
+<a name="l00139"></a>00139    
+<a name="l00140"></a>00140       Wire.beginTransmission ( _i2cAddr );
+<a name="l00141"></a>00141 <span class="preprocessor">#if (ARDUINO &lt;  100)</span>
+<a name="l00142"></a>00142 <span class="preprocessor"></span>      Wire.send ( _shadow );
+<a name="l00143"></a>00143 <span class="preprocessor">#else</span>
+<a name="l00144"></a>00144 <span class="preprocessor"></span>      Wire.write ( _shadow );
+<a name="l00145"></a>00145 <span class="preprocessor">#endif  </span>
+<a name="l00146"></a>00146 <span class="preprocessor"></span>      status = Wire.endTransmission ();
+<a name="l00147"></a>00147    }
+<a name="l00148"></a>00148    <span class="keywordflow">return</span> ( (status == 0) );
+<a name="l00149"></a>00149 }
+<a name="l00150"></a>00150 
+<a name="l00151"></a>00151 <span class="comment">//</span>
+<a name="l00152"></a>00152 <span class="comment">// digitalRead</span>
+<a name="l00153"></a><a class="code" href="class_i2_c_i_o.html#ac26221011a8b49bcea9ef62712ea88a7">00153</a> uint8_t <a class="code" href="class_i2_c_i_o.html#ac26221011a8b49bcea9ef62712ea88a7">I2CIO::digitalRead</a> ( uint8_t pin )
+<a name="l00154"></a>00154 {
+<a name="l00155"></a>00155    uint8_t pinVal = 0;
+<a name="l00156"></a>00156    
+<a name="l00157"></a>00157    <span class="comment">// Check if initialised and that the pin is within range of the device</span>
+<a name="l00158"></a>00158    <span class="comment">// -------------------------------------------------------------------</span>
+<a name="l00159"></a>00159    <span class="keywordflow">if</span> ( ( _initialised ) &amp;&amp; ( pin &lt;= 7 ) )
+<a name="l00160"></a>00160    {
+<a name="l00161"></a>00161       <span class="comment">// Remove the values which are not inputs and get the value of the pin</span>
+<a name="l00162"></a>00162       pinVal = this-&gt;<a class="code" href="class_i2_c_i_o.html#a7a3db7bfc15ede0ae9e8c8bd44290ef7">read</a>() &amp; _dirMask;
+<a name="l00163"></a>00163       pinVal = ( pinVal &gt;&gt; pin ) &amp; 0x01; <span class="comment">// Get the pin value</span>
+<a name="l00164"></a>00164    }
+<a name="l00165"></a>00165    <span class="keywordflow">return</span> (pinVal);
+<a name="l00166"></a>00166 }
+<a name="l00167"></a>00167 
+<a name="l00168"></a>00168 <span class="comment">//</span>
+<a name="l00169"></a>00169 <span class="comment">// digitalWrite</span>
+<a name="l00170"></a><a class="code" href="class_i2_c_i_o.html#a473206162522b847546777d16a7c6dcd">00170</a> <span class="keywordtype">int</span> <a class="code" href="class_i2_c_i_o.html#a473206162522b847546777d16a7c6dcd">I2CIO::digitalWrite</a> ( uint8_t pin, uint8_t level )
+<a name="l00171"></a>00171 {
+<a name="l00172"></a>00172    uint8_t writeVal;
+<a name="l00173"></a>00173    <span class="keywordtype">int</span> status = 0;
+<a name="l00174"></a>00174    
+<a name="l00175"></a>00175    <span class="comment">// Check if initialised and that the pin is within range of the device</span>
+<a name="l00176"></a>00176    <span class="comment">// -------------------------------------------------------------------</span>
+<a name="l00177"></a>00177    <span class="keywordflow">if</span> ( ( _initialised ) &amp;&amp; ( pin &lt;= 7 ) )
+<a name="l00178"></a>00178    {
+<a name="l00179"></a>00179       <span class="comment">// Only write to HIGH the port if the port has been configured as</span>
+<a name="l00180"></a>00180       <span class="comment">// an OUTPUT pin. Add the new state of the pin to the shadow</span>
+<a name="l00181"></a>00181       writeVal = ( 1 &lt;&lt; pin ) &amp; ~_dirMask;
+<a name="l00182"></a>00182       <span class="keywordflow">if</span> ( level == HIGH )
+<a name="l00183"></a>00183       {
+<a name="l00184"></a>00184          _shadow |= writeVal;
+<a name="l00185"></a>00185                                                       
+<a name="l00186"></a>00186       }
+<a name="l00187"></a>00187       <span class="keywordflow">else</span> 
+<a name="l00188"></a>00188       {
+<a name="l00189"></a>00189          _shadow &amp;= ~writeVal;
+<a name="l00190"></a>00190       }
+<a name="l00191"></a>00191       status = this-&gt;<a class="code" href="class_i2_c_i_o.html#ae2063569c927d0008e2593d14504fdcd">write</a> ( _shadow );
+<a name="l00192"></a>00192    }
+<a name="l00193"></a>00193    <span class="keywordflow">return</span> ( status );
+<a name="l00194"></a>00194 }
+<a name="l00195"></a>00195 
+<a name="l00196"></a>00196 <span class="comment">//</span>
+<a name="l00197"></a>00197 <span class="comment">// PRIVATE METHODS</span>
+<a name="l00198"></a>00198 <span class="comment">// ---------------------------------------------------------------------------</span>
 </pre></div></div>
 </div>
 <!-- window showing the filter options -->
 </iframe>
 </div>
 
-<hr class="footer"/><address class="footer"><small>Generated on Sat Feb 18 2012 21:46:46 for LCD Library by&#160;
+<hr class="footer"/><address class="footer"><small>Generated on Sat Feb 18 2012 22:11:26 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>

docs/html/_i2_c_i_o_8h.html

 </div>
 <div class="memdoc">
 
-<p>Definition at line <a class="el" href="_i2_c_i_o_8h_source.html#l00034">34</a> of file <a class="el" href="_i2_c_i_o_8h_source.html">I2CIO.h</a>.</p>
+<p>Definition at line <a class="el" href="_i2_c_i_o_8h_source.html#l00032">32</a> of file <a class="el" href="_i2_c_i_o_8h_source.html">I2CIO.h</a>.</p>
 
 </div>
 </div>
 </iframe>
 </div>
 
-<hr class="footer"/><address class="footer"><small>Generated on Sat Feb 18 2012 21:46:46 for LCD Library by&#160;
+<hr class="footer"/><address class="footer"><small>Generated on Sat Feb 18 2012 22:11:26 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>

docs/html/_i2_c_i_o_8h_source.html

 <a name="l00019"></a>00019 <span class="comment">// read and write uint8_t operations and basic pin level routines to set or read</span>
 <a name="l00020"></a>00020 <span class="comment">// a particular IO port.</span>
 <a name="l00021"></a>00021 <span class="comment">//</span>
-<a name="l00022"></a>00022 <span class="comment">// This library is only compatible with Arduino&#39;s SDK version 1.0</span>
+<a name="l00022"></a>00022 <span class="comment">// @version API 1.0.0</span>
 <a name="l00023"></a>00023 <span class="comment">//</span>
-<a name="l00024"></a>00024 <span class="comment">// @version API 1.0.0</span>
-<a name="l00025"></a>00025 <span class="comment">//</span>
-<a name="l00026"></a>00026 <span class="comment">// @author F. Malpartida - fmalpartida@gmail.com</span>
-<a name="l00027"></a>00027 <span class="comment">// ---------------------------------------------------------------------------</span>
-<a name="l00028"></a>00028 
-<a name="l00029"></a>00029 <span class="preprocessor">#ifndef _I2CIO_H_</span>
-<a name="l00030"></a>00030 <span class="preprocessor"></span><span class="preprocessor">#define _I2CIO_H_</span>
-<a name="l00031"></a>00031 <span class="preprocessor"></span>
-<a name="l00032"></a>00032 <span class="preprocessor">#include &lt;inttypes.h&gt;</span>
-<a name="l00033"></a>00033 
-<a name="l00034"></a><a class="code" href="_i2_c_i_o_8h.html#a218dbde2f6fda8c5825e25da10864c71">00034</a> <span class="preprocessor">#define _I2CIO_VERSION &quot;1.0.0&quot;</span>
-<a name="l00035"></a>00035 <span class="preprocessor"></span>
-<a name="l00043"></a><a class="code" href="class_i2_c_i_o.html">00043</a> <span class="keyword">class </span><a class="code" href="class_i2_c_i_o.html">I2CIO</a>  
-<a name="l00044"></a>00044 {
-<a name="l00045"></a>00045 <span class="keyword">public</span>:
-<a name="l00051"></a>00051    <a class="code" href="class_i2_c_i_o.html#a32eb7832075ad6011d67874405a0d0a6">I2CIO</a> ( );
-<a name="l00052"></a>00052    
-<a name="l00064"></a>00064    <span class="keywordtype">int</span> <a class="code" href="class_i2_c_i_o.html#a6f814653d903dc2ff6e8420eeb7954ae">begin</a> ( uint8_t i2cAddr );
-<a name="l00065"></a>00065    
-<a name="l00075"></a>00075    <span class="keywordtype">void</span> <a class="code" href="class_i2_c_i_o.html#a53b94274eb6bb68564cf5243323db887">pinMode</a> ( uint8_t pin, uint8_t dir );
-<a name="l00076"></a>00076    
-<a name="l00085"></a>00085    <span class="keywordtype">void</span> <a class="code" href="class_i2_c_i_o.html#a0341888753bc54c4384f5593a870fb34">portMode</a> ( uint8_t dir );
-<a name="l00086"></a>00086    
-<a name="l00096"></a>00096    uint8_t <a class="code" href="class_i2_c_i_o.html#a7a3db7bfc15ede0ae9e8c8bd44290ef7">read</a> ( <span class="keywordtype">void</span> );
-<a name="l00097"></a>00097    
-<a name="l00110"></a>00110    uint8_t <a class="code" href="class_i2_c_i_o.html#ac26221011a8b49bcea9ef62712ea88a7">digitalRead</a> ( uint8_t pin );
-<a name="l00111"></a>00111    
-<a name="l00125"></a>00125    <span class="keywordtype">int</span> <a class="code" href="class_i2_c_i_o.html#ae2063569c927d0008e2593d14504fdcd">write</a> ( uint8_t value );
-<a name="l00126"></a>00126    
-<a name="l00138"></a>00138    <span class="keywordtype">int</span> <a class="code" href="class_i2_c_i_o.html#a473206162522b847546777d16a7c6dcd">digitalWrite</a> ( uint8_t pin, uint8_t level );
+<a name="l00024"></a>00024 <span class="comment">// @author F. Malpartida - fmalpartida@gmail.com</span>
+<a name="l00025"></a>00025 <span class="comment">// ---------------------------------------------------------------------------</span>
+<a name="l00026"></a>00026 
+<a name="l00027"></a>00027 <span class="preprocessor">#ifndef _I2CIO_H_</span>
+<a name="l00028"></a>00028 <span class="preprocessor"></span><span class="preprocessor">#define _I2CIO_H_</span>
+<a name="l00029"></a>00029 <span class="preprocessor"></span>
+<a name="l00030"></a>00030 <span class="preprocessor">#include &lt;inttypes.h&gt;</span>
+<a name="l00031"></a>00031 
+<a name="l00032"></a><a class="code" href="_i2_c_i_o_8h.html#a218dbde2f6fda8c5825e25da10864c71">00032</a> <span class="preprocessor">#define _I2CIO_VERSION &quot;1.0.0&quot;</span>
+<a name="l00033"></a>00033 <span class="preprocessor"></span>
+<a name="l00041"></a><a class="code" href="class_i2_c_i_o.html">00041</a> <span class="keyword">class </span><a class="code" href="class_i2_c_i_o.html">I2CIO</a>  
+<a name="l00042"></a>00042 {
+<a name="l00043"></a>00043 <span class="keyword">public</span>:
+<a name="l00049"></a>00049    <a class="code" href="class_i2_c_i_o.html#a32eb7832075ad6011d67874405a0d0a6">I2CIO</a> ( );
+<a name="l00050"></a>00050    
+<a name="l00062"></a>00062    <span class="keywordtype">int</span> <a class="code" href="class_i2_c_i_o.html#a6f814653d903dc2ff6e8420eeb7954ae">begin</a> ( uint8_t i2cAddr );
+<a name="l00063"></a>00063    
+<a name="l00073"></a>00073    <span class="keywordtype">void</span> <a class="code" href="class_i2_c_i_o.html#a53b94274eb6bb68564cf5243323db887">pinMode</a> ( uint8_t pin, uint8_t dir );
+<a name="l00074"></a>00074    
+<a name="l00083"></a>00083    <span class="keywordtype">void</span> <a class="code" href="class_i2_c_i_o.html#a0341888753bc54c4384f5593a870fb34">portMode</a> ( uint8_t dir );
+<a name="l00084"></a>00084    
+<a name="l00094"></a>00094    uint8_t <a class="code" href="class_i2_c_i_o.html#a7a3db7bfc15ede0ae9e8c8bd44290ef7">read</a> ( <span class="keywordtype">void</span> );
+<a name="l00095"></a>00095    
+<a name="l00108"></a>00108    uint8_t <a class="code" href="class_i2_c_i_o.html#ac26221011a8b49bcea9ef62712ea88a7">digitalRead</a> ( uint8_t pin );
+<a name="l00109"></a>00109    
+<a name="l00123"></a>00123    <span class="keywordtype">int</span> <a class="code" href="class_i2_c_i_o.html#ae2063569c927d0008e2593d14504fdcd">write</a> ( uint8_t value );
+<a name="l00124"></a>00124    
+<a name="l00136"></a>00136    <span class="keywordtype">int</span> <a class="code" href="class_i2_c_i_o.html#a473206162522b847546777d16a7c6dcd">digitalWrite</a> ( uint8_t pin, uint8_t level );
+<a name="l00137"></a>00137    
+<a name="l00138"></a>00138    
 <a name="l00139"></a>00139    
-<a name="l00140"></a>00140    
-<a name="l00141"></a>00141    
-<a name="l00142"></a>00142 <span class="keyword">private</span>:
-<a name="l00143"></a>00143    uint8_t _shadow;      <span class="comment">// Shadow output</span>
-<a name="l00144"></a>00144    uint8_t _dirMask;     <span class="comment">// Direction mask</span>
-<a name="l00145"></a>00145    uint8_t _i2cAddr;     <span class="comment">// I2C address</span>
-<a name="l00146"></a>00146    <span class="keywordtype">bool</span>    _initialised; <span class="comment">// Initialised object</span>
-<a name="l00147"></a>00147    
-<a name="l00148"></a>00148 };
-<a name="l00149"></a>00149 
-<a name="l00150"></a>00150 <span class="preprocessor">#endif</span>
+<a name="l00140"></a>00140 <span class="keyword">private</span>:
+<a name="l00141"></a>00141    uint8_t _shadow;      <span class="comment">// Shadow output</span>
+<a name="l00142"></a>00142    uint8_t _dirMask;     <span class="comment">// Direction mask</span>
+<a name="l00143"></a>00143    uint8_t _i2cAddr;     <span class="comment">// I2C address</span>
+<a name="l00144"></a>00144    <span class="keywordtype">bool</span>    _initialised; <span class="comment">// Initialised object</span>
+<a name="l00145"></a>00145    
+<a name="l00146"></a>00146 };
+<a name="l00147"></a>00147 
+<a name="l00148"></a>00148 <span class="preprocessor">#endif</span>
 </pre></div></div>
 </div>
 <!-- window showing the filter options -->
 </iframe>
 </div>
 
-<hr class="footer"/><address class="footer"><small>Generated on Sat Feb 18 2012 21:46:46 for LCD Library by&#160;
+<hr class="footer"/><address class="footer"><small>Generated on Sat Feb 18 2012 22:11:26 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>

docs/html/_l_c_d_8cpp.html

 </iframe>
 </div>
 
-<hr class="footer"/><address class="footer"><small>Generated on Sat Feb 18 2012 21:46:46 for LCD Library by&#160;
+<hr class="footer"/><address class="footer"><small>Generated on Sat Feb 18 2012 22:11:26 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>

docs/html/_l_c_d_8cpp_source.html

 <a name="l00027"></a>00027 <span class="comment">// backpacks such as the I2CLCDextraIO using the PCF8574* I2C IO Expander ASIC.</span>
 <a name="l00028"></a>00028 <span class="comment">//</span>
 <a name="l00029"></a>00029 <span class="comment">//</span>
-<a name="l00030"></a>00030 <span class="comment">// @version API 1.0.0</span>
+<a name="l00030"></a>00030 <span class="comment">// @version API 1.1.0</span>
 <a name="l00031"></a>00031 <span class="comment">//</span>
 <a name="l00032"></a>00032 <span class="comment">// @author F. Malpartida - fmalpartida@gmail.com</span>
 <a name="l00033"></a>00033 <span class="comment">// ---------------------------------------------------------------------------</span>
 </iframe>
 </div>
 
-<hr class="footer"/><address class="footer"><small>Generated on Sat Feb 18 2012 21:46:46 for LCD Library by&#160;
+<hr class="footer"/><address class="footer"><small>Generated on Sat Feb 18 2012 22:11:26 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>

docs/html/_l_c_d_8h.html

 </iframe>
 </div>
 
-<hr class="footer"/><address class="footer"><small>Generated on Sat Feb 18 2012 21:46:46 for LCD Library by&#160;
+<hr class="footer"/><address class="footer"><small>Generated on Sat Feb 18 2012 22:11:26 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>

docs/html/_l_c_d_8h_source.html

 <a name="l00026"></a>00026 <span class="comment">// it has been extended to drive 4 and 8 bit mode control, LCDs and I2C extension</span>
 <a name="l00027"></a>00027 <span class="comment">// backpacks such as the I2CLCDextraIO using the PCF8574* I2C IO Expander ASIC.</span>
 <a name="l00028"></a>00028 <span class="comment">//</span>
-<a name="l00029"></a>00029 <span class="comment">// @version API 1.0.0</span>
+<a name="l00029"></a>00029 <span class="comment">// @version API 1.1.0</span>
 <a name="l00030"></a>00030 <span class="comment">//</span>
 <a name="l00031"></a>00031 <span class="comment">//</span>
 <a name="l00032"></a>00032 <span class="comment">// @author F. Malpartida - fmalpartida@gmail.com</span>
 </iframe>
 </div>
 
-<hr class="footer"/><address class="footer"><small>Generated on Sat Feb 18 2012 21:46:46 for LCD Library by&#160;
+<hr class="footer"/><address class="footer"><small>Generated on Sat Feb 18 2012 22:11:26 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>

docs/html/_liquid_crystal_8cpp.html

 </div>
 <div class="memdoc">
 
-<p>Definition at line <a class="el" href="_liquid_crystal_8cpp_source.html#l00045">45</a> of file <a class="el" href="_liquid_crystal_8cpp_source.html">LiquidCrystal.cpp</a>.</p>
+<p>Definition at line <a class="el" href="_liquid_crystal_8cpp_source.html#l00042">42</a> of file <a class="el" href="_liquid_crystal_8cpp_source.html">LiquidCrystal.cpp</a>.</p>
 
 </div>
 </div>
 </iframe>
 </div>
 
-<hr class="footer"/><address class="footer"><small>Generated on Sat Feb 18 2012 21:46:46 for LCD Library by&#160;
+<hr class="footer"/><address class="footer"><small>Generated on Sat Feb 18 2012 22:11:26 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>

docs/html/_liquid_crystal_8cpp_source.html

 <a name="l00024"></a>00024 <span class="comment">// to the original functionality of the Arduino LiquidCrystal library.</span>
 <a name="l00025"></a>00025 <span class="comment">//</span>
 <a name="l00026"></a>00026 <span class="comment">//</span>
-<a name="l00027"></a>00027 <span class="comment">// This library is only compatible with Arduino&#39;s SDK version 1.0</span>
-<a name="l00028"></a>00028 <span class="comment">//</span>
-<a name="l00029"></a>00029 <span class="comment">//</span>
-<a name="l00030"></a>00030 <span class="comment">// @author F. Malpartida - fmalpartida@gmail.com</span>
-<a name="l00031"></a>00031 <span class="comment">// ---------------------------------------------------------------------------</span>
-<a name="l00032"></a>00032 <span class="preprocessor">#include &lt;stdio.h&gt;</span>
-<a name="l00033"></a>00033 <span class="preprocessor">#include &lt;string.h&gt;</span>
-<a name="l00034"></a>00034 <span class="preprocessor">#include &lt;inttypes.h&gt;</span>
-<a name="l00035"></a>00035 
-<a name="l00036"></a>00036 <span class="preprocessor">#if (ARDUINO &lt;  100)</span>
-<a name="l00037"></a>00037 <span class="preprocessor"></span><span class="preprocessor">#include &lt;WProgram.h&gt;</span>
-<a name="l00038"></a>00038 <span class="preprocessor">#else</span>
-<a name="l00039"></a>00039 <span class="preprocessor"></span><span class="preprocessor">#include &lt;Arduino.h&gt;</span>
-<a name="l00040"></a>00040 <span class="preprocessor">#endif</span>
-<a name="l00041"></a>00041 <span class="preprocessor"></span><span class="preprocessor">#include &lt;<a class="code" href="_liquid_crystal_8h.html">LiquidCrystal.h</a>&gt;</span>
-<a name="l00042"></a>00042 
-<a name="l00043"></a>00043 <span class="comment">// CONSTANT  definitions</span>
-<a name="l00044"></a>00044 <span class="comment">// ---------------------------------------------------------------------------</span>
-<a name="l00045"></a><a class="code" href="_liquid_crystal_8cpp.html#a65fa786d6e31fe8b1aa51784a9736581">00045</a> <span class="preprocessor">#define LCD_NOBACKLIGHT 0xFF</span>
-<a name="l00046"></a>00046 <span class="preprocessor"></span>
-<a name="l00047"></a>00047 <span class="comment">// STATIC helper functions</span>
-<a name="l00048"></a>00048 <span class="comment">// ---------------------------------------------------------------------------</span>
-<a name="l00049"></a>00049 
-<a name="l00050"></a>00050 
-<a name="l00051"></a>00051 <span class="comment">// CONSTRUCTORS</span>
-<a name="l00052"></a>00052 <span class="comment">// ---------------------------------------------------------------------------</span>
-<a name="l00053"></a><a class="code" href="class_liquid_crystal.html#a30e3d865c4b4a003a36cb45903f93644">00053</a> <a class="code" href="class_liquid_crystal.html#a49d2bd8d26031a1c83bcbd73978a1686">LiquidCrystal::LiquidCrystal</a>(uint8_t rs, uint8_t rw, uint8_t enable,
-<a name="l00054"></a>00054                              uint8_t d0, uint8_t d1, uint8_t d2, uint8_t d3,
-<a name="l00055"></a>00055                              uint8_t d4, uint8_t d5, uint8_t d6, uint8_t d7)
-<a name="l00056"></a>00056 {
-<a name="l00057"></a>00057    init(<a class="code" href="_l_c_d_8h.html#a57d84af8cf61ceee4eb91db77889f071">LCD_8BIT</a>, rs, rw, enable, d0, d1, d2, d3, d4, d5, d6, d7);
-<a name="l00058"></a>00058 }
-<a name="l00059"></a>00059 
-<a name="l00060"></a><a class="code" href="class_liquid_crystal.html#a49d2bd8d26031a1c83bcbd73978a1686">00060</a> <a class="code" href="class_liquid_crystal.html#a49d2bd8d26031a1c83bcbd73978a1686">LiquidCrystal::LiquidCrystal</a>(uint8_t rs, uint8_t enable,
-<a name="l00061"></a>00061                              uint8_t d0, uint8_t d1, uint8_t d2, uint8_t d3,
-<a name="l00062"></a>00062                              uint8_t d4, uint8_t d5, uint8_t d6, uint8_t d7)
-<a name="l00063"></a>00063 {
-<a name="l00064"></a>00064    init(<a class="code" href="_l_c_d_8h.html#a57d84af8cf61ceee4eb91db77889f071">LCD_8BIT</a>, rs, 255, enable, d0, d1, d2, d3, d4, d5, d6, d7);
-<a name="l00065"></a>00065 }
-<a name="l00066"></a>00066 
-<a name="l00067"></a><a class="code" href="class_liquid_crystal.html#a0a0a8dfa7a2e775a031fd65f5c6366ec">00067</a> <a class="code" href="class_liquid_crystal.html#a49d2bd8d26031a1c83bcbd73978a1686">LiquidCrystal::LiquidCrystal</a>(uint8_t rs, uint8_t rw, uint8_t enable,
-<a name="l00068"></a>00068                              uint8_t d0, uint8_t d1, uint8_t d2, uint8_t d3)
-<a name="l00069"></a>00069 {
-<a name="l00070"></a>00070    init(<a class="code" href="_l_c_d_8h.html#a31e1c14e8c2845dec3301f0ebd36b43c">LCD_4BIT</a>, rs, rw, enable, d0, d1, d2, d3, 0, 0, 0, 0);
-<a name="l00071"></a>00071 }
-<a name="l00072"></a>00072 
-<a name="l00073"></a><a class="code" href="class_liquid_crystal.html#a23124e6dd5ac4a9b6147629b96e91953">00073</a> <a class="code" href="class_liquid_crystal.html#a49d2bd8d26031a1c83bcbd73978a1686">LiquidCrystal::LiquidCrystal</a>(uint8_t rs,  uint8_t enable,
-<a name="l00074"></a>00074                              uint8_t d0, uint8_t d1, uint8_t d2, uint8_t d3)
-<a name="l00075"></a>00075 {
-<a name="l00076"></a>00076    init(<a class="code" href="_l_c_d_8h.html#a31e1c14e8c2845dec3301f0ebd36b43c">LCD_4BIT</a>, rs, 255, enable, d0, d1, d2, d3, 0, 0, 0, 0);
-<a name="l00077"></a>00077 }
-<a name="l00078"></a>00078 
-<a name="l00079"></a>00079 
+<a name="l00027"></a>00027 <span class="comment">// @author F. Malpartida - fmalpartida@gmail.com</span>
+<a name="l00028"></a>00028 <span class="comment">// ---------------------------------------------------------------------------</span>
+<a name="l00029"></a>00029 <span class="preprocessor">#include &lt;stdio.h&gt;</span>
+<a name="l00030"></a>00030 <span class="preprocessor">#include &lt;string.h&gt;</span>
+<a name="l00031"></a>00031 <span class="preprocessor">#include &lt;inttypes.h&gt;</span>
+<a name="l00032"></a>00032 
+<a name="l00033"></a>00033 <span class="preprocessor">#if (ARDUINO &lt;  100)</span>
+<a name="l00034"></a>00034 <span class="preprocessor"></span><span class="preprocessor">#include &lt;WProgram.h&gt;</span>
+<a name="l00035"></a>00035 <span class="preprocessor">#else</span>
+<a name="l00036"></a>00036 <span class="preprocessor"></span><span class="preprocessor">#include &lt;Arduino.h&gt;</span>
+<a name="l00037"></a>00037 <span class="preprocessor">#endif</span>
+<a name="l00038"></a>00038 <span class="preprocessor"></span><span class="preprocessor">#include &lt;<a class="code" href="_liquid_crystal_8h.html">LiquidCrystal.h</a>&gt;</span>
+<a name="l00039"></a>00039 
+<a name="l00040"></a>00040 <span class="comment">// CONSTANT  definitions</span>
+<a name="l00041"></a>00041 <span class="comment">// ---------------------------------------------------------------------------</span>
+<a name="l00042"></a><a class="code" href="_liquid_crystal_8cpp.html#a65fa786d6e31fe8b1aa51784a9736581">00042</a> <span class="preprocessor">#define LCD_NOBACKLIGHT 0xFF</span>
+<a name="l00043"></a>00043 <span class="preprocessor"></span>
+<a name="l00044"></a>00044 <span class="comment">// STATIC helper functions</span>
+<a name="l00045"></a>00045 <span class="comment">// ---------------------------------------------------------------------------</span>
+<a name="l00046"></a>00046 
+<a name="l00047"></a>00047 
+<a name="l00048"></a>00048 <span class="comment">// CONSTRUCTORS</span>
+<a name="l00049"></a>00049 <span class="comment">// ---------------------------------------------------------------------------</span>
+<a name="l00050"></a><a class="code" href="class_liquid_crystal.html#a30e3d865c4b4a003a36cb45903f93644">00050</a> <a class="code" href="class_liquid_crystal.html#a49d2bd8d26031a1c83bcbd73978a1686">LiquidCrystal::LiquidCrystal</a>(uint8_t rs, uint8_t rw, uint8_t enable,
+<a name="l00051"></a>00051                              uint8_t d0, uint8_t d1, uint8_t d2, uint8_t d3,
+<a name="l00052"></a>00052                              uint8_t d4, uint8_t d5, uint8_t d6, uint8_t d7)
+<a name="l00053"></a>00053 {
+<a name="l00054"></a>00054    init(<a class="code" href="_l_c_d_8h.html#a57d84af8cf61ceee4eb91db77889f071">LCD_8BIT</a>, rs, rw, enable, d0, d1, d2, d3, d4, d5, d6, d7);
+<a name="l00055"></a>00055 }
+<a name="l00056"></a>00056 
+<a name="l00057"></a><a class="code" href="class_liquid_crystal.html#a49d2bd8d26031a1c83bcbd73978a1686">00057</a> <a class="code" href="class_liquid_crystal.html#a49d2bd8d26031a1c83bcbd73978a1686">LiquidCrystal::LiquidCrystal</a>(uint8_t rs, uint8_t enable,
+<a name="l00058"></a>00058                              uint8_t d0, uint8_t d1, uint8_t d2, uint8_t d3,
+<a name="l00059"></a>00059                              uint8_t d4, uint8_t d5, uint8_t d6, uint8_t d7)
+<a name="l00060"></a>00060 {
+<a name="l00061"></a>00061    init(<a class="code" href="_l_c_d_8h.html#a57d84af8cf61ceee4eb91db77889f071">LCD_8BIT</a>, rs, 255, enable, d0, d1, d2, d3, d4, d5, d6, d7);
+<a name="l00062"></a>00062 }
+<a name="l00063"></a>00063 
+<a name="l00064"></a><a class="code" href="class_liquid_crystal.html#a0a0a8dfa7a2e775a031fd65f5c6366ec">00064</a> <a class="code" href="class_liquid_crystal.html#a49d2bd8d26031a1c83bcbd73978a1686">LiquidCrystal::LiquidCrystal</a>(uint8_t rs, uint8_t rw, uint8_t enable,
+<a name="l00065"></a>00065                              uint8_t d0, uint8_t d1, uint8_t d2, uint8_t d3)
+<a name="l00066"></a>00066 {
+<a name="l00067"></a>00067    init(<a class="code" href="_l_c_d_8h.html#a31e1c14e8c2845dec3301f0ebd36b43c">LCD_4BIT</a>, rs, rw, enable, d0, d1, d2, d3, 0, 0, 0, 0);
+<a name="l00068"></a>00068 }
+<a name="l00069"></a>00069 
+<a name="l00070"></a><a class="code" href="class_liquid_crystal.html#a23124e6dd5ac4a9b6147629b96e91953">00070</a> <a class="code" href="class_liquid_crystal.html#a49d2bd8d26031a1c83bcbd73978a1686">LiquidCrystal::LiquidCrystal</a>(uint8_t rs,  uint8_t enable,
+<a name="l00071"></a>00071                              uint8_t d0, uint8_t d1, uint8_t d2, uint8_t d3)
+<a name="l00072"></a>00072 {
+<a name="l00073"></a>00073    init(<a class="code" href="_l_c_d_8h.html#a31e1c14e8c2845dec3301f0ebd36b43c">LCD_4BIT</a>, rs, 255, enable, d0, d1, d2, d3, 0, 0, 0, 0);
+<a name="l00074"></a>00074 }
+<a name="l00075"></a>00075 
+<a name="l00076"></a>00076 
+<a name="l00077"></a>00077 
+<a name="l00078"></a>00078 <span class="comment">// PUBLIC METHODS</span>
+<a name="l00079"></a>00079 <span class="comment">// ---------------------------------------------------------------------------</span>
 <a name="l00080"></a>00080 
-<a name="l00081"></a>00081 <span class="comment">// PUBLIC METHODS</span>
-<a name="l00082"></a>00082 <span class="comment">// ---------------------------------------------------------------------------</span>
-<a name="l00083"></a>00083 
-<a name="l00084"></a>00084 <span class="comment">/************ low level data pushing commands **********/</span>
-<a name="l00085"></a>00085 
-<a name="l00086"></a>00086 <span class="comment">// send</span>
-<a name="l00087"></a><a class="code" href="class_liquid_crystal.html#a56142f8b3753bedd133e4139e5eb5089">00087</a> <span class="keywordtype">void</span> <a class="code" href="class_liquid_crystal.html#a56142f8b3753bedd133e4139e5eb5089">LiquidCrystal::send</a>(uint8_t value, uint8_t mode) 
-<a name="l00088"></a>00088 {
-<a name="l00089"></a>00089    digitalWrite( _rs_pin, mode );
-<a name="l00090"></a>00090    
-<a name="l00091"></a>00091    <span class="comment">// if there is a RW pin indicated, set it low to Write</span>
-<a name="l00092"></a>00092    <span class="comment">// ---------------------------------------------------</span>
-<a name="l00093"></a>00093    <span class="keywordflow">if</span> (_rw_pin != 255) 
-<a name="l00094"></a>00094    { 
-<a name="l00095"></a>00095       digitalWrite(_rw_pin, LOW);
-<a name="l00096"></a>00096    }
-<a name="l00097"></a>00097    
-<a name="l00098"></a>00098    <span class="keywordflow">if</span> (<a class="code" href="class_l_c_d.html#aef093ba3f8e1016267b40ac235a0fa0f">_displayfunction</a> &amp; <a class="code" href="_l_c_d_8h.html#a59a57ca857dae5d89eb5f2a38c4ac6f0">LCD_8BITMODE</a>)
-<a name="l00099"></a>00099    {
-<a name="l00100"></a>00100       writeNbits(value, 8); 
-<a name="l00101"></a>00101    } 
-<a name="l00102"></a>00102    <span class="keywordflow">else</span> 
-<a name="l00103"></a>00103    {
-<a name="l00104"></a>00104       writeNbits ( value &gt;&gt; 4, 4 );
-<a name="l00105"></a>00105       writeNbits ( value, 4 );
-<a name="l00106"></a>00106    }
-<a name="l00107"></a>00107    <a class="code" href="_l_c_d_8h.html#a6eac41e4be58d7736ac0c19de225c0dc">waitUsec</a> ( <a class="code" href="_liquid_crystal_8h.html#adebff0f00a59c9f9863bc196938d5726">EXEC_TIME</a> ); <span class="comment">// wait for the command to execute by the LCD</span>
-<a name="l00108"></a>00108 }
-<a name="l00109"></a>00109 
-<a name="l00110"></a>00110 <span class="comment">//</span>
-<a name="l00111"></a>00111 <span class="comment">// setBackligh</span>
-<a name="l00112"></a><a class="code" href="class_liquid_crystal.html#a170c6ed996f3e84bf63dcd5cb1471428">00112</a> <span class="keywordtype">void</span> <a class="code" href="class_liquid_crystal.html#a170c6ed996f3e84bf63dcd5cb1471428">LiquidCrystal::setBacklight</a> ( uint8_t mode )
-<a name="l00113"></a>00113 {
-<a name="l00114"></a>00114    <span class="keywordflow">if</span> ( _backlightPin != <a class="code" href="_liquid_crystal_8cpp.html#a65fa786d6e31fe8b1aa51784a9736581">LCD_NOBACKLIGHT</a> )
-<a name="l00115"></a>00115    {
-<a name="l00116"></a>00116       digitalWrite ( _backlightPin, mode );
-<a name="l00117"></a>00117    }
-<a name="l00118"></a>00118 }
-<a name="l00119"></a>00119 
-<a name="l00120"></a>00120 <span class="comment">//</span>
-<a name="l00121"></a>00121 <span class="comment">// setBacklightPin</span>
-<a name="l00122"></a><a class="code" href="class_liquid_crystal.html#aa78ed97905615b34e685170c086e3d9d">00122</a> <span class="keywordtype">void</span> <a class="code" href="class_liquid_crystal.html#aa78ed97905615b34e685170c086e3d9d">LiquidCrystal::setBacklightPin</a> ( uint8_t pin )
-<a name="l00123"></a>00123 {
-<a name="l00124"></a>00124    pinMode ( pin, OUTPUT ); <span class="comment">// Difine the backlight pin as output</span>
-<a name="l00125"></a>00125    _backlightPin = pin;
-<a name="l00126"></a>00126 }
+<a name="l00081"></a>00081 <span class="comment">/************ low level data pushing commands **********/</span>
+<a name="l00082"></a>00082 
+<a name="l00083"></a>00083 <span class="comment">// send</span>
+<a name="l00084"></a><a class="code" href="class_liquid_crystal.html#a56142f8b3753bedd133e4139e5eb5089">00084</a> <span class="keywordtype">void</span> <a class="code" href="class_liquid_crystal.html#a56142f8b3753bedd133e4139e5eb5089">LiquidCrystal::send</a>(uint8_t value, uint8_t mode) 
+<a name="l00085"></a>00085 {
+<a name="l00086"></a>00086    digitalWrite( _rs_pin, mode );
+<a name="l00087"></a>00087    
+<a name="l00088"></a>00088    <span class="comment">// if there is a RW pin indicated, set it low to Write</span>
+<a name="l00089"></a>00089    <span class="comment">// ---------------------------------------------------</span>
+<a name="l00090"></a>00090    <span class="keywordflow">if</span> (_rw_pin != 255) 
+<a name="l00091"></a>00091    { 
+<a name="l00092"></a>00092       digitalWrite(_rw_pin, LOW);
+<a name="l00093"></a>00093    }
+<a name="l00094"></a>00094    
+<a name="l00095"></a>00095    <span class="keywordflow">if</span> (<a class="code" href="class_l_c_d.html#aef093ba3f8e1016267b40ac235a0fa0f">_displayfunction</a> &amp; <a class="code" href="_l_c_d_8h.html#a59a57ca857dae5d89eb5f2a38c4ac6f0">LCD_8BITMODE</a>)
+<a name="l00096"></a>00096    {
+<a name="l00097"></a>00097       writeNbits(value, 8); 
+<a name="l00098"></a>00098    } 
+<a name="l00099"></a>00099    <span class="keywordflow">else</span> 
+<a name="l00100"></a>00100    {
+<a name="l00101"></a>00101       writeNbits ( value &gt;&gt; 4, 4 );
+<a name="l00102"></a>00102       writeNbits ( value, 4 );
+<a name="l00103"></a>00103    }
+<a name="l00104"></a>00104    <a class="code" href="_l_c_d_8h.html#a6eac41e4be58d7736ac0c19de225c0dc">waitUsec</a> ( <a class="code" href="_liquid_crystal_8h.html#adebff0f00a59c9f9863bc196938d5726">EXEC_TIME</a> ); <span class="comment">// wait for the command to execute by the LCD</span>
+<a name="l00105"></a>00105 }
+<a name="l00106"></a>00106 
+<a name="l00107"></a>00107 <span class="comment">//</span>
+<a name="l00108"></a>00108 <span class="comment">// setBackligh</span>
+<a name="l00109"></a><a class="code" href="class_liquid_crystal.html#a170c6ed996f3e84bf63dcd5cb1471428">00109</a> <span class="keywordtype">void</span> <a class="code" href="class_liquid_crystal.html#a170c6ed996f3e84bf63dcd5cb1471428">LiquidCrystal::setBacklight</a> ( uint8_t mode )
+<a name="l00110"></a>00110 {
+<a name="l00111"></a>00111    <span class="keywordflow">if</span> ( _backlightPin != <a class="code" href="_liquid_crystal_8cpp.html#a65fa786d6e31fe8b1aa51784a9736581">LCD_NOBACKLIGHT</a> )
+<a name="l00112"></a>00112    {
+<a name="l00113"></a>00113       digitalWrite ( _backlightPin, mode );
+<a name="l00114"></a>00114    }
+<a name="l00115"></a>00115 }
+<a name="l00116"></a>00116 
+<a name="l00117"></a>00117 <span class="comment">//</span>
+<a name="l00118"></a>00118 <span class="comment">// setBacklightPin</span>
+<a name="l00119"></a><a class="code" href="class_liquid_crystal.html#aa78ed97905615b34e685170c086e3d9d">00119</a> <span class="keywordtype">void</span> <a class="code" href="class_liquid_crystal.html#aa78ed97905615b34e685170c086e3d9d">LiquidCrystal::setBacklightPin</a> ( uint8_t pin )
+<a name="l00120"></a>00120 {
+<a name="l00121"></a>00121    pinMode ( pin, OUTPUT ); <span class="comment">// Difine the backlight pin as output</span>
+<a name="l00122"></a>00122    _backlightPin = pin;
+<a name="l00123"></a>00123 }
+<a name="l00124"></a>00124 
+<a name="l00125"></a>00125 <span class="comment">// PRIVATE METHODS</span>
+<a name="l00126"></a>00126 <span class="comment">// ---------------------------------------------------------------------------</span>
 <a name="l00127"></a>00127 
-<a name="l00128"></a>00128 <span class="comment">// PRIVATE METHODS</span>
-<a name="l00129"></a>00129 <span class="comment">// ---------------------------------------------------------------------------</span>
-<a name="l00130"></a>00130 
-<a name="l00131"></a>00131 
-<a name="l00132"></a>00132 <span class="comment">// init</span>
-<a name="l00133"></a>00133 <span class="keywordtype">void</span> LiquidCrystal::init(uint8_t fourbitmode, uint8_t rs, uint8_t rw, uint8_t enable,
-<a name="l00134"></a>00134                          uint8_t d0, uint8_t d1, uint8_t d2, uint8_t d3,
-<a name="l00135"></a>00135                          uint8_t d4, uint8_t d5, uint8_t d6, uint8_t d7)
-<a name="l00136"></a>00136 {
-<a name="l00137"></a>00137    uint8_t i;
+<a name="l00128"></a>00128 
+<a name="l00129"></a>00129 <span class="comment">// init</span>
+<a name="l00130"></a>00130 <span class="keywordtype">void</span> LiquidCrystal::init(uint8_t fourbitmode, uint8_t rs, uint8_t rw, uint8_t enable,
+<a name="l00131"></a>00131                          uint8_t d0, uint8_t d1, uint8_t d2, uint8_t d3,
+<a name="l00132"></a>00132                          uint8_t d4, uint8_t d5, uint8_t d6, uint8_t d7)
+<a name="l00133"></a>00133 {
+<a name="l00134"></a>00134    uint8_t i;
+<a name="l00135"></a>00135    
+<a name="l00136"></a>00136    <span class="comment">// Initialize the IO pins</span>
+<a name="l00137"></a>00137    <span class="comment">// -----------------------</span>
 <a name="l00138"></a>00138    
-<a name="l00139"></a>00139    <span class="comment">// Initialize the IO pins</span>
-<a name="l00140"></a>00140    <span class="comment">// -----------------------</span>
-<a name="l00141"></a>00141    
-<a name="l00142"></a>00142    _rs_pin = rs;
-<a name="l00143"></a>00143    _rw_pin = rw;
-<a name="l00144"></a>00144    _enable_pin = enable;
-<a name="l00145"></a>00145    
-<a name="l00146"></a>00146    _data_pins[0] = d0;
-<a name="l00147"></a>00147    _data_pins[1] = d1;
-<a name="l00148"></a>00148    _data_pins[2] = d2;
-<a name="l00149"></a>00149    _data_pins[3] = d3; 
-<a name="l00150"></a>00150    _data_pins[4] = d4;
-<a name="l00151"></a>00151    _data_pins[5] = d5;
-<a name="l00152"></a>00152    _data_pins[6] = d6;
-<a name="l00153"></a>00153    _data_pins[7] = d7;
+<a name="l00139"></a>00139    _rs_pin = rs;
+<a name="l00140"></a>00140    _rw_pin = rw;
+<a name="l00141"></a>00141    _enable_pin = enable;
+<a name="l00142"></a>00142    
+<a name="l00143"></a>00143    _data_pins[0] = d0;
+<a name="l00144"></a>00144    _data_pins[1] = d1;
+<a name="l00145"></a>00145    _data_pins[2] = d2;
+<a name="l00146"></a>00146    _data_pins[3] = d3; 
+<a name="l00147"></a>00147    _data_pins[4] = d4;
+<a name="l00148"></a>00148    _data_pins[5] = d5;
+<a name="l00149"></a>00149    _data_pins[6] = d6;
+<a name="l00150"></a>00150    _data_pins[7] = d7;
+<a name="l00151"></a>00151    
+<a name="l00152"></a>00152    <span class="comment">// Initialize the IO port direction to OUTPUT</span>
+<a name="l00153"></a>00153    <span class="comment">// ------------------------------------------</span>
 <a name="l00154"></a>00154    
-<a name="l00155"></a>00155    <span class="comment">// Initialize the IO port direction to OUTPUT</span>
-<a name="l00156"></a>00156    <span class="comment">// ------------------------------------------</span>
-<a name="l00157"></a>00157    
-<a name="l00158"></a>00158    <span class="keywordflow">for</span> ( i = 0; i &lt; 4; i++ )
-<a name="l00159"></a>00159    {
-<a name="l00160"></a>00160       pinMode ( _data_pins[i], OUTPUT );
-<a name="l00161"></a>00161    }
+<a name="l00155"></a>00155    <span class="keywordflow">for</span> ( i = 0; i &lt; 4; i++ )
+<a name="l00156"></a>00156    {
+<a name="l00157"></a>00157       pinMode ( _data_pins[i], OUTPUT );
+<a name="l00158"></a>00158    }
+<a name="l00159"></a>00159    
+<a name="l00160"></a>00160    <span class="comment">// Initialize the rest of the ports if it is an 8bit controlled LCD</span>
+<a name="l00161"></a>00161    <span class="comment">// ----------------------------------------------------------------</span>
 <a name="l00162"></a>00162    
-<a name="l00163"></a>00163    <span class="comment">// Initialize the rest of the ports if it is an 8bit controlled LCD</span>
-<a name="l00164"></a>00164    <span class="comment">// ----------------------------------------------------------------</span>
-<a name="l00165"></a>00165    
-<a name="l00166"></a>00166    <span class="keywordflow">if</span> ( !fourbitmode )
-<a name="l00167"></a>00167    {
-<a name="l00168"></a>00168       <span class="keywordflow">for</span> ( i = 4; i &lt; 8; i++ )
-<a name="l00169"></a>00169       {
-<a name="l00170"></a>00170          pinMode ( _data_pins[i], OUTPUT );
-<a name="l00171"></a>00171       }
-<a name="l00172"></a>00172    }
-<a name="l00173"></a>00173    pinMode(_rs_pin, OUTPUT);
-<a name="l00174"></a>00174    
-<a name="l00175"></a>00175    <span class="comment">// we can save 1 pin by not using RW. Indicate by passing 255 instead of pin#</span>
-<a name="l00176"></a>00176    <span class="keywordflow">if</span> (_rw_pin != 255) 
-<a name="l00177"></a>00177    { 
-<a name="l00178"></a>00178       pinMode(_rw_pin, OUTPUT);
-<a name="l00179"></a>00179    }
-<a name="l00180"></a>00180    
-<a name="l00181"></a>00181    pinMode(_enable_pin, OUTPUT);
-<a name="l00182"></a>00182    
-<a name="l00183"></a>00183    <span class="comment">// Initialise displaymode functions to defaults: LCD_1LINE and LCD_5x8DOTS</span>
-<a name="l00184"></a>00184    <span class="comment">// -------------------------------------------------------------------------</span>
-<a name="l00185"></a>00185    <span class="keywordflow">if</span> (fourbitmode)
-<a name="l00186"></a>00186       <a class="code" href="class_l_c_d.html#aef093ba3f8e1016267b40ac235a0fa0f">_displayfunction</a> = <a class="code" href="_l_c_d_8h.html#ab8c35d355d2372090c7a347e961c9224">LCD_4BITMODE</a> | <a class="code" href="_l_c_d_8h.html#a8c85cf88d8af66a47c42249d81c94641">LCD_1LINE</a> | <a class="code" href="_l_c_d_8h.html#a9ef57e724c1b846dae0f531aff6fb464">LCD_5x8DOTS</a>;
-<a name="l00187"></a>00187    <span class="keywordflow">else</span> 
-<a name="l00188"></a>00188       <a class="code" href="class_l_c_d.html#aef093ba3f8e1016267b40ac235a0fa0f">_displayfunction</a> = <a class="code" href="_l_c_d_8h.html#a59a57ca857dae5d89eb5f2a38c4ac6f0">LCD_8BITMODE</a> | <a class="code" href="_l_c_d_8h.html#a8c85cf88d8af66a47c42249d81c94641">LCD_1LINE</a> | <a class="code" href="_l_c_d_8h.html#a9ef57e724c1b846dae0f531aff6fb464">LCD_5x8DOTS</a>;
-<a name="l00189"></a>00189    
-<a name="l00190"></a>00190    <span class="comment">// Now we pull both RS and R/W low to begin commands</span>
-<a name="l00191"></a>00191    digitalWrite(_rs_pin, LOW);
-<a name="l00192"></a>00192    digitalWrite(_enable_pin, LOW);
-<a name="l00193"></a>00193    
-<a name="l00194"></a>00194    <span class="keywordflow">if</span> (_rw_pin != 255) 
-<a name="l00195"></a>00195    { 
-<a name="l00196"></a>00196       digitalWrite(_rw_pin, LOW);
-<a name="l00197"></a>00197    }
-<a name="l00198"></a>00198    
-<a name="l00199"></a>00199    <span class="comment">// Initialise the backlight pin no nothing</span>
-<a name="l00200"></a>00200    _backlightPin = <a class="code" href="_liquid_crystal_8cpp.html#a65fa786d6e31fe8b1aa51784a9736581">LCD_NOBACKLIGHT</a>;
-<a name="l00201"></a>00201 }
-<a name="l00202"></a>00202 
-<a name="l00203"></a>00203 <span class="comment">//</span>
-<a name="l00204"></a>00204 <span class="comment">// pulseEnable</span>
-<a name="l00205"></a>00205 <span class="keywordtype">void</span> LiquidCrystal::pulseEnable(<span class="keywordtype">void</span>) 
-<a name="l00206"></a>00206 {
-<a name="l00207"></a>00207    <span class="comment">// There is no need for the delays, since the digitalWrite operation</span>
-<a name="l00208"></a>00208    <span class="comment">// takes longer.</span>
-<a name="l00209"></a>00209    digitalWrite(_enable_pin, HIGH);   
-<a name="l00210"></a>00210    <a class="code" href="_l_c_d_8h.html#a6eac41e4be58d7736ac0c19de225c0dc">waitUsec</a>(1);          <span class="comment">// enable pulse must be &gt; 450ns   </span>
-<a name="l00211"></a>00211    digitalWrite(_enable_pin, LOW);
-<a name="l00212"></a>00212 }
-<a name="l00213"></a>00213 
-<a name="l00214"></a>00214 <span class="comment">//</span>
-<a name="l00215"></a>00215 <span class="comment">// write4bits</span>
-<a name="l00216"></a>00216 <span class="keywordtype">void</span> LiquidCrystal::writeNbits(uint8_t value, uint8_t numBits) 
-<a name="l00217"></a>00217 {
-<a name="l00218"></a>00218    <span class="keywordflow">for</span> (uint8_t i = 0; i &lt; numBits; i++) 
-<a name="l00219"></a>00219    {
-<a name="l00220"></a>00220       digitalWrite(_data_pins[i], (value &gt;&gt; i) &amp; 0x01);
-<a name="l00221"></a>00221    }
-<a name="l00222"></a>00222    pulseEnable();
-<a name="l00223"></a>00223 }
-<a name="l00224"></a>00224 
-<a name="l00225"></a>00225 
+<a name="l00163"></a>00163    <span class="keywordflow">if</span> ( !fourbitmode )
+<a name="l00164"></a>00164    {
+<a name="l00165"></a>00165       <span class="keywordflow">for</span> ( i = 4; i &lt; 8; i++ )
+<a name="l00166"></a>00166       {
+<a name="l00167"></a>00167          pinMode ( _data_pins[i], OUTPUT );
+<a name="l00168"></a>00168       }
+<a name="l00169"></a>00169    }
+<a name="l00170"></a>00170    pinMode(_rs_pin, OUTPUT);
+<a name="l00171"></a>00171    
+<a name="l00172"></a>00172    <span class="comment">// we can save 1 pin by not using RW. Indicate by passing 255 instead of pin#</span>
+<a name="l00173"></a>00173    <span class="keywordflow">if</span> (_rw_pin != 255) 
+<a name="l00174"></a>00174    { 
+<a name="l00175"></a>00175       pinMode(_rw_pin, OUTPUT);
+<a name="l00176"></a>00176    }
+<a name="l00177"></a>00177    
+<a name="l00178"></a>00178    pinMode(_enable_pin, OUTPUT);
+<a name="l00179"></a>00179    
+<a name="l00180"></a>00180    <span class="comment">// Initialise displaymode functions to defaults: LCD_1LINE and LCD_5x8DOTS</span>
+<a name="l00181"></a>00181    <span class="comment">// -------------------------------------------------------------------------</span>
+<a name="l00182"></a>00182    <span class="keywordflow">if</span> (fourbitmode)
+<a name="l00183"></a>00183       <a class="code" href="class_l_c_d.html#aef093ba3f8e1016267b40ac235a0fa0f">_displayfunction</a> = <a class="code" href="_l_c_d_8h.html#ab8c35d355d2372090c7a347e961c9224">LCD_4BITMODE</a> | <a class="code" href="_l_c_d_8h.html#a8c85cf88d8af66a47c42249d81c94641">LCD_1LINE</a> | <a class="code" href="_l_c_d_8h.html#a9ef57e724c1b846dae0f531aff6fb464">LCD_5x8DOTS</a>;
+<a name="l00184"></a>00184    <span class="keywordflow">else</span> 
+<a name="l00185"></a>00185       <a class="code" href="class_l_c_d.html#aef093ba3f8e1016267b40ac235a0fa0f">_displayfunction</a> = <a class="code" href="_l_c_d_8h.html#a59a57ca857dae5d89eb5f2a38c4ac6f0">LCD_8BITMODE</a> | <a class="code" href="_l_c_d_8h.html#a8c85cf88d8af66a47c42249d81c94641">LCD_1LINE</a> | <a class="code" href="_l_c_d_8h.html#a9ef57e724c1b846dae0f531aff6fb464">LCD_5x8DOTS</a>;
+<a name="l00186"></a>00186    
+<a name="l00187"></a>00187    <span class="comment">// Now we pull both RS and R/W low to begin commands</span>
+<a name="l00188"></a>00188    digitalWrite(_rs_pin, LOW);
+<a name="l00189"></a>00189    digitalWrite(_enable_pin, LOW);
+<a name="l00190"></a>00190    
+<a name="l00191"></a>00191    <span class="keywordflow">if</span> (_rw_pin != 255) 
+<a name="l00192"></a>00192    { 
+<a name="l00193"></a>00193       digitalWrite(_rw_pin, LOW);
+<a name="l00194"></a>00194    }
+<a name="l00195"></a>00195    
+<a name="l00196"></a>00196    <span class="comment">// Initialise the backlight pin no nothing</span>
+<a name="l00197"></a>00197    _backlightPin = <a class="code" href="_liquid_crystal_8cpp.html#a65fa786d6e31fe8b1aa51784a9736581">LCD_NOBACKLIGHT</a>;
+<a name="l00198"></a>00198 }
+<a name="l00199"></a>00199 
+<a name="l00200"></a>00200 <span class="comment">//</span>
+<a name="l00201"></a>00201 <span class="comment">// pulseEnable</span>
+<a name="l00202"></a>00202 <span class="keywordtype">void</span> LiquidCrystal::pulseEnable(<span class="keywordtype">void</span>) 
+<a name="l00203"></a>00203 {
+<a name="l00204"></a>00204    <span class="comment">// There is no need for the delays, since the digitalWrite operation</span>
+<a name="l00205"></a>00205    <span class="comment">// takes longer.</span>
+<a name="l00206"></a>00206    digitalWrite(_enable_pin, HIGH);   
+<a name="l00207"></a>00207    <a class="code" href="_l_c_d_8h.html#a6eac41e4be58d7736ac0c19de225c0dc">waitUsec</a>(1);          <span class="comment">// enable pulse must be &gt; 450ns   </span>
+<a name="l00208"></a>00208    digitalWrite(_enable_pin, LOW);
+<a name="l00209"></a>00209 }
+<a name="l00210"></a>00210 
+<a name="l00211"></a>00211 <span class="comment">//</span>
+<a name="l00212"></a>00212 <span class="comment">// write4bits</span>
+<a name="l00213"></a>00213 <span class="keywordtype">void</span> LiquidCrystal::writeNbits(uint8_t value, uint8_t numBits) 
+<a name="l00214"></a>00214 {
+<a name="l00215"></a>00215    <span class="keywordflow">for</span> (uint8_t i = 0; i &lt; numBits; i++) 
+<a name="l00216"></a>00216    {
+<a name="l00217"></a>00217       digitalWrite(_data_pins[i], (value &gt;&gt; i) &amp; 0x01);
+<a name="l00218"></a>00218    }
+<a name="l00219"></a>00219    pulseEnable();
+<a name="l00220"></a>00220 }
+<a name="l00221"></a>00221 
+<a name="l00222"></a>00222 
 </pre></div></div>
 </div>
 <!-- window showing the filter options -->
 </iframe>
 </div>
 
-<hr class="footer"/><address class="footer"><small>Generated on Sat Feb 18 2012 21:46:46 for LCD Library by&#160;
+<hr class="footer"/><address class="footer"><small>Generated on Sat Feb 18 2012 22:11:26 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>

docs/html/_liquid_crystal_8h.html

 <div class="memdoc">
 <p>Command execution time on the <a class="el" href="class_l_c_d.html">LCD</a>.  This defines how long a command takes to execute by the <a class="el" href="class_l_c_d.html">LCD</a>. The time is expressed in micro-seconds. </p>
 
-<p>Definition at line <a class="el" href="_liquid_crystal_8h_source.html#l00047">47</a> of file <a class="el" href="_liquid_crystal_8h_source.html">LiquidCrystal.h</a>.</p>
+<p>Definition at line <a class="el" href="_liquid_crystal_8h_source.html#l00044">44</a> of file <a class="el" href="_liquid_crystal_8h_source.html">LiquidCrystal.h</a>.</p>
 
 </div>
 </div>
 </iframe>
 </div>
 
-<hr class="footer"/><address class="footer"><small>Generated on Sat Feb 18 2012 21:46:46 for LCD Library by&#160;
+<hr class="footer"/><address class="footer"><small>Generated on Sat Feb 18 2012 22:11:26 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>

docs/html/_liquid_crystal_8h_source.html

 <a name="l00024"></a>00024 <span class="comment">// to the original functionality of the Arduino LiquidCrystal library.</span>
 <a name="l00025"></a>00025 <span class="comment">//</span>
 <a name="l00026"></a>00026 <span class="comment">//</span>
-<a name="l00027"></a>00027 <span class="comment">// This library is only compatible with Arduino&#39;s SDK version 1.0</span>
-<a name="l00028"></a>00028 <span class="comment">//</span>
-<a name="l00029"></a>00029 <span class="comment">//</span>
-<a name="l00030"></a>00030 <span class="comment">// @author F. Malpartida - fmalpartida@gmail.com</span>
-<a name="l00031"></a>00031 <span class="comment">// ---------------------------------------------------------------------------</span>
-<a name="l00032"></a>00032 <span class="preprocessor">#ifndef LiquidCrystal_4bit_h</span>
-<a name="l00033"></a>00033 <span class="preprocessor"></span><span class="preprocessor">#define LiquidCrystal_4bit_h</span>
-<a name="l00034"></a>00034 <span class="preprocessor"></span>
-<a name="l00035"></a>00035 <span class="preprocessor">#include &lt;inttypes.h&gt;</span>
+<a name="l00027"></a>00027 <span class="comment">// @author F. Malpartida - fmalpartida@gmail.com</span>
+<a name="l00028"></a>00028 <span class="comment">// ---------------------------------------------------------------------------</span>
+<a name="l00029"></a>00029 <span class="preprocessor">#ifndef LiquidCrystal_4bit_h</span>
+<a name="l00030"></a>00030 <span class="preprocessor"></span><span class="preprocessor">#define LiquidCrystal_4bit_h</span>
+<a name="l00031"></a>00031 <span class="preprocessor"></span>
+<a name="l00032"></a>00032 <span class="preprocessor">#include &lt;inttypes.h&gt;</span>
+<a name="l00033"></a>00033 
+<a name="l00034"></a>00034 <span class="preprocessor">#include &quot;<a class="code" href="_l_c_d_8h.html">LCD.h</a>&quot;</span>
+<a name="l00035"></a>00035 <span class="preprocessor">#include &quot;<a class="code" href="_fast_i_o_8h.html">FastIO.h</a>&quot;</span>
 <a name="l00036"></a>00036 
-<a name="l00037"></a>00037 <span class="preprocessor">#include &quot;<a class="code" href="_l_c_d_8h.html">LCD.h</a>&quot;</span>
-<a name="l00038"></a>00038 <span class="preprocessor">#include &quot;<a class="code" href="_fast_i_o_8h.html">FastIO.h</a>&quot;</span>
-<a name="l00039"></a>00039 
-<a name="l00040"></a>00040 
-<a name="l00047"></a><a class="code" href="_liquid_crystal_8h.html#adebff0f00a59c9f9863bc196938d5726">00047</a> <span class="preprocessor">#define EXEC_TIME 37</span>
-<a name="l00048"></a>00048 <span class="preprocessor"></span>
-<a name="l00049"></a><a class="code" href="class_liquid_crystal.html">00049</a> <span class="keyword">class </span><a class="code" href="class_liquid_crystal.html">LiquidCrystal</a> : <span class="keyword">public</span> <a class="code" href="class_l_c_d.html">LCD</a>
-<a name="l00050"></a>00050 {
-<a name="l00051"></a>00051 <span class="keyword">public</span>:
-<a name="l00058"></a>00058    <a class="code" href="class_liquid_crystal.html#a49d2bd8d26031a1c83bcbd73978a1686">LiquidCrystal</a>(uint8_t rs, uint8_t enable,
+<a name="l00037"></a>00037 
+<a name="l00044"></a><a class="code" href="_liquid_crystal_8h.html#adebff0f00a59c9f9863bc196938d5726">00044</a> <span class="preprocessor">#define EXEC_TIME 37</span>
+<a name="l00045"></a>00045 <span class="preprocessor"></span>
+<a name="l00046"></a><a class="code" href="class_liquid_crystal.html">00046</a> <span class="keyword">class </span><a class="code" href="class_liquid_crystal.html">LiquidCrystal</a> : <span class="keyword">public</span> <a class="code" href="class_l_c_d.html">LCD</a>
+<a name="l00047"></a>00047 {
+<a name="l00048"></a>00048 <span class="keyword">public</span>:
+<a name="l00055"></a>00055    <a class="code" href="class_liquid_crystal.html#a49d2bd8d26031a1c83bcbd73978a1686">LiquidCrystal</a>(uint8_t rs, uint8_t enable,
+<a name="l00056"></a>00056                  uint8_t d0, uint8_t d1, uint8_t d2, uint8_t d3,
+<a name="l00057"></a>00057                  uint8_t d4, uint8_t d5, uint8_t d6, uint8_t d7);
+<a name="l00058"></a>00058    <a class="code" href="class_liquid_crystal.html#a49d2bd8d26031a1c83bcbd73978a1686">LiquidCrystal</a>(uint8_t rs, uint8_t rw, uint8_t enable,
 <a name="l00059"></a>00059                  uint8_t d0, uint8_t d1, uint8_t d2, uint8_t d3,
 <a name="l00060"></a>00060                  uint8_t d4, uint8_t d5, uint8_t d6, uint8_t d7);
-<a name="l00061"></a>00061    <a class="code" href="class_liquid_crystal.html#a49d2bd8d26031a1c83bcbd73978a1686">LiquidCrystal</a>(uint8_t rs, uint8_t rw, uint8_t enable,
-<a name="l00062"></a>00062                  uint8_t d0, uint8_t d1, uint8_t d2, uint8_t d3,
-<a name="l00063"></a>00063                  uint8_t d4, uint8_t d5, uint8_t d6, uint8_t d7);
-<a name="l00064"></a>00064    
-<a name="l00071"></a>00071    <a class="code" href="class_liquid_crystal.html#a49d2bd8d26031a1c83bcbd73978a1686">LiquidCrystal</a>(uint8_t rs, uint8_t rw, uint8_t enable,
-<a name="l00072"></a>00072                  uint8_t d0, uint8_t d1, uint8_t d2, uint8_t d3);
-<a name="l00073"></a>00073    <a class="code" href="class_liquid_crystal.html#a49d2bd8d26031a1c83bcbd73978a1686">LiquidCrystal</a>(uint8_t rs, uint8_t enable,
-<a name="l00074"></a>00074                  uint8_t d0, uint8_t d1, uint8_t d2, uint8_t d3);
-<a name="l00075"></a>00075    
-<a name="l00088"></a>00088    <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="class_liquid_crystal.html#a56142f8b3753bedd133e4139e5eb5089">send</a>(uint8_t value, uint8_t mode);
-<a name="l00089"></a>00089    
-<a name="l00099"></a>00099    <span class="keywordtype">void</span> <a class="code" href="class_liquid_crystal.html#a170c6ed996f3e84bf63dcd5cb1471428">setBacklight</a> ( uint8_t mode );
-<a name="l00100"></a>00100    
-<a name="l00108"></a>00108    <span class="keywordtype">void</span> <a class="code" href="class_liquid_crystal.html#aa78ed97905615b34e685170c086e3d9d">setBacklightPin</a> ( uint8_t pin );
+<a name="l00061"></a>00061    
+<a name="l00068"></a>00068    <a class="code" href="class_liquid_crystal.html#a49d2bd8d26031a1c83bcbd73978a1686">LiquidCrystal</a>(uint8_t rs, uint8_t rw, uint8_t enable,
+<a name="l00069"></a>00069                  uint8_t d0, uint8_t d1, uint8_t d2, uint8_t d3);
+<a name="l00070"></a>00070    <a class="code" href="class_liquid_crystal.html#a49d2bd8d26031a1c83bcbd73978a1686">LiquidCrystal</a>(uint8_t rs, uint8_t enable,
+<a name="l00071"></a>00071                  uint8_t d0, uint8_t d1, uint8_t d2, uint8_t d3);
+<a name="l00072"></a>00072    
+<a name="l00085"></a>00085    <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="class_liquid_crystal.html#a56142f8b3753bedd133e4139e5eb5089">send</a>(uint8_t value, uint8_t mode);
+<a name="l00086"></a>00086    
+<a name="l00096"></a>00096    <span class="keywordtype">void</span> <a class="code" href="class_liquid_crystal.html#a170c6ed996f3e84bf63dcd5cb1471428">setBacklight</a> ( uint8_t mode );
+<a name="l00097"></a>00097    
+<a name="l00105"></a>00105    <span class="keywordtype">void</span> <a class="code" href="class_liquid_crystal.html#aa78ed97905615b34e685170c086e3d9d">setBacklightPin</a> ( uint8_t pin );
+<a name="l00106"></a>00106    
+<a name="l00107"></a>00107    
+<a name="l00108"></a>00108 <span class="keyword">private</span>:
 <a name="l00109"></a>00109    
-<a name="l00110"></a>00110    
-<a name="l00111"></a>00111 <span class="keyword">private</span>:
-<a name="l00112"></a>00112    
-<a name="l00118"></a>00118    <span class="keywordtype">void</span> init(uint8_t fourbitmode, uint8_t rs, uint8_t rw, uint8_t enable,
-<a name="l00119"></a>00119              uint8_t d0, uint8_t d1, uint8_t d2, uint8_t d3,
-<a name="l00120"></a>00120              uint8_t d4, uint8_t d5, uint8_t d6, uint8_t d7);
-<a name="l00121"></a>00121    
-<a name="l00128"></a>00128    <span class="keywordtype">void</span> writeNbits(uint8_t value, uint8_t numBits);
-<a name="l00129"></a>00129    
-<a name="l00136"></a>00136    <span class="keywordtype">void</span> pulseEnable();
-<a name="l00137"></a>00137    
-<a name="l00138"></a>00138    uint8_t _rs_pin;       <span class="comment">// LOW: command.  HIGH: character.</span>
-<a name="l00139"></a>00139    uint8_t _rw_pin;       <span class="comment">// LOW: write to LCD.  HIGH: read from LCD.</span>
-<a name="l00140"></a>00140    uint8_t _enable_pin;   <span class="comment">// activated by a HIGH pulse.</span>
-<a name="l00141"></a>00141    uint8_t _data_pins[8]; <span class="comment">// Data pins.</span>
-<a name="l00142"></a>00142    uint8_t _backlightPin; <span class="comment">// Pin associated to control the LCD backlight</span>
-<a name="l00143"></a>00143 };
-<a name="l00144"></a>00144 
-<a name="l00145"></a>00145 <span class="preprocessor">#endif</span>
+<a name="l00115"></a>00115    <span class="keywordtype">void</span> init(uint8_t fourbitmode, uint8_t rs, uint8_t rw, uint8_t enable,
+<a name="l00116"></a>00116              uint8_t d0, uint8_t d1, uint8_t d2, uint8_t d3,
+<a name="l00117"></a>00117              uint8_t d4, uint8_t d5, uint8_t d6, uint8_t d7);
+<a name="l00118"></a>00118    
+<a name="l00125"></a>00125    <span class="keywordtype">void</span> writeNbits(uint8_t value, uint8_t numBits);
+<a name="l00126"></a>00126    
+<a name="l00133"></a>00133    <span class="keywordtype">void</span> pulseEnable();
+<a name="l00134"></a>00134    
+<a name="l00135"></a>00135    uint8_t _rs_pin;       <span class="comment">// LOW: command.  HIGH: character.</span>
+<a name="l00136"></a>00136    uint8_t _rw_pin;       <span class="comment">// LOW: write to LCD.  HIGH: read from LCD.</span>
+<a name="l00137"></a>00137    uint8_t _enable_pin;   <span class="comment">// activated by a HIGH pulse.</span>
+<a name="l00138"></a>00138    uint8_t _data_pins[8]; <span class="comment">// Data pins.</span>
+<a name="l00139"></a>00139    uint8_t _backlightPin; <span class="comment">// Pin associated to control the LCD backlight</span>
+<a name="l00140"></a>00140 };
+<a name="l00141"></a>00141 
+<a name="l00142"></a>00142 <span class="preprocessor">#endif</span>
 </pre></div></div>
 </div>
 <!-- window showing the filter options -->
 </iframe>
 </div>
 
-<hr class="footer"/><address class="footer"><small>Generated on Sat Feb 18 2012 21:46:46 for LCD Library by&#160;
+<hr class="footer"/><address class="footer"><small>Generated on Sat Feb 18 2012 22:11:26 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>

docs/html/_liquid_crystal___i2_c_8cpp.html

 </div>
 <div class="memdoc">
 
-<p>Definition at line <a class="el" href="_liquid_crystal___i2_c_8cpp_source.html#l00046">46</a> of file <a class="el" href="_liquid_crystal___i2_c_8cpp_source.html">LiquidCrystal_I2C.cpp</a>.</p>
+<p>Definition at line <a class="el" href="_liquid_crystal___i2_c_8cpp_source.html#l00044">44</a> of file <a class="el" href="_liquid_crystal___i2_c_8cpp_source.html">LiquidCrystal_I2C.cpp</a>.</p>
 
 </div>
 </div>
 </div>
 <div class="memdoc">
 
-<p>Definition at line <a class="el" href="_liquid_crystal___i2_c_8cpp_source.html#l00045">45</a> of file <a class="el" href="_liquid_crystal___i2_c_8cpp_source.html">LiquidCrystal_I2C.cpp</a>.</p>
+<p>Definition at line <a class="el" href="_liquid_crystal___i2_c_8cpp_source.html#l00043">43</a> of file <a class="el" href="_liquid_crystal___i2_c_8cpp_source.html">LiquidCrystal_I2C.cpp</a>.</p>
 
 </div>
 </div>
 </iframe>
 </div>
 
-<hr class="footer"/><address class="footer"><small>Generated on Sat Feb 18 2012 21:46:46 for LCD Library by&#160;
+<hr class="footer"/><address class="footer"><small>Generated on Sat Feb 18 2012 22:11:26 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>

docs/html/_liquid_crystal___i2_c_8cpp_source.html

 <a name="l00024"></a>00024 <span class="comment">// to the original functionality of the Arduino LiquidCrystal library.</span>
 <a name="l00025"></a>00025 <span class="comment">//</span>
 <a name="l00026"></a>00026 <span class="comment">//</span>
-<a name="l00027"></a>00027 <span class="comment">// This library is only compatible with Arduino&#39;s SDK version 1.0</span>
-<a name="l00028"></a>00028 <span class="comment">//</span>
-<a name="l00029"></a>00029 <span class="comment">//</span>
-<a name="l00030"></a>00030 <span class="comment">// @author F. Malpartida - fmalpartida@gmail.com</span>
-<a name="l00031"></a>00031 <span class="comment">// ---------------------------------------------------------------------------</span>
-<a name="l00032"></a>00032 <span class="preprocessor">#if (ARDUINO &lt;  100)</span>
-<a name="l00033"></a>00033 <span class="preprocessor"></span><span class="preprocessor">#include &lt;WProgram.h&gt;</span>
-<a name="l00034"></a>00034 <span class="preprocessor">#else</span>
-<a name="l00035"></a>00035 <span class="preprocessor"></span><span class="preprocessor">#include &lt;Arduino.h&gt;</span>
-<a name="l00036"></a>00036 <span class="preprocessor">#endif</span>
-<a name="l00037"></a>00037 <span class="preprocessor"></span><span class="preprocessor">#include &lt;inttypes.h&gt;</span>
-<a name="l00038"></a>00038 <span class="preprocessor">#include &quot;<a class="code" href="_i2_c_i_o_8h.html">I2CIO.h</a>&quot;</span>
-<a name="l00039"></a>00039 <span class="preprocessor">#include &quot;<a class="code" href="_liquid_crystal___i2_c_8h.html">LiquidCrystal_I2C.h</a>&quot;</span>
-<a name="l00040"></a>00040 
-<a name="l00041"></a>00041 <span class="comment">// CONSTANT  definitions</span>
-<a name="l00042"></a>00042 <span class="comment">// ---------------------------------------------------------------------------</span>
-<a name="l00043"></a>00043 
-<a name="l00044"></a>00044 <span class="comment">// flags for backlight control</span>
-<a name="l00045"></a><a class="code" href="_liquid_crystal___i2_c_8cpp.html#a65fa786d6e31fe8b1aa51784a9736581">00045</a> <span class="preprocessor">#define LCD_NOBACKLIGHT 0x00</span>
-<a name="l00046"></a><a class="code" href="_liquid_crystal___i2_c_8cpp.html#ac059d24dfe9c1e1f7c07cb7869a1833b">00046</a> <span class="preprocessor"></span><span class="preprocessor">#define LCD_BACKLIGHT   0xFF</span>
-<a name="l00047"></a>00047 <span class="preprocessor"></span>
-<a name="l00048"></a>00048 
-<a name="l00049"></a>00049 <span class="comment">// CONSTRUCTORS</span>
-<a name="l00050"></a>00050 <span class="comment">// ---------------------------------------------------------------------------</span>
-<a name="l00051"></a><a class="code" href="class_liquid_crystal___i2_c.html#aac537d195557e0b8afac1a71441a484c">00051</a> <a class="code" href="class_liquid_crystal___i2_c.html#aac537d195557e0b8afac1a71441a484c">LiquidCrystal_I2C::LiquidCrystal_I2C</a>( uint8_t lcd_Addr )
-<a name="l00052"></a>00052 {
-<a name="l00053"></a>00053    _Addr = lcd_Addr;
-<a name="l00054"></a>00054    
-<a name="l00055"></a>00055    _backlightPin  = 0x0;
-<a name="l00056"></a>00056    _backlightMask = <a class="code" href="_liquid_crystal___i2_c_8cpp.html#a65fa786d6e31fe8b1aa51784a9736581">LCD_NOBACKLIGHT</a>;
-<a name="l00057"></a>00057    
-<a name="l00058"></a>00058    _En = <a class="code" href="_liquid_crystal___i2_c_8h.html#a22e6626f2c98ed902f8ded47f6438c05">EN</a>;
-<a name="l00059"></a>00059    _Rw = <a class="code" href="_liquid_crystal___i2_c_8h.html#afc4ded33ac0ca43defcce639e965748a">RW</a>;
-<a name="l00060"></a>00060    _Rs = <a class="code" href="_liquid_crystal___i2_c_8h.html#af8903d8eea3868940c60af887473b152">RS</a>;
-<a name="l00061"></a>00061    
-<a name="l00062"></a>00062    <span class="comment">// Initialise default values data[0] pin 0, data[1] pin 1, ...</span>
-<a name="l00063"></a>00063    <span class="keywordflow">for</span> ( uint8_t i = 0; i &lt; 4; i++ )
-<a name="l00064"></a>00064    {
-<a name="l00065"></a>00065       _data_pins[i] = ( 1 &lt;&lt; i );
-<a name="l00066"></a>00066    }
-<a name="l00067"></a>00067 }
-<a name="l00068"></a>00068 
-<a name="l00069"></a><a class="code" href="class_liquid_crystal___i2_c.html#a517f8847ebf09f0eacfb9c7232975fce">00069</a> <a class="code" href="class_liquid_crystal___i2_c.html#aac537d195557e0b8afac1a71441a484c">LiquidCrystal_I2C::LiquidCrystal_I2C</a>( uint8_t lcd_Addr, uint8_t En, uint8_t Rw,
-<a name="l00070"></a>00070                                       uint8_t Rs)
-<a name="l00071"></a>00071 {
-<a name="l00072"></a>00072    _Addr = lcd_Addr;
-<a name="l00073"></a>00073    
-<a name="l00074"></a>00074    _backlightPin  = 0;
-<a name="l00075"></a>00075    _backlightMask = <a class="code" href="_liquid_crystal___i2_c_8cpp.html#a65fa786d6e31fe8b1aa51784a9736581">LCD_NOBACKLIGHT</a>;
-<a name="l00076"></a>00076    
-<a name="l00077"></a>00077    _En = ( 1 &lt;&lt; En );
-<a name="l00078"></a>00078    _Rw = ( 1 &lt;&lt; Rw );
-<a name="l00079"></a>00079    _Rs = ( 1 &lt;&lt; Rs );
-<a name="l00080"></a>00080    
-<a name="l00081"></a>00081    <span class="comment">// Initialise default values data[0] pin 0, data[1] pin 1, ...</span>
-<a name="l00082"></a>00082    <span class="keywordflow">for</span> ( uint8_t i = 0; i &lt; 4; i++ )
-<a name="l00083"></a>00083    {
-<a name="l00084"></a>00084       _data_pins[i] = ( 1 &lt;&lt; i );
-<a name="l00085"></a>00085    }
-<a name="l00086"></a>00086 }
-<a name="l00087"></a>00087 
-<a name="l00088"></a><a class="code" href="class_liquid_crystal___i2_c.html#ac235f66c3d56320fca89545d0176caf5">00088</a> <a class="code" href="class_liquid_crystal___i2_c.html#aac537d195557e0b8afac1a71441a484c">LiquidCrystal_I2C::LiquidCrystal_I2C</a>( uint8_t lcd_Addr, uint8_t En, uint8_t Rw,
-<a name="l00089"></a>00089                                      uint8_t Rs, uint8_t d0, uint8_t d1,
-<a name="l00090"></a>00090                                      uint8_t d2, uint8_t d3 )
-<a name="l00091"></a>00091 {
-<a name="l00092"></a>00092    _Addr = lcd_Addr;
-<a name="l00093"></a>00093    
-<a name="l00094"></a>00094    _backlightPin  = 0;
-<a name="l00095"></a>00095    _backlightMask = <a class="code" href="_liquid_crystal___i2_c_8cpp.html#a65fa786d6e31fe8b1aa51784a9736581">LCD_NOBACKLIGHT</a>;
-<a name="l00096"></a>00096 
-<a name="l00097"></a>00097    _En = ( 1 &lt;&lt; En );
-<a name="l00098"></a>00098    _Rw = ( 1 &lt;&lt; Rw );
-<a name="l00099"></a>00099    _Rs = ( 1 &lt;&lt; Rs );
-<a name="l00100"></a>00100    
-<a name="l00101"></a>00101    <span class="comment">// Initialise pin mapping</span>
-<a name="l00102"></a>00102    _data_pins[0] = ( 1 &lt;&lt; d0 );
-<a name="l00103"></a>00103    _data_pins[1] = ( 1 &lt;&lt; d1 );
-<a name="l00104"></a>00104    _data_pins[2] = ( 1 &lt;&lt; d2 );
-<a name="l00105"></a>00105    _data_pins[3] = ( 1 &lt;&lt; d3 );
-<a name="l00106"></a>00106 }
-<a name="l00107"></a>00107 
-<a name="l00108"></a>00108 <span class="comment">// PUBLIC METHODS</span>
-<a name="l00109"></a>00109 <span class="comment">// ---------------------------------------------------------------------------</span>
-<a name="l00110"></a>00110 
-<a name="l00111"></a>00111 <span class="comment">//</span>
-<a name="l00112"></a>00112 <span class="comment">// begin</span>
-<a name="l00113"></a><a class="code" href="class_liquid_crystal___i2_c.html#aeee2ada537f0cfbfda8613324b57c4a6">00113</a> <span class="keywordtype">void</span> <a class="code" href="class_liquid_crystal___i2_c.html#aeee2ada537f0cfbfda8613324b57c4a6">LiquidCrystal_I2C::begin</a>(uint8_t cols, uint8_t lines, uint8_t dotsize) 
-<a name="l00114"></a>00114 {
-<a name="l00115"></a>00115    
-<a name="l00116"></a>00116    init();     <span class="comment">// Initialise the I2C expander interface</span>
-<a name="l00117"></a>00117    <a class="code" href="class_liquid_crystal___i2_c.html#aeee2ada537f0cfbfda8613324b57c4a6">LCD::begin</a> ( cols, lines, dotsize );   
-<a name="l00118"></a>00118 }
-<a name="l00119"></a>00119 
-<a name="l00120"></a>00120 
-<a name="l00121"></a>00121 <span class="comment">// User commands - users can expand this section</span>
-<a name="l00122"></a>00122 <span class="comment">//----------------------------------------------------------------------------</span>
-<a name="l00123"></a>00123 
-<a name="l00124"></a>00124 <span class="comment">// Turn the (optional) backlight off/on</span>
-<a name="l00125"></a>00125 <span class="comment">//</span>
-<a name="l00126"></a>00126 <span class="comment">// setBacklight</span>
-<a name="l00127"></a><a class="code" href="class_liquid_crystal___i2_c.html#a2f248fc841812e850f29114667f41440">00127</a> <span class="keywordtype">void</span> <a class="code" href="class_liquid_crystal___i2_c.html#a2f248fc841812e850f29114667f41440">LiquidCrystal_I2C::setBacklight</a>( uint8_t mode ) 
-<a name="l00128"></a>00128 {
-<a name="l00129"></a>00129    <span class="keywordflow">if</span> ( mode == HIGH )
-<a name="l00130"></a>00130    {
-<a name="l00131"></a>00131       _backlightMask = _backlightPin &amp; <a class="code" href="_liquid_crystal___i2_c_8cpp.html#ac059d24dfe9c1e1f7c07cb7869a1833b">LCD_BACKLIGHT</a>;
-<a name="l00132"></a>00132       
-<a name="l00133"></a>00133    }
-<a name="l00134"></a>00134    <span class="keywordflow">else</span> 
-<a name="l00135"></a>00135    {
-<a name="l00136"></a>00136       _backlightMask = _backlightPin &amp; <a class="code" href="_liquid_crystal___i2_c_8cpp.html#a65fa786d6e31fe8b1aa51784a9736581">LCD_NOBACKLIGHT</a>;
-<a name="l00137"></a>00137    }
-<a name="l00138"></a>00138    _i2cio.<a class="code" href="class_i2_c_i_o.html#ae2063569c927d0008e2593d14504fdcd">write</a>( _backlightMask );
-<a name="l00139"></a>00139 }
-<a name="l00140"></a>00140 
-<a name="l00141"></a>00141 <span class="comment">//</span>
-<a name="l00142"></a>00142 <span class="comment">// setBacklightPin</span>
-<a name="l00143"></a><a class="code" href="class_liquid_crystal___i2_c.html#a715027a10c1141fe5442fe58cb3a405a">00143</a> <span class="keywordtype">void</span> <a class="code" href="class_liquid_crystal___i2_c.html#a715027a10c1141fe5442fe58cb3a405a">LiquidCrystal_I2C::setBacklightPin</a> ( uint8_t pin )
-<a name="l00144"></a>00144 {
-<a name="l00145"></a>00145    _backlightPin = ( 1 &lt;&lt; pin );
-<a name="l00146"></a>00146 }
-<a name="l00147"></a>00147 
-<a name="l00148"></a>00148 <span class="comment">// PRIVATE METHODS</span>
-<a name="l00149"></a>00149 <span class="comment">// ---------------------------------------------------------------------------</span>
-<a name="l00150"></a>00150 
-<a name="l00151"></a>00151 <span class="comment">//</span>
-<a name="l00152"></a>00152 <span class="comment">// init</span>
-<a name="l00153"></a>00153 <span class="keywordtype">int</span> LiquidCrystal_I2C::init()
-<a name="l00154"></a>00154 {
-<a name="l00155"></a>00155    <span class="keywordtype">int</span> status = 0;
-<a name="l00156"></a>00156    
-<a name="l00157"></a>00157    <span class="comment">// initialize the backpack IO expander</span>
-<a name="l00158"></a>00158    <span class="comment">// and display functions.</span>
-<a name="l00159"></a>00159    <span class="comment">// ------------------------------------------------------------------------</span>
-<a name="l00160"></a>00160    <span class="keywordflow">if</span> ( _i2cio.<a class="code" href="class_i2_c_i_o.html#a6f814653d903dc2ff6e8420eeb7954ae">begin</a> ( _Addr ) == 1 )
-<a name="l00161"></a>00161    {
-<a name="l00162"></a>00162       _i2cio.<a class="code" href="class_i2_c_i_o.html#a0341888753bc54c4384f5593a870fb34">portMode</a> ( OUTPUT );  <span class="comment">// Set the entire IO extender to OUTPUT</span>
-<a name="l00163"></a>00163       <a class="code" href="class_l_c_d.html#aef093ba3f8e1016267b40ac235a0fa0f">_displayfunction</a> = <a class="code" href="_l_c_d_8h.html#ab8c35d355d2372090c7a347e961c9224">LCD_4BITMODE</a> | <a class="code" href="_l_c_d_8h.html#a8c85cf88d8af66a47c42249d81c94641">LCD_1LINE</a> | <a class="code" href="_l_c_d_8h.html#a9ef57e724c1b846dae0f531aff6fb464">LCD_5x8DOTS</a>;
-<a name="l00164"></a>00164       status = 1;
-<a name="l00165"></a>00165       _i2cio.<a class="code" href="class_i2_c_i_o.html#ae2063569c927d0008e2593d14504fdcd">write</a>(0);  <span class="comment">// Set the entire port to LOW</span>
-<a name="l00166"></a>00166    }
-<a name="l00167"></a>00167    <span class="keywordflow">return</span> ( status );
-<a name="l00168"></a>00168 }
-<a name="l00169"></a>00169 
-<a name="l00170"></a>00170 <span class="comment">// low level data pushing commands</span>
-<a name="l00171"></a>00171 <span class="comment">//----------------------------------------------------------------------------</span>
-<a name="l00172"></a>00172 
-<a name="l00173"></a>00173 <span class="comment">//</span>
-<a name="l00174"></a>00174 <span class="comment">// send - write either command or data</span>
-<a name="l00175"></a><a class="code" href="class_liquid_crystal___i2_c.html#a8bf1fab7efe13e8b17b96c42d1f810b4">00175</a> <span class="keywordtype">void</span> <a class="code" href="class_liquid_crystal___i2_c.html#a8bf1fab7efe13e8b17b96c42d1f810b4">LiquidCrystal_I2C::send</a>(uint8_t value, uint8_t mode) 
-<a name="l00176"></a>00176 {
-<a name="l00177"></a>00177    <span class="comment">// No need to use the delay routines since the time taken to write takes</span>
-<a name="l00178"></a>00178    <span class="comment">// longer that what is needed both for toggling and enable pin an to execute</span>
-<a name="l00179"></a>00179    <span class="comment">// the command.</span>
-<a name="l00180"></a>00180    write4bits( (value &gt;&gt; 4), mode );
-<a name="l00181"></a>00181    write4bits( (value &amp; 0x0F), mode);
-<a name="l00182"></a>00182 }
-<a name="l00183"></a>00183 
-<a name="l00184"></a>00184 <span class="comment">//</span>
-<a name="l00185"></a>00185 <span class="comment">// write4bits</span>
-<a name="l00186"></a>00186 <span class="keywordtype">void</span> LiquidCrystal_I2C::write4bits ( uint8_t value, uint8_t mode ) 
-<a name="l00187"></a>00187 {
-<a name="l00188"></a>00188    uint8_t pinMapValue = 0;
-<a name="l00189"></a>00189    
-<a name="l00190"></a>00190    <span class="comment">// Map the value to LCD pin mapping</span>
-<a name="l00191"></a>00191    <span class="comment">// --------------------------------</span>
-<a name="l00192"></a>00192    <span class="keywordflow">for</span> ( uint8_t i = 0; i &lt; 4; i++ )
-<a name="l00193"></a>00193    {
-<a name="l00194"></a>00194       <span class="keywordflow">if</span> ( ( value &amp; 0x1 ) == 1 )
-<a name="l00195"></a>00195       {
-<a name="l00196"></a>00196          pinMapValue |= _data_pins[i];
-<a name="l00197"></a>00197       }
-<a name="l00198"></a>00198       value = ( value &gt;&gt; 1 );
-<a name="l00199"></a>00199    }
-<a name="l00200"></a>00200    
-<a name="l00201"></a>00201    <span class="comment">// Is it a command or data</span>
-<a name="l00202"></a>00202    <span class="comment">// -----------------------</span>
-<a name="l00203"></a>00203    <span class="keywordflow">if</span> ( mode == <a class="code" href="_l_c_d_8h.html#aad9ae913bdfab20dd94ad04ee2d5b045">DATA</a> )
-<a name="l00204"></a>00204    {
-<a name="l00205"></a>00205       mode = _Rs;
-<a name="l00206"></a>00206    }
-<a name="l00207"></a>00207    
-<a name="l00208"></a>00208    pinMapValue |= mode | _backlightMask;
-<a name="l00209"></a>00209    _i2cio.<a class="code" href="class_i2_c_i_o.html#ae2063569c927d0008e2593d14504fdcd">write</a> ( pinMapValue );
-<a name="l00210"></a>00210    pulseEnable ( pinMapValue );
-<a name="l00211"></a>00211 }
-<a name="l00212"></a>00212 
-<a name="l00213"></a>00213 <span class="comment">//</span>
-<a name="l00214"></a>00214 <span class="comment">// pulseEnable</span>
-<a name="l00215"></a>00215 <span class="keywordtype">void</span> LiquidCrystal_I2C::pulseEnable (uint8_t _data)
-<a name="l00216"></a>00216 {
-<a name="l00217"></a>00217    _i2cio.<a class="code" href="class_i2_c_i_o.html#ae2063569c927d0008e2593d14504fdcd">write</a> (_data | _En);   <span class="comment">// En HIGH</span>
-<a name="l00218"></a>00218    _i2cio.<a class="code" href="class_i2_c_i_o.html#ae2063569c927d0008e2593d14504fdcd">write</a> (_data &amp; ~_En);  <span class="comment">// En LOW</span>
-<a name="l00219"></a>00219 }
+<a name="l00027"></a>00027 <span class="comment">//</span>
+<a name="l00028"></a>00028 <span class="comment">// @author F. Malpartida - fmalpartida@gmail.com</span>
+<a name="l00029"></a>00029 <span class="comment">// ---------------------------------------------------------------------------</span>
+<a name="l00030"></a>00030 <span class="preprocessor">#if (ARDUINO &lt;  100)</span>
+<a name="l00031"></a>00031 <span class="preprocessor"></span><span class="preprocessor">#include &lt;WProgram.h&gt;</span>
+<a name="l00032"></a>00032 <span class="preprocessor">#else</span>
+<a name="l00033"></a>00033 <span class="preprocessor"></span><span class="preprocessor">#include &lt;Arduino.h&gt;</span>
+<a name="l00034"></a>00034 <span class="preprocessor">#endif</span>
+<a name="l00035"></a>00035 <span class="preprocessor"></span><span class="preprocessor">#include &lt;inttypes.h&gt;</span>
+<a name="l00036"></a>00036 <span class="preprocessor">#include &quot;<a class="code" href="_i2_c_i_o_8h.html">I2CIO.h</a>&quot;</span>
+<a name="l00037"></a>00037 <span class="preprocessor">#include &quot;<a class="code" href="_liquid_crystal___i2_c_8h.html">LiquidCrystal_I2C.h</a>&quot;</span>
+<a name="l00038"></a>00038 
+<a name="l00039"></a>00039 <span class="comment">// CONSTANT  definitions</span>
+<a name="l00040"></a>00040 <span class="comment">// ---------------------------------------------------------------------------</span>
+<a name="l00041"></a>00041 
+<a name="l00042"></a>00042 <span class="comment">// flags for backlight control</span>
+<a name="l00043"></a><a class="code" href="_liquid_crystal___i2_c_8cpp.html#a65fa786d6e31fe8b1aa51784a9736581">00043</a> <span class="preprocessor">#define LCD_NOBACKLIGHT 0x00</span>
+<a name="l00044"></a><a class="code" href="_liquid_crystal___i2_c_8cpp.html#ac059d24dfe9c1e1f7c07cb7869a1833b">00044</a> <span class="preprocessor"></span><span class="preprocessor">#define LCD_BACKLIGHT   0xFF</span>
+<a name="l00045"></a>00045 <span class="preprocessor"></span>
+<a name="l00046"></a>00046 
+<a name="l00047"></a>00047 <span class="comment">// CONSTRUCTORS</span>
+<a name="l00048"></a>00048 <span class="comment">// ---------------------------------------------------------------------------</span>
+<a name="l00049"></a><a class="code" href="class_liquid_crystal___i2_c.html#aac537d195557e0b8afac1a71441a484c">00049</a> <a class="code" href="class_liquid_crystal___i2_c.html#aac537d195557e0b8afac1a71441a484c">LiquidCrystal_I2C::LiquidCrystal_I2C</a>( uint8_t lcd_Addr )
+<a name="l00050"></a>00050 {
+<a name="l00051"></a>00051    _Addr = lcd_Addr;
+<a name="l00052"></a>00052    
+<a name="l00053"></a>00053    _backlightPin  = 0x0;
+<a name="l00054"></a>00054    _backlightMask = <a class="code" href="_liquid_crystal___i2_c_8cpp.html#a65fa786d6e31fe8b1aa51784a9736581">LCD_NOBACKLIGHT</a>;
+<a name="l00055"></a>00055    
+<a name="l00056"></a>00056    _En = <a class="code" href="_liquid_crystal___i2_c_8h.html#a22e6626f2c98ed902f8ded47f6438c05">EN</a>;
+<a name="l00057"></a>00057    _Rw = <a class="code" href="_liquid_crystal___i2_c_8h.html#afc4ded33ac0ca43defcce639e965748a">RW</a>;
+<a name="l00058"></a>00058    _Rs = <a class="code" href="_liquid_crystal___i2_c_8h.html#af8903d8eea3868940c60af887473b152">RS</a>;
+<a name="l00059"></a>00059    
+<a name="l00060"></a>00060    <span class="comment">// Initialise default values data[0] pin 0, data[1] pin 1, ...</span>
+<a name="l00061"></a>00061    <span class="keywordflow">for</span> ( uint8_t i = 0; i &lt; 4; i++ )
+<a name="l00062"></a>00062    {
+<a name="l00063"></a>00063       _data_pins[i] = ( 1 &lt;&lt; i );
+<a name="l00064"></a>00064    }
+<a name="l00065"></a>00065 }
+<a name="l00066"></a>00066 
+<a name="l00067"></a><a class="code" href="class_liquid_crystal___i2_c.html#a517f8847ebf09f0eacfb9c7232975fce">00067</a> <a class="code" href="class_liquid_crystal___i2_c.html#aac537d195557e0b8afac1a71441a484c">LiquidCrystal_I2C::LiquidCrystal_I2C</a>( uint8_t lcd_Addr, uint8_t En, uint8_t Rw,
+<a name="l00068"></a>00068                                       uint8_t Rs)
+<a name="l00069"></a>00069 {
+<a name="l00070"></a>00070    _Addr = lcd_Addr;
+<a name="l00071"></a>00071    
+<a name="l00072"></a>00072    _backlightPin  = 0;
+<a name="l00073"></a>00073    _backlightMask = <a class="code" href="_liquid_crystal___i2_c_8cpp.html#a65fa786d6e31fe8b1aa51784a9736581">LCD_NOBACKLIGHT</a>;
+<a name="l00074"></a>00074    
+<a name="l00075"></a>00075    _En = ( 1 &lt;&lt; En );
+<a name="l00076"></a>00076    _Rw = ( 1 &lt;&lt; Rw );
+<a name="l00077"></a>00077    _Rs = ( 1 &lt;&lt; Rs );
+<a name="l00078"></a>00078    
+<a name="l00079"></a>00079    <span class="comment">// Initialise default values data[0] pin 0, data[1] pin 1, ...</span>
+<a name="l00080"></a>00080    <span class="keywordflow">for</span> ( uint8_t i = 0; i &lt; 4; i++ )
+<a name="l00081"></a>00081    {
+<a name="l00082"></a>00082       _data_pins[i] = ( 1 &lt;&lt; i );
+<a name="l00083"></a>00083    }
+<a name="l00084"></a>00084 }
+<a name="l00085"></a>00085 
+<a name="l00086"></a><a class="code" href="class_liquid_crystal___i2_c.html#ac235f66c3d56320fca89545d0176caf5">00086</a> <a class="code" href="class_liquid_crystal___i2_c.html#aac537d195557e0b8afac1a71441a484c">LiquidCrystal_I2C::LiquidCrystal_I2C</a>( uint8_t lcd_Addr, uint8_t En, uint8_t Rw,
+<a name="l00087"></a>00087                                      uint8_t Rs, uint8_t d0, uint8_t d1,
+<a name="l00088"></a>00088                                      uint8_t d2, uint8_t d3 )
+<a name="l00089"></a>00089 {
+<a name="l00090"></a>00090    _Addr = lcd_Addr;
+<a name="l00091"></a>00091    
+<a name="l00092"></a>00092    _backlightPin  = 0;
+<a name="l00093"></a>00093    _backlightMask = <a class="code" href="_liquid_crystal___i2_c_8cpp.html#a65fa786d6e31fe8b1aa51784a9736581">LCD_NOBACKLIGHT</a>;
+<a name="l00094"></a>00094 
+<a name="l00095"></a>00095    _En = ( 1 &lt;&lt; En );
+<a name="l00096"></a>00096    _Rw = ( 1 &lt;&lt; Rw );
+<a name="l00097"></a>00097    _Rs = ( 1 &lt;&lt; Rs );
+<a name="l00098"></a>00098    
+<a name="l00099"></a>00099    <span class="comment">// Initialise pin mapping</span>
+<a name="l00100"></a>00100    _data_pins[0] = ( 1 &lt;&lt; d0 );
+<a name="l00101"></a>00101    _data_pins[1] = ( 1 &lt;&lt; d1 );
+<a name="l00102"></a>00102    _data_pins[2] = ( 1 &lt;&lt; d2 );
+<a name="l00103"></a>00103    _data_pins[3] = ( 1 &lt;&lt; d3 );
+<a name="l00104"></a>00104 }
+<a name="l00105"></a>00105 
+<a name="l00106"></a>00106 <span class="comment">// PUBLIC METHODS</span>
+<a name="l00107"></a>00107 <span class="comment">// ---------------------------------------------------------------------------</span>
+<a name="l00108"></a>00108 
+<a name="l00109"></a>00109 <span class="comment">//</span>
+<a name="l00110"></a>00110 <span class="comment">// begin</span>
+<a name="l00111"></a><a class="code" href="class_liquid_crystal___i2_c.html#aeee2ada537f0cfbfda8613324b57c4a6">00111</a> <span class="keywordtype">void</span> <a class="code" href="class_liquid_crystal___i2_c.html#aeee2ada537f0cfbfda8613324b57c4a6">LiquidCrystal_I2C::begin</a>(uint8_t cols, uint8_t lines, uint8_t dotsize) 
+<a name="l00112"></a>00112 {
+<a name="l00113"></a>00113    
+<a name="l00114"></a>00114    init();     <span class="comment">// Initialise the I2C expander interface</span>
+<a name="l00115"></a>00115    <a class="code" href="class_liquid_crystal___i2_c.html#aeee2ada537f0cfbfda8613324b57c4a6">LCD::begin</a> ( cols, lines, dotsize );   
+<a name="l00116"></a>00116 }
+<a name="l00117"></a>00117 
+<a name="l00118"></a>00118 
+<a name="l00119"></a>00119 <span class="comment">// User commands - users can expand this section</span>
+<a name="l00120"></a>00120 <span class="comment">//----------------------------------------------------------------------------</span>
+<a name="l00121"></a>00121 
+<a name="l00122"></a>00122 <span class="comment">// Turn the (optional) backlight off/on</span>
+<a name="l00123"></a>00123 <span class="comment">//</span>
+<a name="l00124"></a>00124 <span class="comment">// setBacklight</span>
+<a name="l00125"></a><a class="code" href="class_liquid_crystal___i2_c.html#a2f248fc841812e850f29114667f41440">00125</a> <span class="keywordtype">void</span> <a class="code" href="class_liquid_crystal___i2_c.html#a2f248fc841812e850f29114667f41440">LiquidCrystal_I2C::setBacklight</a>( uint8_t mode ) 
+<a name="l00126"></a>00126 {
+<a name="l00127"></a>00127    <span class="keywordflow">if</span> ( mode == HIGH )
+<a name="l00128"></a>00128    {
+<a name="l00129"></a>00129       _backlightMask = _backlightPin &amp; <a class="code" href="_liquid_crystal___i2_c_8cpp.html#ac059d24dfe9c1e1f7c07cb7869a1833b">LCD_BACKLIGHT</a>;
+<a name="l00130"></a>00130       
+<a name="l00131"></a>00131    }
+<a name="l00132"></a>00132    <span class="keywordflow">else</span> 
+<a name="l00133"></a>00133    {
+<a name="l00134"></a>00134       _backlightMask = _backlightPin &amp; <a class="code" href="_liquid_crystal___i2_c_8cpp.html#a65fa786d6e31fe8b1aa51784a9736581">LCD_NOBACKLIGHT</a>;
+<a name="l00135"></a>00135    }
+<a name="l00136"></a>00136    _i2cio.<a class="code" href="class_i2_c_i_o.html#ae2063569c927d0008e2593d14504fdcd">write</a>( _backlightMask );
+<a name="l00137"></a>00137 }
+<a name="l00138"></a>00138 
+<a name="l00139"></a>00139 <span class="comment">//</span>
+<a name="l00140"></a>00140 <span class="comment">// setBacklightPin</span>
+<a name="l00141"></a><a class="code" href="class_liquid_crystal___i2_c.html#a715027a10c1141fe5442fe58cb3a405a">00141</a> <span class="keywordtype">void</span> <a class="code" href="class_liquid_crystal___i2_c.html#a715027a10c1141fe5442fe58cb3a405a">LiquidCrystal_I2C::setBacklightPin</a> ( uint8_t pin )
+<a name="l00142"></a>00142 {
+<a name="l00143"></a>00143    _backlightPin = ( 1 &lt;&lt; pin );
+<a name="l00144"></a>00144 }
+<a name="l00145"></a>00145 
+<a name="l00146"></a>00146 <span class="comment">// PRIVATE METHODS</span>
+<a name="l00147"></a>00147 <span class="comment">// ---------------------------------------------------------------------------</span>
+<a name="l00148"></a>00148 
+<a name="l00149"></a>00149 <span class="comment">//</span>
+<a name="l00150"></a>00150 <span class="comment">// init</span>
+<a name="l00151"></a>00151 <span class="keywordtype">int</span> LiquidCrystal_I2C::init()
+<a name="l00152"></a>00152 {
+<a name="l00153"></a>00153    <span class="keywordtype">int</span> status = 0;
+<a name="l00154"></a>00154    
+<a name="l00155"></a>00155    <span class="comment">// initialize the backpack IO expander</span>
+<a name="l00156"></a>00156    <span class="comment">// and display functions.</span>
+<a name="l00157"></a>00157    <span class="comment">// ------------------------------------------------------------------------</span>
+<a name="l00158"></a>00158    <span class="keywordflow">if</span> ( _i2cio.<a class="code" href="class_i2_c_i_o.html#a6f814653d903dc2ff6e8420eeb7954ae">begin</a> ( _Addr ) == 1 )
+<a name="l00159"></a>00159    {
+<a name="l00160"></a>00160       _i2cio.<a class="code" href="class_i2_c_i_o.html#a0341888753bc54c4384f5593a870fb34">portMode</a> ( OUTPUT );  <span class="comment">// Set the entire IO extender to OUTPUT</span>
+<a name="l00161"></a>00161       <a class="code" href="class_l_c_d.html#aef093ba3f8e1016267b40ac235a0fa0f">_displayfunction</a> = <a class="code" href="_l_c_d_8h.html#ab8c35d355d2372090c7a347e961c9224">LCD_4BITMODE</a> | <a class="code" href="_l_c_d_8h.html#a8c85cf88d8af66a47c42249d81c94641">LCD_1LINE</a> | <a class="code" href="_l_c_d_8h.html#a9ef57e724c1b846dae0f531aff6fb464"