local copy of rgplcd shield

Dependents:  

Fork of AdaFruit_RGBLCDShield by Justin Howard

Revision:
2:01f8491ca9a5
Parent:
1:24ab601221e2
Child:
3:bc884631d057
diff -r 24ab601221e2 -r 01f8491ca9a5 AdaFruit_RGBLCDShield.cpp
--- a/AdaFruit_RGBLCDShield.cpp	Mon Aug 11 19:09:40 2014 +0000
+++ b/AdaFruit_RGBLCDShield.cpp	Sat Aug 30 16:29:58 2014 +0000
@@ -92,6 +92,36 @@
   // we can't begin() yet :(
 }
 
+Adafruit_RGBLCDShield::Adafruit_RGBLCDShield
+(
+    MCP23017 &  inMCP,
+    uint8_t     inRs,
+    uint8_t     inRw,
+    uint8_t     inEn,
+    uint8_t     inD4,
+    uint8_t     inD5,
+    uint8_t     inD6,
+    uint8_t     inD7
+)
+    : Serial(SERIAL_TX, SERIAL_RX)
+    , _i2c(inMCP)
+{
+  _i2cAddr = 0;
+
+  _displayfunction = LCD_4BITMODE | LCD_1LINE | LCD_5x8DOTS;
+  
+  // the I/O expander pinout
+  _rs_pin = inRs;
+  _rw_pin = inRw;
+  _enable_pin = inEn;
+  _data_pins[0] = inD4;  // really d4
+  _data_pins[1] = inD5;  // really d5
+  _data_pins[2] = inD6;  // really d6
+  _data_pins[3] = inD7;  // really d7
+  
+  // we can't begin() yet :(
+}
+
 void Adafruit_RGBLCDShield::init(uint8_t fourbitmode, uint8_t rs, uint8_t rw, uint8_t enable,
              uint8_t d0, uint8_t d1, uint8_t d2, uint8_t d3,
              uint8_t d4, uint8_t d5, uint8_t d6, uint8_t d7)