diff options
Diffstat (limited to 'halext/template')
-rw-r--r-- | halext/template/gdisp_lld.c | 68 | ||||
-rw-r--r-- | halext/template/gdisp_lld_config.h | 12 |
2 files changed, 48 insertions, 32 deletions
diff --git a/halext/template/gdisp_lld.c b/halext/template/gdisp_lld.c index 0d039107..4d715a50 100644 --- a/halext/template/gdisp_lld.c +++ b/halext/template/gdisp_lld.c @@ -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/template/gdisp_lld_config.h b/halext/template/gdisp_lld_config.h index 0d54faf0..d0eeb939 100644 --- a/halext/template/gdisp_lld_config.h +++ b/halext/template/gdisp_lld_config.h @@ -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. */ |