diff options
Diffstat (limited to 'drivers/gdisp/SSD1306/gdisp_lld_SSD1306.c')
-rw-r--r-- | drivers/gdisp/SSD1306/gdisp_lld_SSD1306.c | 40 |
1 files changed, 20 insertions, 20 deletions
diff --git a/drivers/gdisp/SSD1306/gdisp_lld_SSD1306.c b/drivers/gdisp/SSD1306/gdisp_lld_SSD1306.c index ff907e6d..ac2cd05c 100644 --- a/drivers/gdisp/SSD1306/gdisp_lld_SSD1306.c +++ b/drivers/gdisp/SSD1306/gdisp_lld_SSD1306.c @@ -130,7 +130,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; @@ -178,25 +178,25 @@ LLDSPEC gBool gdisp_lld_init(GDisplay *g) { switch(g->g.Orientation) { default: - case GDISP_ROTATE_0: + case gOrientation0: sx = g->p.x; ex = g->p.x + g->p.cx - 1; sy = g->p.y; ey = sy + g->p.cy - 1; break; - case GDISP_ROTATE_90: + case gOrientation90: sx = g->p.y; ex = g->p.y + g->p.cy - 1; sy = GDISP_SCREEN_HEIGHT - g->p.x - g->p.cx; ey = GDISP_SCREEN_HEIGHT-1 - g->p.x; break; - case GDISP_ROTATE_180: + case gOrientation180: sx = GDISP_SCREEN_WIDTH - g->p.x - g->p.cx; ex = GDISP_SCREEN_WIDTH-1 - g->p.x; sy = GDISP_SCREEN_HEIGHT - g->p.y - g->p.cy; ey = GDISP_SCREEN_HEIGHT-1 - g->p.y; break; - case GDISP_ROTATE_270: + case gOrientation270: sx = GDISP_SCREEN_WIDTH - g->p.y - g->p.cy; ex = GDISP_SCREEN_WIDTH-1 - g->p.y; sy = g->p.x; @@ -240,19 +240,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; @@ -271,19 +271,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; @@ -318,24 +318,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; case GDISP_CONTROL_CONTRAST: |