diff options
author | Joel Bodenmann <joel@unormal.org> | 2012-11-11 18:56:30 +0100 |
---|---|---|
committer | Joel Bodenmann <joel@unormal.org> | 2012-11-11 18:56:30 +0100 |
commit | 0e6ddaf7ff3481712230530f84668d278950fc1b (patch) | |
tree | 1d5792af94bd83770b6dcb147163f8dbc996c944 /drivers/gdisp/ILI9320 | |
parent | eb6e5760fc508fa59bf6291dadb974955010ae3b (diff) | |
download | uGFX-0e6ddaf7ff3481712230530f84668d278950fc1b.tar.gz uGFX-0e6ddaf7ff3481712230530f84668d278950fc1b.tar.bz2 uGFX-0e6ddaf7ff3481712230530f84668d278950fc1b.zip |
added ILI3920 orientation dummies
Diffstat (limited to 'drivers/gdisp/ILI9320')
-rw-r--r-- | drivers/gdisp/ILI9320/ili9320_lld.c.h | 39 |
1 files changed, 32 insertions, 7 deletions
diff --git a/drivers/gdisp/ILI9320/ili9320_lld.c.h b/drivers/gdisp/ILI9320/ili9320_lld.c.h index ed664833..6dd9d3fc 100644 --- a/drivers/gdisp/ILI9320/ili9320_lld.c.h +++ b/drivers/gdisp/ILI9320/ili9320_lld.c.h @@ -102,16 +102,41 @@ static void lld_lcdSetCursor(uint16_t x, uint16_t y) { addr = y * 0x100 + x; - lld_lcdWriteReg(0x0020, addr & 0xff); /* low addr */ - lld_lcdWriteReg(0x0021, (addr >> 8) & 0x1ff); /* high addr */ - GDISP_REG = 0x0022; /* data reg in IR */ + switch(GDISP.Orientation) { + case GDISP_ROTATE_0: + lld_lcdWriteReg(0x0020, addr & 0xff); /* low addr */ + lld_lcdWriteReg(0x0021, (addr >> 8) & 0x1ff); /* high addr */ + //GDISP_REG = 0x0022; /* data reg in IR */ + case GDISP_ROTATE_90: + break; + + case GDISP_ROTATE_180: + break; + + case GDISP_ROTATE_270: + break; + } } static void lld_lcdSetViewPort(uint16_t x, uint16_t y, uint16_t cx, uint16_t cy) { - lld_lcdWriteReg(0x0050, x - 1); - lld_lcdWriteReg(0x0051, x + cx - 2); - lld_lcdWriteReg(0x0052, y - 1); - lld_lcdWriteReg(0x0053, y + cy - 2); + switch(GDISP.Orientation) { + case GDISP_ROTATE_0: + lld_lcdWriteReg(0x0050, x - 1); + lld_lcdWriteReg(0x0051, x + cx - 2); + lld_lcdWriteReg(0x0052, y - 1); + lld_lcdWriteReg(0x0053, y + cy - 2); + break; + + case GDISP_ROTATE_90: + break; + + case GDISP_ROTATE_180: + break; + + case GDISP_ROTATE_270: + break; + + } lld_lcdSetCursor(x, y); } |