summaryrefslogtreecommitdiffstats
path: root/firmware/export
diff options
context:
space:
mode:
authorSebastian Leonhardt <sebastian.leonhardt@web.de>2016-06-25 15:25:30 +0200
committerSebastian Leonhardt <sebastian.leonhardt@web.de>2019-02-07 20:04:19 +0100
commit03e63da3165fa2ea02286a4497d2e9cf0bdc6ea6 (patch)
tree81a7a555bdf07e4bc868d00d7aaa2a32d0f1c079 /firmware/export
parent60f60d9a12977cea8329b0b1c68981a2ad87b392 (diff)
downloadrockbox-03e63da3165fa2ea02286a4497d2e9cf0bdc6ea6.tar.gz
rockbox-03e63da3165fa2ea02286a4497d2e9cf0bdc6ea6.tar.bz2
rockbox-03e63da3165fa2ea02286a4497d2e9cf0bdc6ea6.zip
YH820: implement LCD sleep
use sleep setting to keep transflective LCD active without backlight Change-Id: Iccd97e956d5e4a2a22abc90d15e9123782126ecb
Diffstat (limited to 'firmware/export')
-rw-r--r--firmware/export/backlight.h4
-rw-r--r--firmware/export/config/samsungyh820.h15
2 files changed, 15 insertions, 4 deletions
diff --git a/firmware/export/backlight.h b/firmware/export/backlight.h
index a1c65a3b4e..6d029790b3 100644
--- a/firmware/export/backlight.h
+++ b/firmware/export/backlight.h
@@ -60,6 +60,10 @@ void backlight_set_on_button_hold(int index);
void lcd_set_sleep_after_backlight_off(int timeout_seconds);
#endif
+#ifdef HAVE_LCD_SLEEP
+void lcd_awake(void);
+#endif
+
#else /* !HAVE_BACKLIGHT */
#define backlight_init()
#endif /* !HAVE_BACKLIGHT */
diff --git a/firmware/export/config/samsungyh820.h b/firmware/export/config/samsungyh820.h
index 52ed821370..d937a3ff6c 100644
--- a/firmware/export/config/samsungyh820.h
+++ b/firmware/export/config/samsungyh820.h
@@ -34,6 +34,9 @@
#define LCD_DEPTH 16 /* 65536 colours */
#define LCD_PIXELFORMAT RGB565
+/* LCD stays visible without backlight - simulator hint */
+#define HAVE_TRANSFLECTIVE_LCD
+
#ifndef BOOTLOADER
/* define this if you have a real-time clock */
@@ -42,12 +45,16 @@
//#define HAVE_RTC_ALARM
/* Define this if your LCD can be enabled/disabled */
-#define HAVE_LCD_ENABLE
+/* #define HAVE_LCD_ENABLE */
/* Define this if your LCD can be put to sleep.
- HAVE_LCD_ENABLE should be defined as well. */
-/* todo #define HAVE_LCD_SLEEP*/
-/* todo #define HAVE_LCD_SLEEP_SETTING */
+ HAVE_LCD_ENABLE should be defined as well.
+ Note: with a transflective display, HAVE_LCD_ENABLE shouldn't be defined.
+ LCD gets disabled when setting to sleep. */
+#define HAVE_LCD_SLEEP
+#define HAVE_LCD_SLEEP_SETTING
+/* The same code may also be used when shutting down */
+#define HAVE_LCD_SHUTDOWN
#endif /* !BOOTLOADER */
/* Define this for LCD backlight available */