From cfb1b2a488d5b1a9e14c889b80e5324d16f63f1b Mon Sep 17 00:00:00 2001 From: inmarket Date: Sun, 8 Jul 2018 11:08:55 +1000 Subject: Change pixel_t to gPixel --- .../gdisp/Nokia6610GE8/gdisp_lld_Nokia6610GE8.c | 8 ++++---- drivers/gdisp/SSD1289/gdisp_lld_SSD1289.c | 4 ++-- drivers/gdisp/SSD2119/gdisp_lld_SSD2119.c | 4 ++-- drivers/multiple/Win32/gdisp_lld_Win32.c | 24 +++++++++++----------- drivers/multiple/X/gdisp_lld_X.c | 2 +- drivers/multiple/uGFXnet/gdisp_lld_uGFXnet.c | 2 +- .../uGFXnetESP8266/gdisp_lld_uGFXnetESP8266.cpp | 2 +- 7 files changed, 23 insertions(+), 23 deletions(-) (limited to 'drivers') diff --git a/drivers/gdisp/Nokia6610GE8/gdisp_lld_Nokia6610GE8.c b/drivers/gdisp/Nokia6610GE8/gdisp_lld_Nokia6610GE8.c index 2a9d2488..496a3d91 100644 --- a/drivers/gdisp/Nokia6610GE8/gdisp_lld_Nokia6610GE8.c +++ b/drivers/gdisp/Nokia6610GE8/gdisp_lld_Nokia6610GE8.c @@ -345,16 +345,16 @@ LLDSPEC gBool gdisp_lld_init(GDisplay *g) { gCoord lg, x, y; uint16_t c1, c2; unsigned tuples; - const pixel_t *buffer; + const gPixel *buffer; #if GDISP_PACKED_PIXELS unsigned pnum, pstart; const uint8_t *p; #else - const pixel_t *p; + const gPixel *p; #endif tuples = (g->p.cx * g->p.cy + 1)>>1; - buffer = (const pixel_t *)g->p.ptr; + buffer = (const gPixel *)g->p.ptr; /* Set up the data window to transfer */ acquire_bus(g); @@ -428,7 +428,7 @@ LLDSPEC gBool gdisp_lld_init(GDisplay *g) { srccx = (g->p.x2 + 1) & ~1; #endif pstart = g->p.y1 * g->p.x2 + g->p.x1; // The starting pixel number - buffer = (const pixel_t)(((const uint8_t *)buffer) + ((pstart>>1) * 3)); // The buffer start position + buffer = (const gPixel)(((const uint8_t *)buffer) + ((pstart>>1) * 3)); // The buffer start position lg = ((g->p.x2-g->p.cx)>>1)*3; // The buffer gap between lines pnum = pstart + g->p.x2*y + x; // Adjustment for controller craziness p = ((const uint8_t *)buffer) + (((g->p.x2*y + x)>>1)*3); // Adjustment for controller craziness diff --git a/drivers/gdisp/SSD1289/gdisp_lld_SSD1289.c b/drivers/gdisp/SSD1289/gdisp_lld_SSD1289.c index b8ee55cb..7a9c4e27 100644 --- a/drivers/gdisp/SSD1289/gdisp_lld_SSD1289.c +++ b/drivers/gdisp/SSD1289/gdisp_lld_SSD1289.c @@ -258,10 +258,10 @@ LLDSPEC gBool gdisp_lld_init(GDisplay *g) { #endif LLDSPEC void gdisp_lld_blit_area(GDisplay *g) { - pixel_t *buffer; + gPixel *buffer; gCoord ycnt; - buffer = (pixel_t *)g->p.ptr + g->p.x1 + g->p.y1 * g->p.x2; + buffer = (gPixel *)g->p.ptr + g->p.x1 + g->p.y1 * g->p.x2; acquire_bus(g); set_viewport(g); diff --git a/drivers/gdisp/SSD2119/gdisp_lld_SSD2119.c b/drivers/gdisp/SSD2119/gdisp_lld_SSD2119.c index 0631b0c0..c44a262f 100644 --- a/drivers/gdisp/SSD2119/gdisp_lld_SSD2119.c +++ b/drivers/gdisp/SSD2119/gdisp_lld_SSD2119.c @@ -294,10 +294,10 @@ LLDSPEC gBool gdisp_lld_init(GDisplay* g) { #endif LLDSPEC void gdisp_lld_blit_area(GDisplay* g) { - pixel_t* buffer; + gPixel* buffer; gCoord ycnt; - buffer = (pixel_t*)g->p.ptr + g->p.x1 + g->p.y1 * g->p.x2; + buffer = (gPixel*)g->p.ptr + g->p.x1 + g->p.y1 * g->p.x2; acquire_bus(g); set_viewport(g); diff --git a/drivers/multiple/Win32/gdisp_lld_Win32.c b/drivers/multiple/Win32/gdisp_lld_Win32.c index 5e23b3d5..36776d49 100644 --- a/drivers/multiple/Win32/gdisp_lld_Win32.c +++ b/drivers/multiple/Win32/gdisp_lld_Win32.c @@ -1224,16 +1224,16 @@ LLDSPEC gBool gdisp_lld_init(GDisplay *g) { #endif #if GDISP_HARDWARE_BITFILLS && GDISP_NEED_CONTROL - static pixel_t *rotateimg(GDisplay *g, const pixel_t *buffer) { - pixel_t *dstbuf; - pixel_t *dst; - const pixel_t *src; + static gPixel *rotateimg(GDisplay *g, const gPixel *buffer) { + gPixel *dstbuf; + gPixel *dst; + const gPixel *src; size_t sz; gCoord i, j; // Allocate the destination buffer sz = (size_t)g->p.cx * (size_t)g->p.cy; - if (!(dstbuf = (pixel_t *)malloc(sz * sizeof(pixel_t)))) + if (!(dstbuf = (gPixel *)malloc(sz * sizeof(gPixel)))) return 0; // Copy the bits we need @@ -1272,7 +1272,7 @@ LLDSPEC gBool gdisp_lld_init(GDisplay *g) { LLDSPEC void gdisp_lld_blit_area(GDisplay *g) { winPriv * priv; - pixel_t * buffer; + gPixel * buffer; RECT rect; BITMAPV4HEADER bmpInfo; @@ -1300,7 +1300,7 @@ LLDSPEC gBool gdisp_lld_init(GDisplay *g) { switch(g->g.Orientation) { case GDISP_ROTATE_0: default: - bmpInfo.bV4SizeImage = (g->p.cy*g->p.x2) * sizeof(pixel_t); + bmpInfo.bV4SizeImage = (g->p.cy*g->p.x2) * sizeof(gPixel); bmpInfo.bV4Width = g->p.x2; bmpInfo.bV4Height = -g->p.cy; /* top-down image */ rect.top = g->p.y; @@ -1310,7 +1310,7 @@ LLDSPEC gBool gdisp_lld_init(GDisplay *g) { break; case GDISP_ROTATE_90: if (!(buffer = rotateimg(g, buffer))) return; - bmpInfo.bV4SizeImage = (g->p.cy*g->p.cx) * sizeof(pixel_t); + bmpInfo.bV4SizeImage = (g->p.cy*g->p.cx) * sizeof(gPixel); bmpInfo.bV4Width = g->p.cy; bmpInfo.bV4Height = -g->p.cx; /* top-down image */ rect.bottom = g->g.Width - g->p.x; @@ -1320,7 +1320,7 @@ LLDSPEC gBool gdisp_lld_init(GDisplay *g) { break; case GDISP_ROTATE_180: if (!(buffer = rotateimg(g, buffer))) return; - bmpInfo.bV4SizeImage = (g->p.cy*g->p.cx) * sizeof(pixel_t); + bmpInfo.bV4SizeImage = (g->p.cy*g->p.cx) * sizeof(gPixel); bmpInfo.bV4Width = g->p.cx; bmpInfo.bV4Height = -g->p.cy; /* top-down image */ rect.bottom = g->g.Height-1 - g->p.y; @@ -1330,7 +1330,7 @@ LLDSPEC gBool gdisp_lld_init(GDisplay *g) { break; case GDISP_ROTATE_270: if (!(buffer = rotateimg(g, buffer))) return; - bmpInfo.bV4SizeImage = (g->p.cy*g->p.cx) * sizeof(pixel_t); + bmpInfo.bV4SizeImage = (g->p.cy*g->p.cx) * sizeof(gPixel); bmpInfo.bV4Width = g->p.cy; bmpInfo.bV4Height = -g->p.cx; /* top-down image */ rect.top = g->p.x; @@ -1340,7 +1340,7 @@ LLDSPEC gBool gdisp_lld_init(GDisplay *g) { break; } #else - bmpInfo.bV4SizeImage = (g->p.cy*g->p.x2) * sizeof(pixel_t); + bmpInfo.bV4SizeImage = (g->p.cy*g->p.x2) * sizeof(gPixel); bmpInfo.bV4Width = g->p.x2; bmpInfo.bV4Height = -g->p.cy; /* top-down image */ rect.top = g->p.y; @@ -1365,7 +1365,7 @@ LLDSPEC gBool gdisp_lld_init(GDisplay *g) { #endif #if GDISP_NEED_CONTROL - if (buffer != (pixel_t *)g->p.ptr) + if (buffer != (gPixel *)g->p.ptr) free(buffer); #endif } diff --git a/drivers/multiple/X/gdisp_lld_X.c b/drivers/multiple/X/gdisp_lld_X.c index 78a9cb02..875b9621 100644 --- a/drivers/multiple/X/gdisp_lld_X.c +++ b/drivers/multiple/X/gdisp_lld_X.c @@ -443,7 +443,7 @@ LLDSPEC void gdisp_lld_draw_pixel(GDisplay *g) // Start of Bitblit code //XImage bitmap; - //pixel_t *bits; + //gPixel *bits; // bits = malloc(vis.depth * GDISP_SCREEN_WIDTH * GDISP_SCREEN_HEIGHT); // bitmap = XCreateImage(dis, vis, vis.depth, ZPixmap, // 0, bits, GDISP_SCREEN_WIDTH, GDISP_SCREEN_HEIGHT, diff --git a/drivers/multiple/uGFXnet/gdisp_lld_uGFXnet.c b/drivers/multiple/uGFXnet/gdisp_lld_uGFXnet.c index 24460e97..ea235668 100644 --- a/drivers/multiple/uGFXnet/gdisp_lld_uGFXnet.c +++ b/drivers/multiple/uGFXnet/gdisp_lld_uGFXnet.c @@ -538,7 +538,7 @@ LLDSPEC gBool gdisp_lld_init(GDisplay *g) { #if GDISP_HARDWARE_BITFILLS LLDSPEC void gdisp_lld_blit_area(GDisplay *g) { netPriv * priv; - pixel_t * buffer; + gPixel * buffer; uint16_t buf[5]; gCoord x, y; diff --git a/drivers/multiple/uGFXnetESP8266/gdisp_lld_uGFXnetESP8266.cpp b/drivers/multiple/uGFXnetESP8266/gdisp_lld_uGFXnetESP8266.cpp index f8420bd3..42c1df35 100644 --- a/drivers/multiple/uGFXnetESP8266/gdisp_lld_uGFXnetESP8266.cpp +++ b/drivers/multiple/uGFXnetESP8266/gdisp_lld_uGFXnetESP8266.cpp @@ -421,7 +421,7 @@ LLDSPEC gBool gdisp_lld_init(GDisplay *g) { #if GDISP_HARDWARE_BITFILLS LLDSPEC void gdisp_lld_blit_area(GDisplay *g) { netPriv * priv; - pixel_t * buffer; + gPixel * buffer; uint16_t buf[5]; gCoord x, y; -- cgit v1.2.3