aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gdisp/ST7565
diff options
context:
space:
mode:
authorinmarket <andrewh@inmarket.com.au>2013-11-17 23:32:19 +1000
committerinmarket <andrewh@inmarket.com.au>2013-11-17 23:32:19 +1000
commit7f1b78a067e11c2394d83dbbc9b0fc78f78af493 (patch)
treecd49bed0ef2fb5469282f525c77e707620e7fbfb /drivers/gdisp/ST7565
parent643670ecd1c4dc631b4073d2384ff7fa56cb564d (diff)
downloaduGFX-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/ST7565')
-rw-r--r--drivers/gdisp/ST7565/gdisp_lld_ST7565.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/gdisp/ST7565/gdisp_lld_ST7565.c b/drivers/gdisp/ST7565/gdisp_lld_ST7565.c
index 2bb5406f..769f2eaf 100644
--- a/drivers/gdisp/ST7565/gdisp_lld_ST7565.c
+++ b/drivers/gdisp/ST7565/gdisp_lld_ST7565.c
@@ -150,6 +150,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;
@@ -167,7 +168,7 @@ LLDSPEC bool_t gdisp_lld_init(GDisplay *g) {
y = 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);
@@ -180,6 +181,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;