Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of TextLCD by
Revision 8:dde7f427feda, committed 2013-02-17
- Comitter:
- sillevl
- Date:
- Sun Feb 17 20:23:41 2013 +0000
- Parent:
- 7:44f34c09bd37
- Child:
- 10:b91bc4431350
- Commit message:
- added cutstom character code
Changed in this revision
TextLCD.cpp | Show annotated file Show diff for this revision Revisions of this file |
TextLCD.h | Show annotated file Show diff for this revision Revisions of this file |
--- a/TextLCD.cpp Sat Dec 04 11:29:57 2010 +0000 +++ b/TextLCD.cpp Sun Feb 17 20:23:41 2013 +0000 @@ -157,3 +157,28 @@ return 2; } } + +/* + +@param cgramloc cgram location from 0-7 + +@param *data char array + +@param cgrpos cgrampostion 0x00-0x07 + +@param x,y location coordinates + +*/ + +void TextLCD::putCustomChar(int cgramloc, char *data,int cgrpos,int x,int y){ + + writeCommand(0x40+((cgramloc&0x07)<<3)); //Set CG-RAM address + + for (int i=0; i<8; i++) { + writeData(*data++); + } + + locate(x,y); + writeData(cgrpos); + +}
--- a/TextLCD.h Sat Dec 04 11:29:57 2010 +0000 +++ b/TextLCD.h Sun Feb 17 20:23:41 2013 +0000 @@ -84,6 +84,7 @@ /** Clear the screen and locate to 0,0 */ void cls(); + void putCustomChar(int cgramloc, char *data,int cgrpos,int x,int y); int rows(); int columns();