This commit is contained in:
Maarten Segers
2016-11-25 21:34:41 +01:00
parent 1a287c0b34
commit 8059e37144
9 changed files with 11 additions and 11 deletions
+2 -2
View File
@@ -361,12 +361,12 @@ void LCD::command(uint8_t value)
#if (ARDUINO < 100)
void LCD::write(uint8_t value)
{
send(value, DATA);
send(value, LCD_DATA);
}
#else
size_t LCD::write(uint8_t value)
{
send(value, DATA);
send(value, LCD_DATA);
return 1; // assume OK
}
#endif
+1 -1
View File
@@ -148,7 +148,7 @@ inline static void waitUsec ( uint16_t uSec )
// Define COMMAND and DATA LCD Rs (used by send method).
// ---------------------------------------------------------------------------
#define COMMAND 0
#define DATA 1
#define LCD_DATA 1
#define FOUR_BITS 2
+1 -1
View File
@@ -122,7 +122,7 @@ LiquidCrystal::LiquidCrystal(uint8_t rs, uint8_t enable,
void LiquidCrystal::send(uint8_t value, uint8_t mode)
{
// Only interested in COMMAND or DATA
digitalWrite( _rs_pin, ( mode == DATA ) );
digitalWrite( _rs_pin, ( mode == LCD_DATA ) );
// if there is a RW pin indicated, set it low to Write
// ---------------------------------------------------
+1 -1
View File
@@ -273,7 +273,7 @@ void LiquidCrystal_I2C::write4bits ( uint8_t value, uint8_t mode )
// Is it a command or data
// -----------------------
if ( mode == DATA )
if ( mode == LCD_DATA )
{
mode = _Rs;
}
+1 -1
View File
@@ -279,7 +279,7 @@ void LiquidCrystal_SI2C::write4bits ( uint8_t value, uint8_t mode )
// Is it a command or data
// -----------------------
if ( mode == DATA )
if ( mode == LCD_DATA )
{
mode = _Rs;
}
+1 -1
View File
@@ -174,7 +174,7 @@ void LiquidCrystal_SR::send(uint8_t value, uint8_t mode)
// Divide byte in two nibbles include the RS signal
// and format it for shiftregister output wiring to the LCD
// We are only interested in my COMMAND or DATA for myMode
uint8_t myMode = ( mode == DATA ) ? SR_RS_BIT : 0; // RS bit; LOW: command. HIGH: character.
uint8_t myMode = ( mode == LCD_DATA ) ? SR_RS_BIT : 0; // RS bit; LOW: command. HIGH: character.
if ( mode != FOUR_BITS )
{
+2 -2
View File
@@ -201,7 +201,7 @@ void LiquidCrystal_SR1W::send(uint8_t value, uint8_t mode)
if ( mode != FOUR_BITS )
{
// upper nibble
data = ( mode == DATA ) ? SR1W_RS_MASK : 0;
data = ( mode == LCD_DATA ) ? SR1W_RS_MASK : 0;
data |= SR1W_EN_MASK | SR1W_UNUSED_MASK;
data |= _blMask;
@@ -214,7 +214,7 @@ void LiquidCrystal_SR1W::send(uint8_t value, uint8_t mode)
}
// lower nibble
data = ( mode == DATA ) ? SR1W_RS_MASK : 0;
data = ( mode == LCD_DATA ) ? SR1W_RS_MASK : 0;
data |= SR1W_EN_MASK | SR1W_UNUSED_MASK;
data |= _blMask;
+1 -1
View File
@@ -89,7 +89,7 @@ void LiquidCrystal_SR2W::loadSR(uint8_t val)
// send
void LiquidCrystal_SR2W::send(uint8_t value, uint8_t mode)
{
uint8_t myMode = ( mode == DATA ) ? SR2W_RS_MASK : 0;
uint8_t myMode = ( mode == LCD_DATA ) ? SR2W_RS_MASK : 0;
myMode = myMode | SR2W_EN_MASK | _blMask;
+1 -1
View File
@@ -261,7 +261,7 @@ void LiquidCrystal_SR3W::write4bits(uint8_t value, uint8_t mode)
// Is it a command or data
// -----------------------
mode = ( mode == DATA ) ? _Rs : 0;
mode = ( mode == LCD_DATA ) ? _Rs : 0;
pinMapValue |= mode | _backlightStsMask;
loadSR ( pinMapValue | _En ); // Send with enable high