diff options
author | inmarket <andrewh@inmarket.com.au> | 2013-11-17 23:32:19 +1000 |
---|---|---|
committer | inmarket <andrewh@inmarket.com.au> | 2013-11-17 23:32:19 +1000 |
commit | 7f1b78a067e11c2394d83dbbc9b0fc78f78af493 (patch) | |
tree | cd49bed0ef2fb5469282f525c77e707620e7fbfb /drivers/gdisp/SSD1306 | |
parent | 643670ecd1c4dc631b4073d2384ff7fa56cb564d (diff) | |
download | uGFX-7f1b78a067e11c2394d83dbbc9b0fc78f78af493.tar.gz uGFX-7f1b78a067e11c2394d83dbbc9b0fc78f78af493.tar.bz2 uGFX-7f1b78a067e11c2394d83dbbc9b0fc78f78af493.zip |
Replace color format conversion macros with proper routines to prevent side effects with using the macro.
Also fix a number of compiler warnings.
Diffstat (limited to 'drivers/gdisp/SSD1306')
-rw-r--r-- | drivers/gdisp/SSD1306/gdisp_lld_SSD1306.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/gdisp/SSD1306/gdisp_lld_SSD1306.c b/drivers/gdisp/SSD1306/gdisp_lld_SSD1306.c index b72ba781..b7bce1e2 100644 --- a/drivers/gdisp/SSD1306/gdisp_lld_SSD1306.c +++ b/drivers/gdisp/SSD1306/gdisp_lld_SSD1306.c @@ -159,6 +159,7 @@ LLDSPEC bool_t gdisp_lld_init(GDisplay *g) { coord_t x, y; switch(g->g.Orientation) { + default: case GDISP_ROTATE_0: x = g->p.x; y = g->p.y; @@ -176,7 +177,7 @@ LLDSPEC bool_t gdisp_lld_init(GDisplay *g) { x = g->p.x; break; } - if (COLOR2NATIVE(g->p.color) != Black) + if (gdispColor2Native(g->p.color) != Black) RAM(g)[xyaddr(x, y)] |= xybit(y); else RAM(g)[xyaddr(x, y)] &= ~xybit(y); @@ -189,6 +190,7 @@ LLDSPEC bool_t gdisp_lld_init(GDisplay *g) { coord_t x, y; switch(g->g.Orientation) { + default: case GDISP_ROTATE_0: x = g->p.x; y = g->p.y; |