summaryrefslogtreecommitdiff
path: root/firmware/export
diff options
context:
space:
mode:
authorMichael Sevakis <jethead71@rockbox.org>2008-05-14 19:29:25 +0000
committerMichael Sevakis <jethead71@rockbox.org>2008-05-14 19:29:25 +0000
commit009cebeab263085d142c413386f1fc7760792b6d (patch)
treeb78e716cd627ad53bad8a51cad007b3a2a1fa421 /firmware/export
parentbdc6e624bc7dd9c798a024a951b3da0dabf1ddc4 (diff)
downloadrockbox-009cebeab263085d142c413386f1fc7760792b6d.zip
rockbox-009cebeab263085d142c413386f1fc7760792b6d.tar.gz
rockbox-009cebeab263085d142c413386f1fc7760792b6d.tar.bz2
rockbox-009cebeab263085d142c413386f1fc7760792b6d.tar.xz
Straigten-out lcd sleeping on Gigabeat F/X. Add a service function to backlight.c to handle lcd sleep timer. Make HAVE_LCD_SLEEP useable without a setting and use HAVE_LCD_SLEEP_SETTING when a setting is available in addition to HCD_HAVE_SLEEP. If a setting isn't used, the target must define the timeout to be used in the config.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17505 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/export')
-rw-r--r--firmware/export/backlight.h8
-rw-r--r--firmware/export/config-c200.h1
-rw-r--r--firmware/export/config-e200.h1
-rw-r--r--firmware/export/config-gigabeat.h7
-rw-r--r--firmware/export/config-h10.h1
-rw-r--r--firmware/export/config-iaudiox5.h1
-rw-r--r--firmware/export/config-mrobe100.h1
7 files changed, 15 insertions, 5 deletions
diff --git a/firmware/export/backlight.h b/firmware/export/backlight.h
index 895328d..b09c98e 100644
--- a/firmware/export/backlight.h
+++ b/firmware/export/backlight.h
@@ -45,8 +45,10 @@ void backlight_set_on_button_hold(int index);
#endif
#ifdef HAVE_LCD_SLEEP
+void backlight_lcd_sleep_countdown(bool start);
+#ifdef HAVE_LCD_SLEEP_SETTING
void lcd_set_sleep_after_backlight_off(int index);
-extern const signed char lcd_sleep_timeout_value[];
+#endif
#endif
#else /* !HAVE_BACKLIGHT */
@@ -89,9 +91,5 @@ void buttonlight_set_timeout(int value);
#ifdef HAVE_BUTTON_LIGHT
extern int _buttonlight_timeout;
#endif
-#ifdef HAVE_LCD_SLEEP
-extern int _lcd_sleep_timer;
-extern int _lcd_sleep_timeout;
-#endif
#endif /* BACKLIGHT_H */
diff --git a/firmware/export/config-c200.h b/firmware/export/config-c200.h
index 9f3e78f..81b7937 100644
--- a/firmware/export/config-c200.h
+++ b/firmware/export/config-c200.h
@@ -53,6 +53,7 @@
/* 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 <= optional */
/* define this if you can flip your LCD */
#define HAVE_LCD_FLIP
diff --git a/firmware/export/config-e200.h b/firmware/export/config-e200.h
index 8d42dd2..58b736e 100644
--- a/firmware/export/config-e200.h
+++ b/firmware/export/config-e200.h
@@ -53,6 +53,7 @@
/* Define this if your LCD can be put to sleep. HAVE_LCD_ENABLE
should be defined as well. */
#define HAVE_LCD_SLEEP
+#define HAVE_LCD_SLEEP_SETTING
/* define this if you can flip your LCD */
#define HAVE_LCD_FLIP
diff --git a/firmware/export/config-gigabeat.h b/firmware/export/config-gigabeat.h
index a100a6a..816796b 100644
--- a/firmware/export/config-gigabeat.h
+++ b/firmware/export/config-gigabeat.h
@@ -41,6 +41,13 @@
/* Define this if your LCD can be enabled/disabled */
#define HAVE_LCD_ENABLE
+/* Define this if your LCD can be put to sleep. HAVE_LCD_ENABLE
+ should be defined as well. */
+#define HAVE_LCD_SLEEP
+/* We don't use a setting but a fixed delay after the backlight has
+ * turned off */
+#define LCD_SLEEP_TIMEOUT (5*HZ)
+
#define CONFIG_KEYPAD GIGABEAT_PAD
/* Define this if you do software codec */
diff --git a/firmware/export/config-h10.h b/firmware/export/config-h10.h
index f46eb76..7e64494 100644
--- a/firmware/export/config-h10.h
+++ b/firmware/export/config-h10.h
@@ -54,6 +54,7 @@
* should be defined as well.
* We can currently put the lcd to sleep but it won't wake up properly */
#define HAVE_LCD_SLEEP
+#define HAVE_LCD_SLEEP_SETTING
/* define this if you can flip your LCD */
#define HAVE_LCD_FLIP
diff --git a/firmware/export/config-iaudiox5.h b/firmware/export/config-iaudiox5.h
index 370d4fc..d0a107b 100644
--- a/firmware/export/config-iaudiox5.h
+++ b/firmware/export/config-iaudiox5.h
@@ -65,6 +65,7 @@
/* Define this if your LCD can be put to sleep. HAVE_LCD_ENABLE
should be defined as well. */
#define HAVE_LCD_SLEEP
+#define HAVE_LCD_SLEEP_SETTING
#define CONFIG_KEYPAD IAUDIO_X5M5_PAD
diff --git a/firmware/export/config-mrobe100.h b/firmware/export/config-mrobe100.h
index dd8b170..6aaa2b0 100644
--- a/firmware/export/config-mrobe100.h
+++ b/firmware/export/config-mrobe100.h
@@ -126,6 +126,7 @@
* should be defined as well.
* We can currently put the lcd to sleep but it won't wake up properly */
/*TODO: #define HAVE_LCD_SLEEP*/
+/*TODO: #define HAVE_LCD_SLEEP_SETTING <= optional */
/* We're able to shut off power to the HDD */
#define HAVE_ATA_POWER_OFF