aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/multiple/uGFXnet/gdisp_lld_uGFXnet.c
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/multiple/uGFXnet/gdisp_lld_uGFXnet.c
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/multiple/uGFXnet/gdisp_lld_uGFXnet.c')
-rw-r--r--drivers/multiple/uGFXnet/gdisp_lld_uGFXnet.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/multiple/uGFXnet/gdisp_lld_uGFXnet.c b/drivers/multiple/uGFXnet/gdisp_lld_uGFXnet.c
index b694358c..81e5d19b 100644
--- a/drivers/multiple/uGFXnet/gdisp_lld_uGFXnet.c
+++ b/drivers/multiple/uGFXnet/gdisp_lld_uGFXnet.c
@@ -425,7 +425,7 @@ LLDSPEC bool_t gdisp_lld_init(GDisplay *g) {
buf[0] = GNETCODE_PIXEL;
buf[1] = g->p.x;
buf[2] = g->p.y;
- buf[3] = COLOR2NATIVE(g->p.color);
+ buf[3] = gdispColor2Native(g->p.color);
MUTEX_ENTER;
sendpkt(priv->netfd, buf, 4);
MUTEX_EXIT;
@@ -453,7 +453,7 @@ LLDSPEC bool_t gdisp_lld_init(GDisplay *g) {
buf[2] = g->p.y;
buf[3] = g->p.cx;
buf[4] = g->p.cy;
- buf[5] = COLOR2NATIVE(g->p.color);
+ buf[5] = gdispColor2Native(g->p.color);
MUTEX_ENTER;
sendpkt(priv->netfd, buf, 6);
MUTEX_EXIT;
@@ -490,7 +490,7 @@ LLDSPEC bool_t gdisp_lld_init(GDisplay *g) {
for(y = 0; y < g->p.cy; y++, buffer += g->p.x2 - g->p.cx) {
for(x = 0; x < g->p.cx; x++, buffer++) {
- buf[0] = COLOR2NATIVE(buffer[0]);
+ buf[0] = gdispColor2Native(buffer[0]);
sendpkt(priv->netfd, buf, 1);
}
}
@@ -524,7 +524,7 @@ LLDSPEC bool_t gdisp_lld_init(GDisplay *g) {
while(!(g->flags & GDISP_FLG_HAVEDATA) || priv->data[0] != GNETCODE_READ)
gfxSleepMilliseconds(1);
- data = NATIVE2COLOR(priv->data[1]);
+ data = gdispNative2Color(priv->data[1]);
g->flags &= ~GDISP_FLG_HAVEDATA;
return data;