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/SSD1322/gdisp_lld_SSD1322.c | |
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/SSD1322/gdisp_lld_SSD1322.c')
-rw-r--r-- | drivers/gdisp/SSD1322/gdisp_lld_SSD1322.c | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/drivers/gdisp/SSD1322/gdisp_lld_SSD1322.c b/drivers/gdisp/SSD1322/gdisp_lld_SSD1322.c index 2a956687..9822c1e1 100644 --- a/drivers/gdisp/SSD1322/gdisp_lld_SSD1322.c +++ b/drivers/gdisp/SSD1322/gdisp_lld_SSD1322.c @@ -148,7 +148,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_180; + g->g.Orientation = gOrientation180; g->g.Powermode = gPowerOn; g->g.Backlight = GDISP_INITIAL_BACKLIGHT; g->g.Contrast = GDISP_INITIAL_CONTRAST; @@ -194,19 +194,19 @@ LLDSPEC gBool gdisp_lld_init(GDisplay *g) { switch(g->g.Orientation) { default: - case GDISP_ROTATE_0: + case gOrientation0: x = g->p.x; y = g->p.y; break; - case GDISP_ROTATE_90: + case gOrientation90: x = g->p.y; y = GDISP_SCREEN_HEIGHT-1 - g->p.x; break; - case GDISP_ROTATE_180: + case gOrientation180: x = GDISP_SCREEN_WIDTH-1 - g->p.x; y = GDISP_SCREEN_HEIGHT-1 - g->p.y; break; - case GDISP_ROTATE_270: + case gOrientation270: x = GDISP_SCREEN_WIDTH-1 - g->p.y; y = g->p.x; break; @@ -225,19 +225,19 @@ LLDSPEC gBool gdisp_lld_init(GDisplay *g) { switch(g->g.Orientation) { default: - case GDISP_ROTATE_0: + case gOrientation0: x = g->p.x; y = g->p.y; break; - case GDISP_ROTATE_90: + case gOrientation90: x = g->p.y; y = GDISP_SCREEN_HEIGHT-1 - g->p.x; break; - case GDISP_ROTATE_180: + case gOrientation180: x = GDISP_SCREEN_WIDTH-1 - g->p.x; y = GDISP_SCREEN_HEIGHT-1 - g->p.y; break; - case GDISP_ROTATE_270: + case gOrientation270: x = GDISP_SCREEN_WIDTH-1 - g->p.y; y = g->p.x; break; @@ -273,24 +273,24 @@ 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) { + switch((gOrientation)g->p.ptr) { /* Rotation is handled by the drawing routines */ - case GDISP_ROTATE_0: - case GDISP_ROTATE_180: + case gOrientation0: + case gOrientation180: g->g.Height = GDISP_SCREEN_HEIGHT; g->g.Width = GDISP_SCREEN_WIDTH; break; - case GDISP_ROTATE_90: - case GDISP_ROTATE_270: + case gOrientation90: + case gOrientation270: g->g.Height = GDISP_SCREEN_WIDTH; g->g.Width = GDISP_SCREEN_HEIGHT; break; default: return; } - g->g.Orientation = (orientation_t)g->p.ptr; + g->g.Orientation = (gOrientation)g->p.ptr; return; } } |