diff options
author | inmarket <inmarket@ugfx.org> | 2017-01-20 17:57:18 +1000 |
---|---|---|
committer | inmarket <inmarket@ugfx.org> | 2017-01-20 17:57:18 +1000 |
commit | f57f6be212c779635a6ab9b80dcec3d1778ce8ba (patch) | |
tree | e8ab5d739df43c1f06d3cad08597e35a7fbc83ef /drivers/gdisp/Fb24bpp/board_fb24bpp_template.h | |
parent | 5502aef3e56db8665cba8885f4e5ef050f050f2e (diff) | |
download | uGFX-f57f6be212c779635a6ab9b80dcec3d1778ce8ba.tar.gz uGFX-f57f6be212c779635a6ab9b80dcec3d1778ce8ba.tar.bz2 uGFX-f57f6be212c779635a6ab9b80dcec3d1778ce8ba.zip |
Added Fb24bpp driver for RGB888 and BGR888 packed framebuffer displays
Diffstat (limited to 'drivers/gdisp/Fb24bpp/board_fb24bpp_template.h')
-rw-r--r-- | drivers/gdisp/Fb24bpp/board_fb24bpp_template.h | 57 |
1 files changed, 57 insertions, 0 deletions
diff --git a/drivers/gdisp/Fb24bpp/board_fb24bpp_template.h b/drivers/gdisp/Fb24bpp/board_fb24bpp_template.h new file mode 100644 index 00000000..a8c669c9 --- /dev/null +++ b/drivers/gdisp/Fb24bpp/board_fb24bpp_template.h @@ -0,0 +1,57 @@ +/* + * 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 + */ + +// Set this to your frame buffer pixel format. +#ifndef GDISP_LLD_PIXELFORMAT + #define GDISP_LLD_PIXELFORMAT GDISP_PIXELFORMAT_BGR888 +#endif + +// Uncomment this if your frame buffer device requires flushing +//#define GDISP_HARDWARE_FLUSH TRUE + +#ifdef GDISP_DRIVER_VMT + + static void board_init(GDisplay *g, fbInfo *fbi) { + // TODO: Initialize your frame buffer device here + + // TODO: Set the details of the frame buffer + g->g.Width = 640; + g->g.Height = 480; + g->g.Backlight = 100; + g->g.Contrast = 50; + fbi->linelen = g->g.Width * 3; // bytes per row - you might need to round this up to a dword boundary. + fbi->pixels = 0; // pointer to the memory frame buffer + } + + #if GDISP_HARDWARE_FLUSH + static void board_flush(GDisplay *g) { + // TODO: Can be an empty function if your hardware doesn't support this + (void) g; + } + #endif + + #if GDISP_NEED_CONTROL + static void board_backlight(GDisplay *g, uint8_t percent) { + // TODO: Can be an empty function if your hardware doesn't support this + (void) g; + (void) percent; + } + + static void board_contrast(GDisplay *g, uint8_t percent) { + // TODO: Can be an empty function if your hardware doesn't support this + (void) g; + (void) percent; + } + + static void board_power(GDisplay *g, powermode_t pwr) { + // TODO: Can be an empty function if your hardware doesn't support this + (void) g; + (void) pwr; + } + #endif + +#endif /* GDISP_LLD_BOARD_IMPLEMENTATION */ |