I2cLCD library that can display cursor.
Fork of I2cLCD by
Revision 2:4e32baaf019b, committed 2014-02-17
- Comitter:
- togayan
- Date:
- Mon Feb 17 08:13:14 2014 +0000
- Parent:
- 1:f973d1359998
- Commit message:
- test
Changed in this revision
I2cLCD.cpp | Show annotated file Show diff for this revision Revisions of this file |
I2cLCD.h | Show annotated file Show diff for this revision Revisions of this file |
diff -r f973d1359998 -r 4e32baaf019b I2cLCD.cpp --- a/I2cLCD.cpp Sun Feb 09 09:04:30 2014 +0000 +++ b/I2cLCD.cpp Mon Feb 17 08:13:14 2014 +0000 @@ -172,3 +172,10 @@ writeData(icon_buff[i]); } } + +void I2cLCD::cursor(bool isOn, int column, int row) +{ + int a = address(column, row); + writeCommand(a); + writeCommand(isOn? 0x0F : 0x0C); +} \ No newline at end of file
diff -r f973d1359998 -r 4e32baaf019b I2cLCD.h --- a/I2cLCD.h Sun Feb 09 09:04:30 2014 +0000 +++ b/I2cLCD.h Mon Feb 17 08:13:14 2014 +0000 @@ -36,6 +36,7 @@ void seticon(IconType type); void clearicon(IconType type); void puticon(int flg); + void cursor(bool isOn, int column, int row); protected: virtual int _putc(int value);