Library for Sure Electronics HT1632 based LED matrix displays. Supports multiple displays connected together.
Dependents: HT1632MsgScroller SMS_LEDMatrixPrinter
Revision 13:9a869360d0ae, committed 2013-04-08
- Comitter:
- SomeRandomBloke
- Date:
- Mon Apr 08 20:54:20 2013 +0000
- Parent:
- 12:e621d8c89cc3
- Child:
- 14:b051965066db
- Commit message:
- updates
Changed in this revision
HT1632_LedMatrix.cpp | Show annotated file Show diff for this revision Revisions of this file |
HT1632_LedMatrix.h | Show annotated file Show diff for this revision Revisions of this file |
--- a/HT1632_LedMatrix.cpp Wed Mar 20 23:11:10 2013 +0000 +++ b/HT1632_LedMatrix.cpp Mon Apr 08 20:54:20 2013 +0000 @@ -408,6 +408,27 @@ return colsLeft; } +int HT1632_LedMatrix::_putc(int c) { + if (c == '\n') { + cursorY += 8; + cursorX = 0; + } else if (c == '\r') { + // skip em + } else { + putChar(cursorX, cursorY, c); + cursorX += 6; +// if (wrap && (cursorX > (_width - 6))) { +// cursorY += 8; +// cursorX = 0; +// } + } + + return c; +} +int HT1632_LedMatrix::_getc() { + return -1; +} + // Set position of cursor for writing void HT1632_LedMatrix::gotoXY(int x, int y) {
--- a/HT1632_LedMatrix.h Wed Mar 20 23:11:10 2013 +0000 +++ b/HT1632_LedMatrix.h Mon Apr 08 20:54:20 2013 +0000 @@ -83,7 +83,7 @@ /** class HT1632_LedMatrix */ -class HT1632_LedMatrix +class HT1632_LedMatrix : public Stream { private: /** Select a specific display, numbers as 0 to 3 @@ -307,6 +307,10 @@ unsigned char r, unsigned char c); #endif +protected: + virtual int _putc(int value); + virtual int _getc(); + }; #endif //_HT1632_LEDMATRIX_H