diff options
author | inmarket <andrewh@inmarket.com.au> | 2014-08-21 09:11:10 +1000 |
---|---|---|
committer | inmarket <andrewh@inmarket.com.au> | 2014-08-21 09:11:10 +1000 |
commit | 117e195354853ce2b53afef4ebb5860bf44fdde2 (patch) | |
tree | e7ec6968d778f8f0646b5fa2e95cd8f879d27d09 /drivers/gdisp/SPFD54124B | |
parent | d1217112a496ce0b3349ac93d7c5d6b2a5837f54 (diff) | |
download | uGFX-117e195354853ce2b53afef4ebb5860bf44fdde2.tar.gz uGFX-117e195354853ce2b53afef4ebb5860bf44fdde2.tar.bz2 uGFX-117e195354853ce2b53afef4ebb5860bf44fdde2.zip |
Update to the SPFD54124B gdisp driver.
Added an example board file for it to the boards/addons/gdisp directory
Diffstat (limited to 'drivers/gdisp/SPFD54124B')
-rw-r--r-- | drivers/gdisp/SPFD54124B/gdisp_lld_SPFD54124B.c | 27 |
1 files changed, 5 insertions, 22 deletions
diff --git a/drivers/gdisp/SPFD54124B/gdisp_lld_SPFD54124B.c b/drivers/gdisp/SPFD54124B/gdisp_lld_SPFD54124B.c index da6592c2..91298aff 100644 --- a/drivers/gdisp/SPFD54124B/gdisp_lld_SPFD54124B.c +++ b/drivers/gdisp/SPFD54124B/gdisp_lld_SPFD54124B.c @@ -214,7 +214,7 @@ LLDSPEC void gdisp_lld_control(GDisplay *g) case GDISP_ROTATE_0: acquire_bus(g); write_index(g, SPFD54124B_CMD_MADCTR); - write_index(g, 0x00); + write_index(g, 0x0100); release_bus(g); g->g.Height = GDISP_SCREEN_HEIGHT; g->g.Width = GDISP_SCREEN_WIDTH; @@ -223,7 +223,7 @@ LLDSPEC void gdisp_lld_control(GDisplay *g) case GDISP_ROTATE_90: acquire_bus(g); write_index(g, SPFD54124B_CMD_MADCTR); - write_index(g, 0xA0); + write_index(g, 0x01A0); release_bus(g); g->g.Height = GDISP_SCREEN_WIDTH; g->g.Width = GDISP_SCREEN_HEIGHT; @@ -232,7 +232,7 @@ LLDSPEC void gdisp_lld_control(GDisplay *g) case GDISP_ROTATE_180: acquire_bus(g); write_index(g, SPFD54124B_CMD_MADCTR); - write_index(g, 0xC0); + write_index(g, 0x01C0); release_bus(g); g->g.Height = GDISP_SCREEN_HEIGHT; g->g.Width = GDISP_SCREEN_WIDTH; @@ -241,31 +241,14 @@ LLDSPEC void gdisp_lld_control(GDisplay *g) case GDISP_ROTATE_270: acquire_bus(g); write_index(g, SPFD54124B_CMD_MADCTR); - write_index(g, 0x60); + write_index(g, 0x0160); release_bus(g); g->g.Height = GDISP_SCREEN_WIDTH; g->g.Width = GDISP_SCREEN_HEIGHT; break; - case GDISP_ROTATE_PORTRAIT: - acquire_bus(g); - write_index(g, SPFD54124B_CMD_MADCTR); - write_index(g, 0x00); - release_bus(g); - g->g.Height = GDISP_SCREEN_HEIGHT; - g->g.Width = GDISP_SCREEN_WIDTH; - break; - - case GDISP_ROTATE_LANDSCAPE: - acquire_bus(g); - write_index(g, SPFD54124B_CMD_MADCTR); - write_index(g, 0xA0); - release_bus(g); - g->g.Height = GDISP_SCREEN_WIDTH; - g->g.Width = GDISP_SCREEN_HEIGHT; - break; - default: + // GDISP_ROTATE_PORTRAIT and GDISP_ROTATE_LANDSCAPE are handled by the higher level code return; } |