diff options
author | Andrew Hannam <andrewh@inmarket.com.au> | 2012-07-31 15:24:15 +1000 |
---|---|---|
committer | Andrew Hannam <andrewh@inmarket.com.au> | 2012-07-31 15:24:15 +1000 |
commit | d7fc0795d56a72392cd295400d2126c12d3acdbd (patch) | |
tree | dad005852de62d06fc6519afd3c3a4ff91e558b6 /halext/drivers | |
parent | 256062859a1b60dd93c73939b8d9a697e569f252 (diff) | |
download | uGFX-d7fc0795d56a72392cd295400d2126c12d3acdbd.tar.gz uGFX-d7fc0795d56a72392cd295400d2126c12d3acdbd.tar.bz2 uGFX-d7fc0795d56a72392cd295400d2126c12d3acdbd.zip |
Reduce minimum number of low level driver routines to 2
Diffstat (limited to 'halext/drivers')
-rw-r--r-- | halext/drivers/gdispNokia6100/gdisp_lld.c | 72 | ||||
-rw-r--r-- | halext/drivers/gdispNokia6100/gdisp_lld.h | 4 | ||||
-rw-r--r-- | halext/drivers/gdispNokia6100/gdisp_lld_config.h | 16 |
3 files changed, 54 insertions, 38 deletions
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.
*/
@@ -108,37 +108,6 @@ void gdisp_lld_init(void) { }
/**
- * @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.
*
* @param[in] x X location of the pixel
@@ -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 * @{ @@ -56,6 +56,18 @@ * @{ */ /** + * @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. */ |