I modified the framebuffer driver to support this special case as you suggested.
#if GDISP_DRIVER_3BIT_MSB
color = gdispColor2Native(g->p.color);
fb = ((fbPriv *)g->priv)->fbi.pixels;
x = g->p.x;
y = g->p.y;
pos = y * (((fbPriv *)g->priv)->fbi.linelen) + ((x * 3) / 8) ;
switch (g->p.x & 0x07){
case 0:
fb[pos] = ((fb[pos] & ~0xE0) | color << 5);
break;
case 1:
fb[pos] = ((fb[pos] & ~0x1C) | color << 2);
break;
case 2:
fb[pos] = ((fb[pos] & ~0x03) | color >> 1);
fb[pos+1] = ((fb[pos+1] & ~0x80) | (color & 0x01) << 7);
break;
case 3:
fb[pos] = ((fb[pos] & ~0x70) | color << 4);
break;
case 4:
fb[pos] = ((fb[pos] & ~0x0E) | color << 1);
break;
case 5:
fb[pos] = ((fb[pos] & ~0x01) | color >> 2);
fb[pos+1] = ((fb[pos+1] & ~0xC0) | (color & 0x03) << 6);
break;
case 6:
fb[pos] = ((fb[pos] & ~0x30) | color << 3);
break;
case 7:
fb[pos] = ((fb[pos] & ~0x7) | color );
break;
}
#else
Well...close one
gdispGDrawPixel works all over the screen...
gdispGDrawBox(GDISP,20,20,80,80,0x07); --- works
gdispGDrawBox(GDISP,10,10,100,100,0x07); --- small errors
gdispGDrawBox(GDISP,1,1,50,50,0x07); --- big errors
gdispGFillArea(GDISP,20,20,100,50,0x07); ---- complete fail
I'm not quiet sure what's happening here...maybe you have an idea?!
PS: added the uGFX logo