diff options
author | inmarket <andrewh@inmarket.com.au> | 2018-07-08 13:51:20 +1000 |
---|---|---|
committer | inmarket <andrewh@inmarket.com.au> | 2018-07-08 13:51:20 +1000 |
commit | e61f0ae4248bdafeace54c330d488904a495c045 (patch) | |
tree | 448c5f4e99ae94fd41a99b3082b35208b2ba7c5f /drivers/gdisp/R61505U | |
parent | d9258efd4dac2b7939bb11707cbbdfa135c02bf5 (diff) | |
download | uGFX-e61f0ae4248bdafeace54c330d488904a495c045.tar.gz uGFX-e61f0ae4248bdafeace54c330d488904a495c045.tar.bz2 uGFX-e61f0ae4248bdafeace54c330d488904a495c045.zip |
Added type gOrientation to replace V2.x orientation_t, and values gOrientationX replace GDISP_ROTATE_X
Diffstat (limited to 'drivers/gdisp/R61505U')
-rw-r--r-- | drivers/gdisp/R61505U/gdisp_lld_R61505U.c | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/drivers/gdisp/R61505U/gdisp_lld_R61505U.c b/drivers/gdisp/R61505U/gdisp_lld_R61505U.c index 1e18e1cd..c5b10d36 100644 --- a/drivers/gdisp/R61505U/gdisp_lld_R61505U.c +++ b/drivers/gdisp/R61505U/gdisp_lld_R61505U.c @@ -57,14 +57,14 @@ static void set_cursor(GDisplay *g) { switch(g->g.Orientation) { default: - case GDISP_ROTATE_0: - case GDISP_ROTATE_180: + case gOrientation0: + case gOrientation180: write_reg(g, 0x20, g->p.x); write_reg(g, 0x21, g->p.y); break; - case GDISP_ROTATE_90: - case GDISP_ROTATE_270: + case gOrientation90: + case gOrientation270: write_reg(g, 0x20, g->p.y); write_reg(g, 0x21, g->p.x); break; @@ -75,16 +75,16 @@ static void set_cursor(GDisplay *g) { static void set_viewport(GDisplay *g) { switch(g->g.Orientation) { default: - case GDISP_ROTATE_0: - case GDISP_ROTATE_180: + case gOrientation0: + case gOrientation180: write_reg(g, 0x50, g->p.x); write_reg(g, 0x51, g->p.x + g->p.cx - 1); write_reg(g, 0x52, g->p.y); write_reg(g, 0x53, g->p.y + g->p.cy - 1); break; - case GDISP_ROTATE_90: - case GDISP_ROTATE_270: + case gOrientation90: + case gOrientation270: write_reg(g, 0x50, g->p.y); write_reg(g, 0x51, g->p.y + g->p.cy - 1); write_reg(g, 0x52, g->p.x); @@ -194,7 +194,7 @@ LLDSPEC gBool gdisp_lld_init(GDisplay *g) { /* Initialise the GDISP structure */ g->g.Width = GDISP_SCREEN_WIDTH; g->g.Height = GDISP_SCREEN_HEIGHT; - g->g.Orientation = GDISP_ROTATE_0; + g->g.Orientation = gOrientation0; g->g.Powermode = gPowerOn; g->g.Backlight = GDISP_INITIAL_BACKLIGHT; g->g.Contrast = GDISP_INITIAL_CONTRAST; @@ -318,10 +318,10 @@ LLDSPEC gBool gdisp_lld_init(GDisplay *g) { return; case GDISP_CONTROL_ORIENTATION: - if (g->g.Orientation == (orientation_t)g->p.ptr) + if (g->g.Orientation == (gOrientation)g->p.ptr) return; - switch((orientation_t)g->p.ptr) { - case GDISP_ROTATE_0: + switch((gOrientation)g->p.ptr) { + case gOrientation0: acquire_bus(g); write_reg(g, 0x01, 0x0100); write_reg(g, 0x03, 0x1038); @@ -332,7 +332,7 @@ LLDSPEC gBool gdisp_lld_init(GDisplay *g) { g->g.Width = GDISP_SCREEN_WIDTH; break; - case GDISP_ROTATE_90: + case gOrientation90: acquire_bus(g); write_reg(g, 0x01, 0x0000); write_reg(g, 0x03, 0x1030); @@ -343,7 +343,7 @@ LLDSPEC gBool gdisp_lld_init(GDisplay *g) { g->g.Width = GDISP_SCREEN_HEIGHT; break; - case GDISP_ROTATE_180: + case gOrientation180: acquire_bus(g); write_reg(g, 0x01, 0x0000); write_reg(g, 0x03, 0x1030); @@ -354,7 +354,7 @@ LLDSPEC gBool gdisp_lld_init(GDisplay *g) { g->g.Width = GDISP_SCREEN_WIDTH; break; - case GDISP_ROTATE_270: + case gOrientation270: acquire_bus(g); write_reg(g, 0x01, 0x0100); write_reg(g, 0x03, 0x1038); @@ -368,7 +368,7 @@ LLDSPEC gBool gdisp_lld_init(GDisplay *g) { default: return; } - g->g.Orientation = (orientation_t)g->p.ptr; + g->g.Orientation = (gOrientation)g->p.ptr; return; case GDISP_CONTROL_BACKLIGHT: |