diff options
author | inmarket <andrewh@inmarket.com.au> | 2014-05-22 17:21:19 +1000 |
---|---|---|
committer | inmarket <andrewh@inmarket.com.au> | 2014-05-22 17:21:19 +1000 |
commit | 285bd0f4d66fa3161a80bf6711d1bef226b17fe3 (patch) | |
tree | 93666d6d8831a67f2e6cd6fd008bfa0bf7c4b4d9 /drivers/gdisp/framebuffer/board_framebuffer_template.h | |
parent | 52cfaf00ccd35f5a0740a489a1a2af64c800b537 (diff) | |
download | uGFX-285bd0f4d66fa3161a80bf6711d1bef226b17fe3.tar.gz uGFX-285bd0f4d66fa3161a80bf6711d1bef226b17fe3.tar.bz2 uGFX-285bd0f4d66fa3161a80bf6711d1bef226b17fe3.zip |
GDISP framebuffer driver + an implementation for the linux kernel framebuffer device
Diffstat (limited to 'drivers/gdisp/framebuffer/board_framebuffer_template.h')
-rw-r--r-- | drivers/gdisp/framebuffer/board_framebuffer_template.h | 57 |
1 files changed, 57 insertions, 0 deletions
diff --git a/drivers/gdisp/framebuffer/board_framebuffer_template.h b/drivers/gdisp/framebuffer/board_framebuffer_template.h new file mode 100644 index 00000000..0ee08ef2 --- /dev/null +++ b/drivers/gdisp/framebuffer/board_framebuffer_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 * sizeof(LLDCOLOR_TYPE); // bytes per row + 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 */ |