From 96a5f5fbea7333443d9c0eeac57e3cb975494aa1 Mon Sep 17 00:00:00 2001 From: ergosys Date: Thu, 11 Dec 2014 15:56:55 -0800 Subject: fix GDISP_ROTATE_270 case --- drivers/gdisp/SSD1306/gdisp_lld_SSD1306.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'drivers/gdisp/SSD1306') diff --git a/drivers/gdisp/SSD1306/gdisp_lld_SSD1306.c b/drivers/gdisp/SSD1306/gdisp_lld_SSD1306.c index d3f8ae2b..f241270e 100644 --- a/drivers/gdisp/SSD1306/gdisp_lld_SSD1306.c +++ b/drivers/gdisp/SSD1306/gdisp_lld_SSD1306.c @@ -170,8 +170,8 @@ LLDSPEC bool_t gdisp_lld_init(GDisplay *g) { y = GDISP_SCREEN_HEIGHT-1 - g->p.y; break; case GDISP_ROTATE_270: - x = GDISP_SCREEN_HEIGHT-1 - g->p.y; - x = g->p.x; + x = GDISP_SCREEN_WIDTH-1 - g->p.y; + y = g->p.x; break; } if (gdispColor2Native(g->p.color) != Black) @@ -201,7 +201,7 @@ LLDSPEC bool_t gdisp_lld_init(GDisplay *g) { y = GDISP_SCREEN_HEIGHT-1 - g->p.y; break; case GDISP_ROTATE_270: - x = GDISP_SCREEN_HEIGHT-1 - g->p.y; + x = GDISP_SCREEN_WIDTH-1 - g->p.y; y = g->p.x; break; } -- cgit v1.2.3