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