From 7f1b78a067e11c2394d83dbbc9b0fc78f78af493 Mon Sep 17 00:00:00 2001 From: inmarket Date: Sun, 17 Nov 2013 23:32:19 +1000 Subject: Replace color format conversion macros with proper routines to prevent side effects with using the macro. Also fix a number of compiler warnings. --- drivers/gdisp/ED060SC4/gdisp_lld_ED060SC4.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'drivers/gdisp/ED060SC4/gdisp_lld_ED060SC4.c') diff --git a/drivers/gdisp/ED060SC4/gdisp_lld_ED060SC4.c b/drivers/gdisp/ED060SC4/gdisp_lld_ED060SC4.c index 3ab1de79..166f564b 100644 --- a/drivers/gdisp/ED060SC4/gdisp_lld_ED060SC4.c +++ b/drivers/gdisp/ED060SC4/gdisp_lld_ED060SC4.c @@ -493,6 +493,7 @@ LLDSPEC bool_t gdisp_lld_init(GDisplay *g) { uint8_t bitpos; switch(g->g.Orientation) { + default: case GDISP_ROTATE_0: bx = g->p.x / EINK_BLOCKWIDTH; dx = g->p.x % EINK_BLOCKWIDTH; @@ -524,7 +525,7 @@ LLDSPEC bool_t gdisp_lld_init(GDisplay *g) { bitpos = (6 - 2 * (dx % EINK_PPB)); byte = block->data[dy][dx / EINK_PPB]; byte &= ~(PIXELMASK << bitpos); - if (COLOR2NATIVE(g->p.color) != Black) + if (gdispColor2Native(g->p.color) != Black) byte |= PIXEL_WHITE << bitpos; else byte |= PIXEL_BLACK << bitpos; -- cgit v1.2.3