summaryrefslogtreecommitdiff
path: root/firmware/export
diff options
context:
space:
mode:
authorJens Arnold <amiconn@rockbox.org>2007-11-12 18:49:53 +0000
committerJens Arnold <amiconn@rockbox.org>2007-11-12 18:49:53 +0000
commitef12b3b5c678e4fa44d60061b0c1bc312e589ba1 (patch)
tree4c2572d7bf3d995be16b33fa2e46ccccad34f4ee /firmware/export
parent8537cbf091634efa57768dccff39049afdf6d288 (diff)
downloadrockbox-ef12b3b5c678e4fa44d60061b0c1bc312e589ba1.zip
rockbox-ef12b3b5c678e4fa44d60061b0c1bc312e589ba1.tar.gz
rockbox-ef12b3b5c678e4fa44d60061b0c1bc312e589ba1.tar.bz2
rockbox-ef12b3b5c678e4fa44d60061b0c1bc312e589ba1.tar.xz
Hardware controlled backlight brightness for iPod Video and Nano, retaining the software PWM fade in/ fade out. * Backlight handling cleanup, getting rid of one layer of 'lowlevelness'. * Use atomic GPIO bit manipulation for PP502x backlight handling.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15599 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/export')
-rw-r--r--firmware/export/backlight.h9
-rw-r--r--firmware/export/config-ipodnano.h6
-rw-r--r--firmware/export/config-ipodvideo.h6
3 files changed, 21 insertions, 0 deletions
diff --git a/firmware/export/backlight.h b/firmware/export/backlight.h
index 8df4599..47fee7d 100644
--- a/firmware/export/backlight.h
+++ b/firmware/export/backlight.h
@@ -85,4 +85,13 @@ void buttonlight_off(void);
void buttonlight_set_timeout(int index);
#endif
+/* Private API for use in target tree backlight code only */
+#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-ipodnano.h b/firmware/export/config-ipodnano.h
index 4fcb8f6..6909561 100644
--- a/firmware/export/config-ipodnano.h
+++ b/firmware/export/config-ipodnano.h
@@ -72,6 +72,12 @@
/* Define this for LCD backlight available */
#define HAVE_BACKLIGHT
+#define HAVE_BACKLIGHT_BRIGHTNESS
+
+/* Main LCD backlight brightness range and defaults */
+#define MIN_BRIGHTNESS_SETTING 1
+#define MAX_BRIGHTNESS_SETTING 32
+#define DEFAULT_BRIGHTNESS_SETTING 16
/* We can fade the backlight by using PWM */
#define HAVE_BACKLIGHT_PWM_FADING
diff --git a/firmware/export/config-ipodvideo.h b/firmware/export/config-ipodvideo.h
index eecb65c..60a5dd8 100644
--- a/firmware/export/config-ipodvideo.h
+++ b/firmware/export/config-ipodvideo.h
@@ -72,6 +72,12 @@
/* Define this for LCD backlight available */
#define HAVE_BACKLIGHT
+#define HAVE_BACKLIGHT_BRIGHTNESS
+
+/* Main LCD backlight brightness range and defaults */
+#define MIN_BRIGHTNESS_SETTING 1
+#define MAX_BRIGHTNESS_SETTING 32
+#define DEFAULT_BRIGHTNESS_SETTING 16
/* We can fade the backlight by using PWM */
#define HAVE_BACKLIGHT_PWM_FADING