diff options
author | Joel Bodenmann <joel@seriouslyembedded.com> | 2015-07-09 00:43:04 +0200 |
---|---|---|
committer | Joel Bodenmann <joel@seriouslyembedded.com> | 2015-07-09 00:43:04 +0200 |
commit | c58dabc9c9aaa26e1d273e62c8e7508a0a3f7690 (patch) | |
tree | 8ab5ae5bef809ded4426c5173121ee3297bb8726 /drivers/gdisp/STM32LTDC/board_STM32LTDC_template.h | |
parent | 926c8e507b7611e5bf182942872f770b22a5c7bd (diff) | |
download | uGFX-c58dabc9c9aaa26e1d273e62c8e7508a0a3f7690.tar.gz uGFX-c58dabc9c9aaa26e1d273e62c8e7508a0a3f7690.tar.bz2 uGFX-c58dabc9c9aaa26e1d273e62c8e7508a0a3f7690.zip |
Renaming driver to STM32LTDC as this will be a generic one
Diffstat (limited to 'drivers/gdisp/STM32LTDC/board_STM32LTDC_template.h')
-rw-r--r-- | drivers/gdisp/STM32LTDC/board_STM32LTDC_template.h | 61 |
1 files changed, 61 insertions, 0 deletions
diff --git a/drivers/gdisp/STM32LTDC/board_STM32LTDC_template.h b/drivers/gdisp/STM32LTDC/board_STM32LTDC_template.h new file mode 100644 index 00000000..7f785e18 --- /dev/null +++ b/drivers/gdisp/STM32LTDC/board_STM32LTDC_template.h @@ -0,0 +1,61 @@ +/* + * This file is subject to the terms of the GFX License. If a copy of + * the license was not distributed with this file, you can obtain one at: + * + * http://ugfx.org/license.html + */ + +#ifndef _GDISP_LLD_BOARD_H +#define _GDISP_LLD_BOARD_H + +static const ltdcConfig driverCfg = { + 480, 270, // Width, Height (pixels) + 41, 10, // Horizontal, Vertical sync (pixels) + 13, 2, // Horizontal, Vertical back porch (pixels) + 32, 2, // Horizontal, Vertical front porch (pixels) + 0, // Sync flags + 0x000000, // Clear color (RGB888) + + { // Background layer config + (LLDCOLOR_TYPE *)SDRAM_BANK_ADDR, // Frame buffer address + 480, 270, // Width, Height (pixels) + 480 * LTDC_PIXELBYTES, // Line pitch (bytes) + LTDC_PIXELFORMAT, // Pixel format + 0, 0, // Start pixel position (x, y) + 480, 270, // Size of virtual layer (cx, cy) + LTDC_COLOR_FUCHSIA, // Default color (ARGB8888) + 0x980088, // Color key (RGB888) + LTDC_BLEND_FIX1_FIX2, // Blending factors + 0, // Palette (RGB888, can be NULL) + 0, // Palette length + 0xFF, // Constant alpha factor + LTDC_LEF_ENABLE // Layer configuration flags + }, + + LTDC_UNUSED_LAYER_CONFIG // Foreground layer config +}; + +static inline void init_board(GDisplay* g) { + + // As we are not using multiple displays we set g->board to NULL as we don't use it. + g->board = 0; + + switch(g->controllerdisplay) { + case 0: // Set up for Display 0 + // Your init here + break; + } +} + +static inline void post_init_board(GDisplay* g) +{ + (void)g; +} + +static inline void set_backlight(GDisplay* g, uint8_t percent) +{ + (void)g; + (void)percent; +} + +#endif /* _GDISP_LLD_BOARD_H */ |