Altered slightly to remove the power pin GPIO connection
Fork of N5110 by
Diff: N5110.cpp
- Revision:
- 18:12914225b087
- Parent:
- 17:780a542d5f8b
--- a/N5110.cpp Tue Mar 17 12:56:03 2015 +0000 +++ b/N5110.cpp Sun Mar 29 16:40:41 2015 +0000 @@ -8,7 +8,7 @@ #include "N5110.h" -N5110::N5110(PinName pwrPin, PinName scePin, PinName rstPin, PinName dcPin, PinName mosiPin, PinName sclkPin, PinName ledPin) +N5110::N5110(PinName scePin, PinName rstPin, PinName dcPin, PinName mosiPin, PinName sclkPin, PinName ledPin) { spi = new SPI(mosiPin,NC,sclkPin); // create new SPI instance and initialise @@ -16,7 +16,6 @@ // set up pins as required led = new PwmOut(ledPin); - pwr = new DigitalOut(pwrPin); sce = new DigitalOut(scePin); rst = new DigitalOut(rstPin); dc = new DigitalOut(dcPin); @@ -66,7 +65,6 @@ { // set brightness of LED - 0.0 to 1.0 - default is 50% setBrightness(0.5); - pwr->write(1); // apply power } // function to power down LCD @@ -82,7 +80,6 @@ sendCommand(0x20 | CMD_FS_POWER_DOWN_MODE | CMD_FS_HORIZONTAL_MODE | CMD_FS_EXTENDED_MODE); // small delay and then turn off the power pin wait_ms(10); - pwr->write(0); }