diff options
author | Joel Bodenmann <joel@unormal.org> | 2013-01-12 09:38:38 +0100 |
---|---|---|
committer | Joel Bodenmann <joel@unormal.org> | 2013-01-12 09:38:38 +0100 |
commit | 1c1b3c8d74b1bff02bffbec91bcdc96fce61a82e (patch) | |
tree | c18fe1827cb4fcc3823f01a2f995e08b39f485a6 /src | |
parent | ff8e8c47d9c51c54995d2b0169d4b6d2edebdb3f (diff) | |
download | uGFX-1c1b3c8d74b1bff02bffbec91bcdc96fce61a82e.tar.gz uGFX-1c1b3c8d74b1bff02bffbec91bcdc96fce61a82e.tar.bz2 uGFX-1c1b3c8d74b1bff02bffbec91bcdc96fce61a82e.zip |
TDISP: added custom character routine
Diffstat (limited to 'src')
-rw-r--r-- | src/tdisp/tdisp.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/tdisp/tdisp.c b/src/tdisp/tdisp.c index d57bae56..f10b09ee 100644 --- a/src/tdisp/tdisp.c +++ b/src/tdisp/tdisp.c @@ -78,6 +78,19 @@ void tdispHome(void) { TDISP_LLD(write_cmd)(0x02); } +void tdispCreateChar(uint8_t location, char *charmap) { + uint8_t i; + + /* make sure we don't write somewhere we're not supposed to */ + location &= TDISP_MAX_CUSTOM_CHARS; + + TDISP_LLD(write_cmd)(0x40 | (location << 3)); + + for(i = 0; i < 8; i++) { + TDISP_LLD(write_data)(charmap[i]); + } +} + void tdispGotoXY(coord_t col, coord_t row) { uint8_t row_offsets[] = { 0x00, 0x40, 0x14, 0x54 }; |