STM32LTDC: Fix misspelled macro (internally only)

This commit is contained in:
Joel Bodenmann 2021-08-17 15:55:02 +02:00
parent 7f78be1183
commit 8804f3a381

View File

@ -111,7 +111,7 @@ typedef struct ltdcConfig {
/* Driver local routines. */ /* Driver local routines. */
/*===========================================================================*/ /*===========================================================================*/
#define PIXIL_POS(g, x, y) ((y) * ((ltdcLayerConfig *)g->priv)->pitch + (x) * LTDC_PIXELBYTES) #define PIXEL_POS(g, x, y) ((y) * ((ltdcLayerConfig *)g->priv)->pitch + (x) * LTDC_PIXELBYTES)
#define PIXEL_ADDR(g, pos) ((LLDCOLOR_TYPE *)((gU8 *)((ltdcLayerConfig *)g->priv)->frame+pos)) #define PIXEL_ADDR(g, pos) ((LLDCOLOR_TYPE *)((gU8 *)((ltdcLayerConfig *)g->priv)->frame+pos))
/*===========================================================================*/ /*===========================================================================*/
@ -288,20 +288,20 @@ LLDSPEC void gdisp_lld_draw_pixel(GDisplay* g) {
switch(g->g.Orientation) { switch(g->g.Orientation) {
case gOrientation0: case gOrientation0:
default: default:
pos = PIXIL_POS(g, g->p.x, g->p.y); pos = PIXEL_POS(g, g->p.x, g->p.y);
break; break;
case gOrientation90: case gOrientation90:
pos = PIXIL_POS(g, g->p.y, g->g.Width-g->p.x-1); pos = PIXEL_POS(g, g->p.y, g->g.Width-g->p.x-1);
break; break;
case gOrientation180: case gOrientation180:
pos = PIXIL_POS(g, g->g.Width-g->p.x-1, g->g.Height-g->p.y-1); pos = PIXEL_POS(g, g->g.Width-g->p.x-1, g->g.Height-g->p.y-1);
break; break;
case gOrientation270: case gOrientation270:
pos = PIXIL_POS(g, g->g.Height-g->p.y-1, g->p.x); pos = PIXEL_POS(g, g->g.Height-g->p.y-1, g->p.x);
break; break;
} }
#else #else
pos = PIXIL_POS(g, g->p.x, g->p.y); pos = PIXEL_POS(g, g->p.x, g->p.y);
#endif #endif
#if STM32LTDC_USE_DMA2D #if STM32LTDC_USE_DMA2D
@ -326,20 +326,20 @@ LLDSPEC gColor gdisp_lld_get_pixel_color(GDisplay* g) {
switch(g->g.Orientation) { switch(g->g.Orientation) {
case gOrientation0: case gOrientation0:
default: default:
pos = PIXIL_POS(g, g->p.x, g->p.y); pos = PIXEL_POS(g, g->p.x, g->p.y);
break; break;
case gOrientation90: case gOrientation90:
pos = PIXIL_POS(g, g->p.y, g->g.Width-g->p.x-1); pos = PIXEL_POS(g, g->p.y, g->g.Width-g->p.x-1);
break; break;
case gOrientation180: case gOrientation180:
pos = PIXIL_POS(g, g->g.Width-g->p.x-1, g->g.Height-g->p.y-1); pos = PIXEL_POS(g, g->g.Width-g->p.x-1, g->g.Height-g->p.y-1);
break; break;
case gOrientation270: case gOrientation270:
pos = PIXIL_POS(g, g->g.Height-g->p.y-1, g->p.x); pos = PIXEL_POS(g, g->g.Height-g->p.y-1, g->p.x);
break; break;
} }
#else #else
pos = PIXIL_POS(g, g->p.x, g->p.y); pos = PIXEL_POS(g, g->p.x, g->p.y);
#endif #endif
#if STM32LTDC_USE_DMA2D #if STM32LTDC_USE_DMA2D
@ -440,28 +440,28 @@ LLDSPEC gColor gdisp_lld_get_pixel_color(GDisplay* g) {
switch(g->g.Orientation) { switch(g->g.Orientation) {
case gOrientation0: case gOrientation0:
default: default:
pos = PIXIL_POS(g, g->p.x, g->p.y); pos = PIXEL_POS(g, g->p.x, g->p.y);
lineadd = g->g.Width - g->p.cx; lineadd = g->g.Width - g->p.cx;
shape = (g->p.cx << 16) | (g->p.cy); shape = (g->p.cx << 16) | (g->p.cy);
break; break;
case gOrientation90: case gOrientation90:
pos = PIXIL_POS(g, g->p.y, g->g.Width-g->p.x-g->p.cx); pos = PIXEL_POS(g, g->p.y, g->g.Width-g->p.x-g->p.cx);
lineadd = g->g.Height - g->p.cy; lineadd = g->g.Height - g->p.cy;
shape = (g->p.cy << 16) | (g->p.cx); shape = (g->p.cy << 16) | (g->p.cx);
break; break;
case gOrientation180: case gOrientation180:
pos = PIXIL_POS(g, g->g.Width-g->p.x-g->p.cx, g->g.Height-g->p.y-g->p.cy); pos = PIXEL_POS(g, g->g.Width-g->p.x-g->p.cx, g->g.Height-g->p.y-g->p.cy);
lineadd = g->g.Width - g->p.cx; lineadd = g->g.Width - g->p.cx;
shape = (g->p.cx << 16) | (g->p.cy); shape = (g->p.cx << 16) | (g->p.cy);
break; break;
case gOrientation270: case gOrientation270:
pos = PIXIL_POS(g, g->g.Height-g->p.y-g->p.cy, g->p.x); pos = PIXEL_POS(g, g->g.Height-g->p.y-g->p.cy, g->p.x);
lineadd = g->g.Height - g->p.cy; lineadd = g->g.Height - g->p.cy;
shape = (g->p.cy << 16) | (g->p.cx); shape = (g->p.cy << 16) | (g->p.cx);
break; break;
} }
#else #else
pos = PIXIL_POS(g, g->p.x, g->p.y); pos = PIXEL_POS(g, g->p.x, g->p.y);
lineadd = g->g.Width - g->p.cx; lineadd = g->g.Width - g->p.cx;
shape = (g->p.cx << 16) | (g->p.cy); shape = (g->p.cx << 16) | (g->p.cy);
#endif #endif
@ -529,7 +529,7 @@ LLDSPEC gColor gdisp_lld_get_pixel_color(GDisplay* g) {
gU32 srcstart, dststart; gU32 srcstart, dststart;
srcstart = LTDC_PIXELBYTES * ((gU32)g->p.x2 * g->p.y1 * + g->p.x1) + (gU32)g->p.ptr; srcstart = LTDC_PIXELBYTES * ((gU32)g->p.x2 * g->p.y1 * + g->p.x1) + (gU32)g->p.ptr;
dststart = (gU32)PIXEL_ADDR(g, PIXIL_POS(g, g->p.x, g->p.y)); dststart = (gU32)PIXEL_ADDR(g, PIXEL_POS(g, g->p.x, g->p.y));
#if STM32LTDC_DMA_CACHE_FLUSH #if STM32LTDC_DMA_CACHE_FLUSH
{ {