mirror of
https://github.com/fmalpartida/New-LiquidCrystal.git
synced 2026-07-27 19:56:57 +00:00
Updated and corrected minor but that caused firmware to hang if LCD not present and trying to initialise it and use it.
Updated documentation for SR 3 Wire.
This commit is contained in:
@@ -51,7 +51,16 @@ I2CIO::I2CIO ( )
|
||||
|
||||
// PUBLIC METHODS
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
Wire.beginTransmission(DisplayI2CAddress);
|
||||
error = Wire.endTransmission();
|
||||
if (error==0){
|
||||
return 1;
|
||||
}
|
||||
else //Some error occured
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
//
|
||||
// begin
|
||||
int I2CIO::begin ( uint8_t i2cAddr )
|
||||
@@ -61,13 +70,15 @@ int I2CIO::begin ( uint8_t i2cAddr )
|
||||
Wire.begin ( );
|
||||
|
||||
_initialised = Wire.requestFrom ( _i2cAddr, (uint8_t)1 );
|
||||
|
||||
#if (ARDUINO < 100)
|
||||
_shadow = Wire.receive ();
|
||||
#else
|
||||
_shadow = Wire.read (); // Remove the byte read don't need it.
|
||||
#endif
|
||||
|
||||
if (_initialised)
|
||||
{
|
||||
#if (ARDUINO < 100)
|
||||
_shadow = Wire.receive ();
|
||||
#else
|
||||
_shadow = Wire.read (); // Remove the byte read don't need it.
|
||||
#endif
|
||||
}
|
||||
return ( _initialised );
|
||||
}
|
||||
|
||||
|
||||
@@ -138,7 +138,9 @@ public:
|
||||
@discussion Sets the pin in the device to control the backlight. This device
|
||||
doesn't support dimming backlight capability.
|
||||
|
||||
@param 0: backlight off, 1..255: backlight on.
|
||||
@param value: pin mapped on the 74HC595N (0, .., 7) for (Qa0, .., Qh7)
|
||||
respectively.
|
||||
@param pol: polarity POSITIVE|NEGATIVE.
|
||||
*/
|
||||
void setBacklightPin ( uint8_t value, t_backlighPol pol );
|
||||
|
||||
|
||||
Reference in New Issue
Block a user