An interface to the Sparkfun Serial Graphic LCD, LCD-09351; and Graphic LCD Serial Backpack, LCD-09352. Derived class from Serial so that you can conveniently send text to the display with printf(), putc(), etc.
Diff: SerialGraphicLCD.h
- Revision:
- 3:dff460658aed
- Parent:
- 2:84b78506add6
diff -r 84b78506add6 -r dff460658aed SerialGraphicLCD.h --- a/SerialGraphicLCD.h Thu Mar 29 18:33:42 2012 +0000 +++ b/SerialGraphicLCD.h Wed Apr 11 07:13:52 2012 +0000 @@ -9,6 +9,10 @@ #include "mbed.h" +/** Firmware modes */ +#define SFE_FW 0 // Stock SFE firmware +#define SD_FW 1 // summoningdark firmware http://sourceforge.net/projects/serialglcd/ + /** LCD Baud Rates */ #define LCD_4800 1 #define LCD_9600 2 @@ -57,9 +61,20 @@ /** Create a new interface to a Serial Graphic LCD * Note that the display lower left corner is coordinates 0, 0. * Rows start at the top at 0, columns start at the left at 0. + * @param tx -- mbed transmit pin + * @param rx -- mbed receive pin */ SerialGraphicLCD(PinName tx, PinName rx); + /** Create a new interface to a Serial Graphic LCD + * Note that the display lower left corner is coordinates 0, 0. + * Rows start at the top at 0, columns start at the left at 0. + * @param tx -- mbed transmit pin + * @param rx -- mbed receive pin + * @param firmware -- SFE_FW, stock firmware or SD_FW, summoningdark firmware + */ + SerialGraphicLCD(PinName tx, PinName rx, int firmware); + /** clear the screen */ void clear(void); @@ -160,6 +175,7 @@ private: int _xMax; int _yMax; + int _firmware; };