3 Commits

Author SHA1 Message Date
Joel Bodenmann cbf9c22adf STM32LTDC: Update readme.md 2 months ago
Joel Bodenmann 6d6ce043d0 Whitespaces 2 months ago
Joel Bodenmann 0a55fc94bd Avoid duplicate const specifier compiler warnings 2 months ago
  1. 16
      drivers/gdisp/STM32LTDC/gdisp_lld_STM32LTDC.c
  2. 5
      drivers/gdisp/STM32LTDC/readme.md
  3. 4
      src/gdisp/gdisp.c

16
drivers/gdisp/STM32LTDC/gdisp_lld_STM32LTDC.c

@ -301,8 +301,8 @@ LLDSPEC void gdisp_lld_draw_pixel(GDisplay* g) {
#if GDISP_NEED_CONTROL
switch(g->g.Orientation) {
case gOrientationPortrait:
case gOrientationLandscape:
case gOrientationPortrait:
case gOrientationLandscape:
case gOrientation0:
default:
pos = PIXEL_POS(g, g->p.x, g->p.y);
@ -341,8 +341,8 @@ LLDSPEC gColor gdisp_lld_get_pixel_color(GDisplay* g) {
#if GDISP_NEED_CONTROL
switch(g->g.Orientation) {
case gOrientationPortrait:
case gOrientationLandscape:
case gOrientationPortrait:
case gOrientationLandscape:
case gOrientation0:
default:
pos = PIXEL_POS(g, g->p.x, g->p.y);
@ -404,8 +404,8 @@ LLDSPEC gColor gdisp_lld_get_pixel_color(GDisplay* g) {
g->g.Height = tmp;
}
break;
case gOrientationPortrait:
case gOrientationLandscape:
case gOrientationPortrait:
case gOrientationLandscape:
default:
return;
}
@ -480,8 +480,8 @@ LLDSPEC gColor gdisp_lld_get_pixel_color(GDisplay* g) {
#if GDISP_NEED_CONTROL
switch(g->g.Orientation) {
case gOrientationPortrait:
case gOrientationLandscape:
case gOrientationPortrait:
case gOrientationLandscape:
case gOrientation0:
default:
pos = PIXEL_POS(g, g->p.x, g->p.y);

5
drivers/gdisp/STM32LTDC/readme.md

@ -13,10 +13,7 @@ To use this driver:
3. Add a `board_STM32LTDC.h` to you project directory (or board directory)
based on one of the templates.
# Limitations
Currently, both `gOrientationPortrait` and `gOrientationLandscape` are not supported by this driver.
# Configuration
Configuration options available in `gfxconf.h`:
@ -28,6 +25,7 @@ Configuration options available in `gfxconf.h`:
| `STM32LTDC_USE_DOUBLEBUFFERING` | `GFXOFF` | Whether to use double buffering. See the corresponding section below. |
| `STM32LTDC_USE_RGB565` | `GFXOFF` | Whether to use RGB565 instead of RGB888. |
# 2nd layer
To use the 2nd LTDC layer:
- set `STM32LTDC_USE_LAYER2` to `GFXON` in `gfxconf.h`.
@ -39,6 +37,7 @@ For more information, see:
- https://wiki.ugfx.io/index.php/Multiple_displays#Example_-_Same_controller
- https://wiki.ugfx.io/index.php/Multiple_displays#Access_the_displays
# Double buffering
To use double buffering:
- set `STM32LTDC_USE_DOUBLEBUFFERING` to `GFXON` in `gfxconf.h`.

4
src/gdisp/gdisp.c

@ -569,9 +569,9 @@ void _gdispInit(void)
#if defined(GDISP_DRIVER_LIST)
{
unsigned i;
typedef const GDISPVMT const GDISPVMTLIST[1];
typedef const GDISPVMT GDISPVMTLIST[1];
static const GDISPVMT * const dclist[] = {GDISP_DRIVER_LIST};
static const GDISPVMT* dclist[] = { GDISP_DRIVER_LIST };
for(i = 0; i < sizeof(dclist)/sizeof(dclist[0]); i++) {
if (!(dclist[i]->d.flags & GDISP_VFLG_DYNAMICONLY))

Loading…
Cancel
Save