From 5ee4290941f5445649403a84f3f0e9d5bf48b9e2 Mon Sep 17 00:00:00 2001 From: inmarket Date: Thu, 25 Sep 2014 17:42:11 +1000 Subject: [PATCH] Expose the GDISP_STARTUP_COLOR setting for the initial color of displays --- gfxconf.example.h | 4 +- src/gdisp/gdisp_gdisp.c | 3 - src/gdisp/sys_options.h | 119 +++++++++++++++++++--------------------- 3 files changed, 58 insertions(+), 68 deletions(-) diff --git a/gfxconf.example.h b/gfxconf.example.h index 205c79d3..7ac48591 100644 --- a/gfxconf.example.h +++ b/gfxconf.example.h @@ -101,10 +101,10 @@ // #define GDISP_NEED_IMAGE_PNG FALSE // #define GDISP_NEED_IMAGE_ACCOUNTING FALSE -//#define GDISP_NEED_STARTUP_LOGO TRUE - //#define GDISP_DEFAULT_ORIENTATION GDISP_ROTATE_LANDSCAPE // If not defined the native hardware orientation is used. //#define GDISP_LINEBUF_SIZE 128 +//#define GDISP_STARTUP_COLOR Black +//#define GDISP_NEED_STARTUP_LOGO TRUE //#define GDISP_TOTAL_DISPLAYS 1 diff --git a/src/gdisp/gdisp_gdisp.c b/src/gdisp/gdisp_gdisp.c index 4a149faa..74cfb67e 100644 --- a/src/gdisp/gdisp_gdisp.c +++ b/src/gdisp/gdisp_gdisp.c @@ -38,9 +38,6 @@ #define GDISP_STARTUP_LOGO_TIMEOUT 0 #endif -// The color to clear the display on startup -#define GDISP_STARTUP_COLOR Black - /*===========================================================================*/ /* Driver local variables. */ /*===========================================================================*/ diff --git a/src/gdisp/sys_options.h b/src/gdisp/sys_options.h index 855f22ff..f3d8875d 100644 --- a/src/gdisp/sys_options.h +++ b/src/gdisp/sys_options.h @@ -20,14 +20,6 @@ * @name GDISP Functionality to be included * @{ */ - /** - * @brief Should the startup logo be displayed - * - * @details Defaults to TRUE - */ - #ifndef GDISP_NEED_STARTUP_LOGO - #define GDISP_NEED_STARTUP_LOGO TRUE - #endif /** * @brief Should drawing operations be automatically flushed. * @details Defaults to FALSE @@ -177,6 +169,62 @@ #ifndef GDISP_NEED_IMAGE #define GDISP_NEED_IMAGE FALSE #endif +/** + * @} + * + * @name GDISP Multi-Threading Options + * @{ + */ + /** + * @brief Do the drawing functions need to be thread-safe. + * @details Defaults to FALSE + */ + #ifndef GDISP_NEED_MULTITHREAD + #define GDISP_NEED_MULTITHREAD FALSE + #endif +/** + * @} + * + * @name GDISP Optional Parameters + * @{ + */ + /** + * @brief Should the startup logo be displayed + * + * @details Defaults to TRUE + */ + #ifndef GDISP_NEED_STARTUP_LOGO + #define GDISP_NEED_STARTUP_LOGO TRUE + #endif + /** + * @brief Define the initial background color for all displays in the system. + */ + #ifndef GDISP_STARTUP_COLOR + #define GDISP_STARTUP_COLOR Black + #endif + /** + * @brief Define the default orientation for all displays in the system. + * @note GDISP_NEED_CONTROL must also be set (and the hardware must support it) + * @note If not specified then displays default to the native hardware orientation + */ + // #define GDISP_DEFAULT_ORIENTATION GDISP_ROTATE_LANDSCAPE + /** + * @brief The size of pixel buffer (in pixels) used for optimization. + * @details Set to zero to guarantee disabling of the buffer. + * @note Depending on the driver and what operations the application + * needs, this buffer may never be allocated. + * @note Setting the size to zero may cause some operations to not + * compile eg. Scrolling if there is no hardware scroll support. + * @note Increasing the size will speedup certain operations + * at the expense of RAM. + * @note Currently only used to support scrolling on hardware without + * scrolling support, and to increase the speed of streaming + * operations on non-streaming hardware where there is a + * hardware supported bit-blit. + */ + #ifndef GDISP_LINEBUF_SIZE + #define GDISP_LINEBUF_SIZE 128 + #endif /** * @} * @@ -267,7 +315,6 @@ #ifndef GDISP_NEED_UTF8 #define GDISP_NEED_UTF8 FALSE #endif - /** * @brief Enable kerning for font rendering (improves character placement). * @details Defaults to FALSE @@ -275,7 +322,6 @@ #ifndef GDISP_NEED_TEXT_KERNING #define GDISP_NEED_TEXT_KERNING FALSE #endif - /** * @brief Enable antialiased font support * @details Defaults to FALSE @@ -283,65 +329,12 @@ #ifndef GDISP_NEED_ANTIALIAS #define GDISP_NEED_ANTIALIAS FALSE #endif - -/** - * @} - * - * @name GDISP Multi-Threading Options - * @{ - */ - /** - * @brief Do the drawing functions need to be thread-safe. - * @details Defaults to FALSE - */ - #ifndef GDISP_NEED_MULTITHREAD - #define GDISP_NEED_MULTITHREAD FALSE - #endif -/** - * @} - * - * @name GDISP Fonts - * @{ - */ - /** - * @brief Predefined built in fonts - * @note Turning off the ones you are not using can save program size. - */ - -/** - * @} - * - * @name GDISP Optional Sizing Parameters - * @{ - */ - /** - * @brief The size of pixel buffer (in pixels) used for optimization. - * @details Set to zero to guarantee disabling of the buffer. - * @note Depending on the driver and what operations the application - * needs, this buffer may never be allocated. - * @note Setting the size to zero may cause some operations to not - * compile eg. Scrolling if there is no hardware scroll support. - * @note Increasing the size will speedup certain operations - * at the expense of RAM. - * @note Currently only used to support scrolling on hardware without - * scrolling support, and to increase the speed of streaming - * operations on non-streaming hardware where there is a - * hardware supported bit-blit. - */ - #ifndef GDISP_LINEBUF_SIZE - #define GDISP_LINEBUF_SIZE 128 - #endif /** * @} * * @name GDISP Optional Low Level Driver Defines * @{ */ - /** - * @brief Define the default orientation for all displays in the system. - * @note GDISP_NEED_CONTROL must also be set (and the hardware must support it) - */ - // #define GDISP_DEFAULT_ORIENTATION GDISP_ROTATE_LANDSCAPE /** * @brief Set the screen height and width. * @note Ignored by some low level GDISP drivers, optional for others.