diff options
author | Joel Bodenmann <joel@unormal.org> | 2013-01-10 15:03:34 +0100 |
---|---|---|
committer | Joel Bodenmann <joel@unormal.org> | 2013-01-10 15:03:34 +0100 |
commit | 77a93bb43d373a59df9da29053b9e64b4b3cf474 (patch) | |
tree | 037e8a4f6e8757f2a75d64a62f8725de94085f69 /src | |
parent | d5e7afe756fe4c19dd9360baed23599b268709af (diff) | |
download | uGFX-77a93bb43d373a59df9da29053b9e64b4b3cf474.tar.gz uGFX-77a93bb43d373a59df9da29053b9e64b4b3cf474.tar.bz2 uGFX-77a93bb43d373a59df9da29053b9e64b4b3cf474.zip |
TDISP update
Diffstat (limited to 'src')
-rw-r--r-- | src/tdisp/tdisp.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/tdisp/tdisp.c b/src/tdisp/tdisp.c index a6e5e2f5..edd5b423 100644 --- a/src/tdisp/tdisp.c +++ b/src/tdisp/tdisp.c @@ -50,6 +50,9 @@ void tdispHome(void) { void tdispGotoXY(coord_t col, coord_t row) { uint8_t row_offsets[] = { 0x00, 0x40, 0x14, 0x54 }; + if(row >= TDISP_ROWS) + row = TDISP_ROWS - 1; + TDISP_LLD(write_cmd)(0x80 | (col + row_offsets[row])); } @@ -60,7 +63,7 @@ void tdispDrawChar(char c) { void tdispDrawString(char *s) { char c; - while(c = s++) + while(c = *s++) tdispDrawChar(c); } |