|
53 | 53 |
|
54 | 54 | class LiquidCrystal_I2C : public Print {
|
55 | 55 | public:
|
56 |
| - LiquidCrystal_I2C(uint8_t lcd_Addr,uint8_t lcd_cols,uint8_t lcd_rows); |
57 |
| - void begin(uint8_t cols, uint8_t rows, uint8_t charsize = LCD_5x8DOTS ); |
58 |
| - void clear(); |
59 |
| - void home(); |
60 |
| - void noDisplay(); |
61 |
| - void display(); |
62 |
| - void noBlink(); |
63 |
| - void blink(); |
64 |
| - void noCursor(); |
65 |
| - void cursor(); |
66 |
| - void scrollDisplayLeft(); |
67 |
| - void scrollDisplayRight(); |
68 |
| - void printLeft(); |
69 |
| - void printRight(); |
70 |
| - void leftToRight(); |
71 |
| - void rightToLeft(); |
72 |
| - void shiftIncrement(); |
73 |
| - void shiftDecrement(); |
74 |
| - void noBacklight(); |
75 |
| - void backlight(); |
76 |
| - void autoscroll(); |
77 |
| - void noAutoscroll(); |
78 |
| - void createChar(uint8_t, uint8_t[]); |
79 |
| - void setCursor(uint8_t, uint8_t); |
80 |
| - virtual size_t write(uint8_t); |
81 |
| - void command(uint8_t); |
82 |
| - void init(); |
| 56 | + LiquidCrystal_I2C(uint8_t lcd_Addr,uint8_t lcd_cols,uint8_t lcd_rows); |
| 57 | + void begin(uint8_t cols, uint8_t rows, uint8_t charsize = LCD_5x8DOTS ); |
| 58 | + void clear(); |
| 59 | + void home(); |
| 60 | + void noDisplay(); |
| 61 | + void display(); |
| 62 | + void noBlink(); |
| 63 | + void blink(); |
| 64 | + void noCursor(); |
| 65 | + void cursor(); |
| 66 | + void scrollDisplayLeft(); |
| 67 | + void scrollDisplayRight(); |
| 68 | + void printLeft(); |
| 69 | + void printRight(); |
| 70 | + void leftToRight(); |
| 71 | + void rightToLeft(); |
| 72 | + void shiftIncrement(); |
| 73 | + void shiftDecrement(); |
| 74 | + void noBacklight(); |
| 75 | + void backlight(); |
| 76 | + void autoscroll(); |
| 77 | + void noAutoscroll(); |
| 78 | + void createChar(uint8_t, uint8_t[]); |
| 79 | + void setCursor(uint8_t, uint8_t); |
| 80 | + virtual size_t write(uint8_t); |
| 81 | + void command(uint8_t); |
| 82 | + void init(); |
83 | 83 |
|
84 |
| -void blink_on() { blink(); } |
85 |
| -void blink_off() { noBlink(); } |
86 |
| -void cursor_on() { cursor(); } |
87 |
| -void cursor_off() { noCursor(); } |
| 84 | + inline void blink_on() { blink(); } |
| 85 | + inline void blink_off() { noBlink(); } |
| 86 | + inline void cursor_on() { cursor(); } |
| 87 | + inline void cursor_off() { noCursor(); } |
88 | 88 |
|
89 |
| -////compatibility API function aliases |
90 |
| -void setBacklight(uint8_t new_val); // alias for backlight() and nobacklight() |
91 |
| -void load_custom_character(uint8_t char_num, uint8_t *rows); // alias for createChar() |
92 |
| -void printstr(const char[]); |
| 89 | +// Compatibility API function aliases |
| 90 | + void setBacklight(uint8_t new_val); // alias for backlight() and nobacklight() |
| 91 | + void load_custom_character(uint8_t char_num, uint8_t *rows); // alias for createChar() |
| 92 | + void printstr(const char[]); |
93 | 93 |
|
94 |
| -////Unsupported API functions (not implemented in this library) |
95 |
| -uint8_t status(); |
96 |
| -void setContrast(uint8_t new_val); |
97 |
| -uint8_t keypad(); |
98 |
| -void setDelay(int,int); |
99 |
| -void on(); |
100 |
| -void off(); |
101 |
| -uint8_t init_bargraph(uint8_t graphtype); |
102 |
| -void draw_horizontal_graph(uint8_t row, uint8_t column, uint8_t len, uint8_t pixel_col_end); |
103 |
| -void draw_vertical_graph(uint8_t row, uint8_t column, uint8_t len, uint8_t pixel_col_end); |
| 94 | +// Unsupported API functions (not implemented in this library) |
| 95 | + uint8_t status(); |
| 96 | + void setContrast(uint8_t new_val); |
| 97 | + uint8_t keypad(); |
| 98 | + void setDelay(int,int); |
| 99 | + void on(); |
| 100 | + void off(); |
| 101 | + uint8_t init_bargraph(uint8_t graphtype); |
| 102 | + void draw_horizontal_graph(uint8_t row, uint8_t column, uint8_t len, uint8_t pixel_col_end); |
| 103 | + void draw_vertical_graph(uint8_t row, uint8_t column, uint8_t len, uint8_t pixel_col_end); |
104 | 104 |
|
105 |
| - |
106 | 105 | private:
|
107 |
| - void init_priv(); |
108 |
| - void send(uint8_t, uint8_t); |
109 |
| - void write4bits(uint8_t); |
110 |
| - void expanderWrite(uint8_t); |
111 |
| - void pulseEnable(uint8_t); |
112 |
| - uint8_t _Addr; |
113 |
| - uint8_t _displayfunction; |
114 |
| - uint8_t _displaycontrol; |
115 |
| - uint8_t _displaymode; |
116 |
| - uint8_t _numlines; |
117 |
| - uint8_t _cols; |
118 |
| - uint8_t _rows; |
119 |
| - uint8_t _backlightval; |
| 106 | + void init_priv(); |
| 107 | + void send(uint8_t, uint8_t); |
| 108 | + void write4bits(uint8_t); |
| 109 | + void expanderWrite(uint8_t); |
| 110 | + void pulseEnable(uint8_t); |
| 111 | + uint8_t _Addr; |
| 112 | + uint8_t _displayfunction; |
| 113 | + uint8_t _displaycontrol; |
| 114 | + uint8_t _displaymode; |
| 115 | + uint8_t _numlines; |
| 116 | + uint8_t _cols; |
| 117 | + uint8_t _rows; |
| 118 | + uint8_t _backlightval; |
120 | 119 | };
|
121 | 120 |
|
122 | 121 | #endif // FDB_LIQUID_CRYSTAL_I2C_H
|
0 commit comments