Port of the Adafruit PCD8544 Driver @ https://github.com/adafruit/Adafruit-PCD8544-Nokia-5110-LCD-library for use in MBED Inital version only supports hardware SPI, and has been tested on a Nucleo test board. BSD license
Requires http://developer.mbed.org/users/infotech1/code/Adafruit_GFX_MBED/ to provide drawing capabilities.
Diff: Adafruit_PCD8544.cpp
- Revision:
- 1:03227e59446f
- Parent:
- 0:4d2abaa4de64
- Child:
- 2:c70a41c0d9d8
--- a/Adafruit_PCD8544.cpp Sun Nov 02 07:10:44 2014 +0000 +++ b/Adafruit_PCD8544.cpp Sun Nov 02 07:17:42 2014 +0000 @@ -26,8 +26,8 @@ #endif //#include <Wire.h> #include <stdint.h> -//#include <Adafruit_GFX.h> -#include "Adafruit_GFX.h" +#include <Adafruit_GFX.h> +//#include "Adafruit_GFX.h" #include "Adafruit_PCD8544.h" // the memory buffer for the LCD @@ -175,10 +175,6 @@ LcdSPI = new SPI(D11,NC,D13); LcdSPI->format(LCD_SPI_BITS, LCD_SPI_MODE); LcdSPI->frequency(LCD_FREQ); - //SPI.begin(); - //SPI.setClockDivider(PCD8544_SPI_CLOCK_DIV); - //SPI.setDataMode(SPI_MODE0); - //SPI.setBitOrder(MSBFIRST); } else { // Setup software SPI. @@ -211,9 +207,6 @@ Pins[PIN_RST]->write(0); wait_ms(500); Pins[PIN_RST]->write(1); - //digitalWrite(_rst, LOW); - //_delay_ms(500); - //digitalWrite(_rst, HIGH); } // get into the EXTENDED mode!