summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--firmware/export/config-c200.h2
-rw-r--r--firmware/target/arm/sandisk/sansa-c200/lcd-c200.c24
2 files changed, 25 insertions, 1 deletions
diff --git a/firmware/export/config-c200.h b/firmware/export/config-c200.h
index 81b7937..d7b8e7e 100644
--- a/firmware/export/config-c200.h
+++ b/firmware/export/config-c200.h
@@ -48,7 +48,7 @@
#define LCD_PIXELFORMAT RGB565 /* rgb565 */
/* define this if you have LCD enable function */
-/* TODO: #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. */
diff --git a/firmware/target/arm/sandisk/sansa-c200/lcd-c200.c b/firmware/target/arm/sandisk/sansa-c200/lcd-c200.c
index fc936b1..9e7c81e 100644
--- a/firmware/target/arm/sandisk/sansa-c200/lcd-c200.c
+++ b/firmware/target/arm/sandisk/sansa-c200/lcd-c200.c
@@ -26,6 +26,7 @@
/* Display status */
static unsigned lcd_yuv_options SHAREDBSS_ATTR = 0;
+static bool is_lcd_enabled = true;
/* LCD command set for Samsung S6B33B2 */
@@ -189,6 +190,29 @@ void lcd_set_invert_display(bool yesno)
(void)yesno;
}
+void lcd_enable(bool yesno)
+{
+ if (yesno == is_lcd_enabled)
+ return;
+
+ if (yesno)
+ {
+ lcd_send_command(R_STANDBY_OFF);
+ lcd_send_command(R_DISPLAY_ON);
+ }
+ else
+ {
+ lcd_send_command(R_STANDBY_ON);
+ }
+ is_lcd_enabled = yesno;
+}
+
+bool lcd_enabled(void)
+{
+ return is_lcd_enabled;
+}
+
+
/* turn the display upside down (call lcd_update() afterwards) */
void lcd_set_flip(bool yesno)
{