New LiquidCrystal library  1.5.0
Generic LCD control library
/Users/fmalpartida/Documents/development/mercurial repos/SW/NewLiquidCrystal_lib/LiquidCrystal_I2C_ByVac.h
1 // ---------------------------------------------------------------------------
2 // Created by GHPS on 5/06/2012.
3 // Copyright (C) - 2018
4 //
5 // This program is free software: you can redistribute it and/or modify
6 // it under the terms of the GNU General Public License as published by
7 // the Free Software Foundation, either version 3 of the License, or
8 // any later version.
9 //
10 // This program is distributed in the hope that it will be useful,
11 // but WITHOUT ANY WARRANTY; without even the implied warranty of
12 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 // GNU General Public License for more details.
14 //
15 // You should have received a copy of the GNU General Public License v3.0
16 // along with this program.
17 // If not, see <https://www.gnu.org/licenses/gpl-3.0.en.html>.
18 //
19 // ---------------------------------------------------------------------------
20 //
21 // Thread Safe: No
22 // Extendable: Yes
23 //
24 // @file LiquidCrystal_I2C_ByVac.c
25 // This file implements a basic liquid crystal library that comes as standard
26 // in the Arduino SDK but using the extension board BV4218/BV4208 from ByVac.
27 //
28 // @brief
29 // This is a basic implementation of the LiquidCrystal library of the
30 // Arduino SDK. The original library has been reworked in such a way that
31 // this class implements the all methods to command an LCD based
32 // on the Hitachi HD44780 and compatible chipsets using I2C extension
33 // backpack BV4218 from ByVac.
34 //
35 // The functionality provided by this class and its base class is identical
36 // to the original functionality of the Arduino LiquidCrystal library.
37 //
38 // @author GHPS - ghps-et-users-sourceforge-net
39 // ---------------------------------------------------------------------------
40 #ifndef LiquidCrystal_I2C_ByVac_h
41 #define LiquidCrystal_I2C_ByVac_h
42 #include <inttypes.h>
43 #include <Print.h>
44 
45 #if defined(__AVR_ATtiny84__) || (__AVR_ATtiny2313__) || defined (__AVR_ATtiny85__)
46 
47 #include "TinyWireM.h" // include this if ATtiny84 or ATtiny85 or ATtiny2313
48 
49 #define Wire TinyWireM
50 
51 #else
52 
53 #if (ARDUINO < 10000)
54  #include <../Wire/Wire.h>
55 #else
56  #include <Wire.h>
57 #endif
58 
59 #endif
60 
61 #include "LCD.h"
62 
63 
65 {
66 public:
67 
77  LiquidCrystal_I2C_ByVac (uint8_t lcd_Addr);
78 
95  virtual void begin(uint8_t cols, uint8_t rows, uint8_t charsize = LCD_5x8DOTS);
96 
109  virtual void send(uint8_t value, uint8_t mode);
110 
111 
119  void setBacklight ( uint8_t value );
120 
129  void setContrast ( uint8_t value );
130 
131 private:
132 
138  int init();
139 
149  uint8_t _Addr; // I2C Address of the IO expander
150 
151 };
152 
153 #endif
virtual void send(uint8_t value, uint8_t mode)
Definition: LiquidCrystal_I2C_ByVac.cpp:111
Definition: LiquidCrystal_I2C_ByVac.h:64
Definition: LCD.h:199
virtual void begin(uint8_t cols, uint8_t rows, uint8_t charsize=LCD_5x8DOTS)
Definition: LiquidCrystal_I2C_ByVac.cpp:61
void setBacklight(uint8_t value)
Definition: LiquidCrystal_I2C_ByVac.cpp:72
void setContrast(uint8_t value)
Definition: LiquidCrystal_I2C_ByVac.cpp:83
LiquidCrystal_I2C_ByVac(uint8_t lcd_Addr)
Definition: LiquidCrystal_I2C_ByVac.cpp:50