aboutsummaryrefslogtreecommitdiffstats
path: root/src/gdisp.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/gdisp.c')
-rw-r--r--src/gdisp.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/gdisp.c b/src/gdisp.c
index 81c06599..ddcf8546 100644
--- a/src/gdisp.c
+++ b/src/gdisp.c
@@ -1267,6 +1267,24 @@ void gdispDrawBox(coord_t x, coord_t y, coord_t cx, coord_t cy, color_t color) {
}
#endif
+/**
+ * @brief Control backlight brightness
+ *
+ * @param[in] percentage The percentage of the brightness (0 to 100)
+ */
+void gdispSetBacklight(uint8_t percentage) {
+ gdispControl(GDISP_CONTROL_BACKLIGHT, (void*)&percentage);
+}
+
+/**
+ * @brief Control display contrast
+ *
+ * @param[in] percentage The percentage of the contrast
+ */
+void gdispSetPercentage(uint8_t percentage){
+ gdispControl(GDISP_CONTROL_CONTRAST, (void*)&percentage);
+}
+
#endif /* GFX_USE_GDISP */
#endif /* _GDISP_C */