@@ -37,18 +37,19 @@ class LiquidCrystal_PCF8574 : public Print
37
37
// There is no sda and scl parameter for i2c in any api.
38
38
// The Wire library has standard settings that can be overwritten by using Wire.begin(int sda, int scl) before calling LiquidCrystal_PCF8574::begin();
39
39
40
- // constructors, which allows to redefine bit assignments in case your adapter is wired differently
40
+ // constructors, which allow to redefine bit assignments in case your adapter is wired differently
41
41
LiquidCrystal_PCF8574 (uint8_t i2cAddr, uint8_t rs, uint8_t enable,
42
42
uint8_t d4, uint8_t d5, uint8_t d6, uint8_t d7, uint8_t backlight=255 );
43
43
LiquidCrystal_PCF8574 (uint8_t i2cAddr, uint8_t rs, uint8_t rw, uint8_t enable,
44
44
uint8_t d4, uint8_t d5, uint8_t d6, uint8_t d7, uint8_t backlight=255 );
45
45
46
- // Funtions from reference:
46
+ // Functions from reference:
47
47
48
- void begin (int cols, int rows);
48
+ void begin (uint8_t cols, uint8_t rows);
49
49
50
+ void clear ();
50
51
void home ();
51
- void setCursor (int col, int row);
52
+ void setCursor (uint8_t col, uint8_t row);
52
53
void cursor ();
53
54
void noCursor ();
54
55
void blink ();
@@ -61,7 +62,7 @@ class LiquidCrystal_PCF8574 : public Print
61
62
void noAutoscroll ();
62
63
void leftToRight ();
63
64
void rightToLeft ();
64
- void createChar (int , byte[]);
65
+ void createChar (uint8_t , byte[]);
65
66
#ifdef __AVR__
66
67
void createChar_P (uint8_t , const byte *);
67
68
inline void createChar (uint8_t n, const byte *data) {
@@ -70,23 +71,22 @@ class LiquidCrystal_PCF8574 : public Print
70
71
#endif
71
72
72
73
// plus functions from LCDAPI:
73
- void clear ();
74
- void setBacklight (int brightness);
74
+ void setBacklight (uint8_t brightness);
75
75
inline void command (uint8_t value) { _send (value); }
76
76
77
77
// support of Print class
78
78
virtual size_t write (uint8_t ch);
79
79
80
80
private:
81
81
// instance variables
82
- int _i2cAddr; // /< Wire Address of the LCD
83
- int _backlight; // /< the backlight intensity
84
- int _cols; // /< number of cols of the display
85
- int _lines; // /< number of lines of the display
86
- int _entrymode; // /<flags from entrymode
87
- int _displaycontrol; // /<flags from displaycontrol
88
- int _row_offsets[4 ];
89
-
82
+ uint8_t _i2cAddr; // /< Wire Address of the LCD
83
+ uint8_t _backlight; // /< the backlight intensity
84
+ uint8_t _cols; // /< number of cols of the display
85
+ uint8_t _lines; // /< number of lines of the display
86
+ uint8_t _entrymode; // /<flags from entrymode
87
+ uint8_t _displaycontrol; // /<flags from displaycontrol
88
+ uint8_t _row_offsets[4 ];
89
+
90
90
// variables describing how the PCF8574 is connected to the LCD
91
91
uint8_t _rs_mask;
92
92
uint8_t _rw_mask;
@@ -97,7 +97,7 @@ class LiquidCrystal_PCF8574 : public Print
97
97
98
98
// low level functions
99
99
void _send (uint8_t value, bool isData = false );
100
- void _sendNibble (int halfByte, bool isData = false );
100
+ void _sendNibble (uint8_t halfByte, bool isData = false );
101
101
void _write2Wire (uint8_t data, bool isData, bool enable);
102
102
103
103
void init (uint8_t i2cAddr, uint8_t rs, uint8_t rw, uint8_t enable,
0 commit comments