Skip to content

Commit d561db0

Browse files
committed
Code cleanup: remove trailing whitespaces
1 parent 7c3bedb commit d561db0

File tree

2 files changed

+35
-35
lines changed

2 files changed

+35
-35
lines changed

LiquidCrystal_I2C.cpp

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,17 @@
66
// When the display powers up, it is configured as follows:
77
//
88
// 1. Display clear
9-
// 2. Function set:
10-
// DL = 1; 8-bit interface data
11-
// N = 0; 1-line display
12-
// F = 0; 5x8 dot character font
13-
// 3. Display on/off control:
14-
// D = 0; Display off
15-
// C = 0; Cursor off
16-
// B = 0; Blinking off
17-
// 4. Entry mode set:
9+
// 2. Function set:
10+
// DL = 1; 8-bit interface data
11+
// N = 0; 1-line display
12+
// F = 0; 5x8 dot character font
13+
// 3. Display on/off control:
14+
// D = 0; Display off
15+
// C = 0; Cursor off
16+
// B = 0; Blinking off
17+
// 4. Entry mode set:
1818
// I/D = 1; Increment by 1
19-
// S = 0; No shift
19+
// S = 0; No shift
2020
//
2121
// Note, however, that resetting the Arduino doesn't reset the LCD, so we
2222
// can't assume that its in that state when a sketch starts (and the
@@ -47,7 +47,7 @@ void LiquidCrystal_I2C::begin() {
4747
// SEE PAGE 45/46 FOR INITIALIZATION SPECIFICATION!
4848
// according to datasheet, we need at least 40ms after power rises above 2.7V
4949
// before sending commands. Arduino can turn on way befer 4.5V so we'll wait 50
50-
delay(50);
50+
delay(50);
5151

5252
// Now we pull both RS and R/W low to begin commands
5353
expanderWrite(_backlightval); // reset expanderand turn backlight off (Bit 8 =1)
@@ -66,28 +66,28 @@ void LiquidCrystal_I2C::begin() {
6666
delayMicroseconds(4500); // wait min 4.1ms
6767

6868
// third go!
69-
write4bits(0x03 << 4);
69+
write4bits(0x03 << 4);
7070
delayMicroseconds(150);
7171

7272
// finally, set to 4-bit interface
73-
write4bits(0x02 << 4);
73+
write4bits(0x02 << 4);
7474

7575
// set # lines, font size, etc.
76-
command(LCD_FUNCTIONSET | _displayfunction);
77-
76+
command(LCD_FUNCTIONSET | _displayfunction);
77+
7878
// turn the display on with no cursor or blinking default
7979
_displaycontrol = LCD_DISPLAYON | LCD_CURSOROFF | LCD_BLINKOFF;
8080
display();
81-
81+
8282
// clear it off
8383
clear();
84-
84+
8585
// Initialize to default text direction (for roman languages)
8686
_displaymode = LCD_ENTRYLEFT | LCD_ENTRYSHIFTDECREMENT;
87-
87+
8888
// set the entry mode
8989
command(LCD_ENTRYMODESET | _displaymode);
90-
90+
9191
home();
9292
}
9393

@@ -212,24 +212,24 @@ void LiquidCrystal_I2C::send(uint8_t value, uint8_t mode) {
212212
uint8_t highnib=value&0xf0;
213213
uint8_t lownib=(value<<4)&0xf0;
214214
write4bits((highnib)|mode);
215-
write4bits((lownib)|mode);
215+
write4bits((lownib)|mode);
216216
}
217217

218218
void LiquidCrystal_I2C::write4bits(uint8_t value) {
219219
expanderWrite(value);
220220
pulseEnable(value);
221221
}
222222

223-
void LiquidCrystal_I2C::expanderWrite(uint8_t _data){
223+
void LiquidCrystal_I2C::expanderWrite(uint8_t _data){
224224
Wire.beginTransmission(_addr);
225225
Wire.write((int)(_data) | _backlightval);
226-
Wire.endTransmission();
226+
Wire.endTransmission();
227227
}
228228

229229
void LiquidCrystal_I2C::pulseEnable(uint8_t _data){
230230
expanderWrite(_data | En); // En high
231231
delayMicroseconds(1); // enable pulse must be >450ns
232-
232+
233233
expanderWrite(_data & ~En); // En low
234234
delayMicroseconds(50); // commands need > 37us to settle
235235
}
@@ -248,6 +248,6 @@ void LiquidCrystal_I2C::setBacklight(uint8_t new_val){
248248

249249
void LiquidCrystal_I2C::printstr(const char c[]){
250250
//This function is not identical to the function used for "real" I2C displays
251-
//it's here so the user sketch doesn't have to be changed
251+
//it's here so the user sketch doesn't have to be changed
252252
print(c);
253253
}

LiquidCrystal_I2C.h

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -74,13 +74,13 @@ class LiquidCrystal_I2C : public Print {
7474
* Set the LCD display in the correct begin state, must be called before anything else is done.
7575
*/
7676
void begin();
77-
77+
7878
/**
7979
* Remove all the characters currently shown. Next print/write operation will start
8080
* from the first position on LCD display.
8181
*/
8282
void clear();
83-
83+
8484
/**
8585
* Next print/write operation will will start from the first position on the LCD display.
8686
*/
@@ -91,22 +91,22 @@ class LiquidCrystal_I2C : public Print {
9191
* Also all characters written on the display will return, when the display in enabled again.
9292
*/
9393
void noDisplay();
94-
94+
9595
/**
9696
* Show the characters on the LCD display, this is the normal behaviour. This method should
9797
* only be used after noDisplay() has been used.
98-
*/
98+
*/
9999
void display();
100100

101101
/**
102102
* Do not blink the cursor indicator.
103103
*/
104104
void noBlink();
105-
105+
106106
/**
107107
* Start blinking the cursor indicator.
108-
*/
109-
void blink();
108+
*/
109+
void blink();
110110

111111
/**
112112
* Do not show a cursor indicator.
@@ -116,7 +116,7 @@ class LiquidCrystal_I2C : public Print {
116116
/**
117117
* Show a cursor indicator, cursor can blink on not blink. Use the
118118
* methods blink() and noBlink() for changing cursor blink.
119-
*/
119+
*/
120120
void cursor();
121121

122122
void scrollDisplayLeft();
@@ -130,9 +130,9 @@ class LiquidCrystal_I2C : public Print {
130130
void noBacklight();
131131
void backlight();
132132
void autoscroll();
133-
void noAutoscroll();
133+
void noAutoscroll();
134134
void createChar(uint8_t, uint8_t[]);
135-
void setCursor(uint8_t, uint8_t);
135+
void setCursor(uint8_t, uint8_t);
136136
virtual size_t write(uint8_t);
137137
void command(uint8_t);
138138

@@ -145,7 +145,7 @@ class LiquidCrystal_I2C : public Print {
145145
void setBacklight(uint8_t new_val); // alias for backlight() and nobacklight()
146146
void load_custom_character(uint8_t char_num, uint8_t *rows); // alias for createChar()
147147
void printstr(const char[]);
148-
148+
149149
private:
150150
void send(uint8_t, uint8_t);
151151
void write4bits(uint8_t);

0 commit comments

Comments
 (0)