From d7fc0795d56a72392cd295400d2126c12d3acdbd Mon Sep 17 00:00:00 2001 From: Andrew Hannam Date: Tue, 31 Jul 2012 15:24:15 +1000 Subject: Reduce minimum number of low level driver routines to 2 --- halext/drivers/gdispNokia6100/gdisp_lld.c | 72 +++++++++++++----------- halext/drivers/gdispNokia6100/gdisp_lld.h | 4 +- halext/drivers/gdispNokia6100/gdisp_lld_config.h | 16 +++++- 3 files changed, 54 insertions(+), 38 deletions(-) (limited to 'halext/drivers') diff --git a/halext/drivers/gdispNokia6100/gdisp_lld.c b/halext/drivers/gdispNokia6100/gdisp_lld.c index 0d039107..b34bc7d8 100644 --- a/halext/drivers/gdispNokia6100/gdisp_lld.c +++ b/halext/drivers/gdispNokia6100/gdisp_lld.c @@ -35,8 +35,8 @@ */ /** - * @file templates/gdisp_lld.c - * @brief GDISP Graphics Driver subsystem low level driver source template. + * @file gdispNokia6100/gdisp_lld.c + * @brief GDISP Graphics Driver subsystem low level driver source for the Nokia6100 display. * * @addtogroup GDISP * @{ @@ -87,7 +87,7 @@ /* ---- Required Routines ---- */ /* - The following 4 routines are required. + The following 2 routines are required. All other routines are optional. */ @@ -107,37 +107,6 @@ void gdisp_lld_init(void) { /* Code here */ } -/** - * @brief Sets the power mode for the graphic device. - * @note The power modes are powerOn, powerSleep and powerOff. - * If powerSleep is not supported it is equivelent to powerOn. - * - * @param[in] powerMode The new power mode - * - * @notapi - */ -void gdisp_lld_setpowermode(gdisp_powermode_t powerMode) { - /* Code here */ - /* if successful - GDISP1.Powermode = powerMode; - */ -} - -/** - * @brief Sets the orientation of the display. - * @note This may be ignored if not supported by the device. - * - * @param[in] newOrientation The new orientation - * - * @notapi - */ -void gdisp_lld_setorientation(gdisp_orientation_t newOrientation) { - /* Code here */ - /* if successful - GDISP1.Orientation = newOrientation; - */ -} - /** * @brief Draws a pixel on the display. * @@ -171,6 +140,41 @@ void gdisp_lld_drawpixel(coord_t x, coord_t y, color_t color) { gdisp_lld_fillarea() and gdisp_lld_blitarea(). */ +#if GDISP_HARDWARE_POWERCONTROL || defined(__DOXYGEN__) +/** + * @brief Sets the power mode for the graphic device. + * @note The power modes are powerOn, powerSleep and powerOff. + * If powerSleep is not supported it is equivelent to powerOn. + * + * @param[in] powerMode The new power mode + * + * @notapi + */ +void gdisp_lld_setpowermode(gdisp_powermode_t powerMode) { + /* Code here */ + /* if successful + GDISP1.Powermode = powerMode; + */ +} +#endif + +#if GDISP_HARDWARE_ORIENTATION || defined(__DOXYGEN__) +/** + * @brief Sets the orientation of the display. + * @note This may be ignored if not supported by the device. + * + * @param[in] newOrientation The new orientation + * + * @notapi + */ +void gdisp_lld_setorientation(gdisp_orientation_t newOrientation) { + /* Code here */ + /* if successful + GDISP1.Orientation = newOrientation; + */ +} +#endif + #if GDISP_HARDWARE_CLEARS || defined(__DOXYGEN__) /** * @brief Clear the display. diff --git a/halext/drivers/gdispNokia6100/gdisp_lld.h b/halext/drivers/gdispNokia6100/gdisp_lld.h index 221983f4..dfdb1ad5 100644 --- a/halext/drivers/gdispNokia6100/gdisp_lld.h +++ b/halext/drivers/gdispNokia6100/gdisp_lld.h @@ -35,8 +35,8 @@ */ /** - * @file templates/gdisp_lld.h - * @brief GDISP Graphic Driver subsystem low level driver header template. + * @file gdispNokia6100/gdisp_lld.h + * @brief GDISP Graphic Driver subsystem low level driver header for the Nokia6100 display. * * @addtogroup GDISP * @{ diff --git a/halext/drivers/gdispNokia6100/gdisp_lld_config.h b/halext/drivers/gdispNokia6100/gdisp_lld_config.h index 0d54faf0..088edb70 100644 --- a/halext/drivers/gdispNokia6100/gdisp_lld_config.h +++ b/halext/drivers/gdispNokia6100/gdisp_lld_config.h @@ -35,8 +35,8 @@ */ /** - * @file templates/gdisp_lld_config.h - * @brief GDISP Graphic Driver subsystem low level driver header template. + * @file gdispNokia6100/gdisp_lld_config.h + * @brief GDISP Graphic Driver subsystem low level driver header for the Nokia6100 display. * * @addtogroup GDISP * @{ @@ -55,6 +55,18 @@ * @name GDISP hardware accelerated support * @{ */ + /** + * @brief Hardware supports changing the orientation. + * @details If set to @p FALSE a software stubb is provided. + */ + #define GDISP_HARDWARE_ORIENTATION FALSE + + /** + * @brief Hardware supports power control. + * @details If set to @p FALSE a software stubb is provided. + */ + #define GDISP_HARDWARE_POWERCONTROL FALSE + /** * @brief Hardware accelerated line drawing. * @details If set to @p FALSE software emulation is used. -- cgit v1.2.3