diff options
author | Joel Bodenmann <joel@unormal.org> | 2012-10-05 09:20:39 +0200 |
---|---|---|
committer | Joel Bodenmann <joel@unormal.org> | 2012-10-05 09:20:39 +0200 |
commit | 1ccb7f46608dd4da5abf92afbfa7c7daa8c62c47 (patch) | |
tree | 69ff17c5f324e16244b95c4d7c14e6f6b62a83d4 /drivers/gdisp/SSD1289 | |
parent | ec637ad2df8bc938813ece64496f0965743fabfc (diff) | |
download | uGFX-1ccb7f46608dd4da5abf92afbfa7c7daa8c62c47.tar.gz uGFX-1ccb7f46608dd4da5abf92afbfa7c7daa8c62c47.tar.bz2 uGFX-1ccb7f46608dd4da5abf92afbfa7c7daa8c62c47.zip |
rename of orientation
Diffstat (limited to 'drivers/gdisp/SSD1289')
-rw-r--r-- | drivers/gdisp/SSD1289/gdisp_lld.c | 10 | ||||
-rw-r--r-- | drivers/gdisp/SSD1289/ssd1289_lld.c.h | 16 |
2 files changed, 13 insertions, 13 deletions
diff --git a/drivers/gdisp/SSD1289/gdisp_lld.c b/drivers/gdisp/SSD1289/gdisp_lld.c index b8d36ab0..f270982d 100644 --- a/drivers/gdisp/SSD1289/gdisp_lld.c +++ b/drivers/gdisp/SSD1289/gdisp_lld.c @@ -121,7 +121,7 @@ bool_t GDISP_LLD(init)(void) { /* Initialise the GDISP structure */
GDISP.Width = SCREEN_WIDTH;
GDISP.Height = SCREEN_HEIGHT;
- GDISP.Orientation = portrait;
+ GDISP.Orientation = GDISP_ROTATE_0;
GDISP.Powermode = powerOn;
GDISP.Backlight = 100;
GDISP.Contrast = 50;
@@ -407,28 +407,28 @@ void GDISP_LLD(drawpixel)(coord_t x, coord_t y, color_t color) { if (GDISP.Orientation == (gdisp_orientation_t)value)
return;
switch((gdisp_orientation_t)value) {
- case portrait:
+ case GDISP_ROTATE_0:
lld_lcdWriteReg(0x0001, 0x2B3F);
/* ID = 11 AM = 0 */
lld_lcdWriteReg(0x0011, 0x6070);
GDISP.Height = SCREEN_HEIGHT;
GDISP.Width = SCREEN_WIDTH;
break;
- case landscape:
+ case GDISP_ROTATE_90:
lld_lcdWriteReg(0x0001, 0x293F);
/* ID = 11 AM = 1 */
lld_lcdWriteReg(0x0011, 0x6078);
GDISP.Height = SCREEN_WIDTH;
GDISP.Width = SCREEN_HEIGHT;
break;
- case portraitInv:
+ case GDISP_ROTATE_180:
lld_lcdWriteReg(0x0001, 0x2B3F);
/* ID = 01 AM = 0 */
lld_lcdWriteReg(0x0011, 0x6040);
GDISP.Height = SCREEN_HEIGHT;
GDISP.Width = SCREEN_WIDTH;
break;
- case landscapeInv:
+ case GDISP_ROTATE_270:
lld_lcdWriteReg(0x0001, 0x293F);
/* ID = 01 AM = 1 */
lld_lcdWriteReg(0x0011, 0x6048);
diff --git a/drivers/gdisp/SSD1289/ssd1289_lld.c.h b/drivers/gdisp/SSD1289/ssd1289_lld.c.h index e59b388c..dceb8780 100644 --- a/drivers/gdisp/SSD1289/ssd1289_lld.c.h +++ b/drivers/gdisp/SSD1289/ssd1289_lld.c.h @@ -265,19 +265,19 @@ static void lld_lcdSetCursor(uint16_t x, uint16_t y) { * Use a bit mask to make sure they are not set too high */ switch(GDISP.Orientation) { - case portraitInv: + case GDISP_ROTATE_180: lld_lcdWriteReg(0x004e, (SCREEN_WIDTH-1-x) & 0x00FF); lld_lcdWriteReg(0x004f, (SCREEN_HEIGHT-1-y) & 0x01FF); break; - case portrait: + case GDISP_ROTATE_0: lld_lcdWriteReg(0x004e, x & 0x00FF); lld_lcdWriteReg(0x004f, y & 0x01FF); break; - case landscape: + case GDISP_ROTATE_90: lld_lcdWriteReg(0x004e, y & 0x00FF); lld_lcdWriteReg(0x004f, x & 0x01FF); break; - case landscapeInv: + case GDISP_ROTATE_270: lld_lcdWriteReg(0x004e, (SCREEN_WIDTH - y - 1) & 0x00FF); lld_lcdWriteReg(0x004f, (SCREEN_HEIGHT - x - 1) & 0x01FF); break; @@ -297,22 +297,22 @@ static void lld_lcdSetViewPort(uint16_t x, uint16_t y, uint16_t cx, uint16_t cy) */ switch(GDISP.Orientation) { - case portrait: + case GDISP_ROTATE_0: lld_lcdWriteReg(0x44, (((x+cx-1) << 8) & 0xFF00 ) | (x & 0x00FF)); lld_lcdWriteReg(0x45, y & 0x01FF); lld_lcdWriteReg(0x46, (y+cy-1) & 0x01FF); break; - case landscape: + case GDISP_ROTATE_90: lld_lcdWriteReg(0x44, (((x+cx-1) << 8) & 0xFF00) | ((y+cy) & 0x00FF)); lld_lcdWriteReg(0x45, x & 0x01FF); lld_lcdWriteReg(0x46, (x+cx-1) & 0x01FF); break; - case portraitInv: + case GDISP_ROTATE_180: lld_lcdWriteReg(0x44, (((SCREEN_WIDTH-x-1) & 0x00FF) << 8) | ((SCREEN_WIDTH - (x+cx)) & 0x00FF)); lld_lcdWriteReg(0x45, (SCREEN_HEIGHT-(y+cy)) & 0x01FF); lld_lcdWriteReg(0x46, (SCREEN_HEIGHT-y-1) & 0x01FF); break; - case landscapeInv: + case GDISP_ROTATE_270: lld_lcdWriteReg(0x44, (((SCREEN_WIDTH - y - 1) & 0x00FF) << 8) | ((SCREEN_WIDTH - (y+cy)) & 0x00FF)); lld_lcdWriteReg(0x45, (SCREEN_HEIGHT - (x+cx)) & 0x01FF); lld_lcdWriteReg(0x46, (SCREEN_HEIGHT - x - 1) & 0x01FF); |