adafruit/PCD8544-Nokia-5110-LCD-library — pull request #6 by avandalen (2011-10-15 13:09:43+00:00)
Title: Update PCD8544.cpp

Dear Limor,

Thank you for your work on the Nokia LCD library. I will use it on my solar bike
http://www.avdweb.nl/index.php

Here is my page about the Nokia 5110 LCD
http://www.avdweb.nl/arduino/nokia-5110-lcd.html

I have done little improvements to the library, search on “Albert” and you see all changes to the code.

Allow 3 pin, 4 pin or 5 pin LCD control.
CS and RST will not set to pinmode output when not used and we can use the pins for other purposes.
Some allowed class initialisations:
PCD8544 nokia = PCD8544(9, 10, 11); or
PCD8544 nokia = PCD8544(9, 10, 11, 0, 0);
PCD8544 nokia = PCD8544(9, 10, 11, 0, 12);
PCD8544 nokia = PCD8544(9, 10, 11, 12, 0);
PCD8544 nokia = PCD8544(9, 10, 11, 12, 13);

This is improved too:
Add the #ifndef PCD8544_H at the top oh the header
Using default parameters to simplify the code and avoid duplical code
Changes uint8_t to byte for better readability

Changes to init():
Simplified the code
Refactoring by using a function displayBuffer() for show the AFI logo