summaryrefslogtreecommitdiff
path: root/firmware/export
diff options
context:
space:
mode:
authorRani Hod <raenye@gmail.com>2006-08-08 22:03:56 +0000
committerRani Hod <raenye@gmail.com>2006-08-08 22:03:56 +0000
commitc9f59e6f75bcfa25a563fedd77bfa77b3617f133 (patch)
treeceff51afb679acb2935ed18072384819abf4281e /firmware/export
parentf8866a3a9c3a12b72e87ae96445eca1b52ed23fb (diff)
downloadrockbox-c9f59e6f75bcfa25a563fedd77bfa77b3617f133.zip
rockbox-c9f59e6f75bcfa25a563fedd77bfa77b3617f133.tar.gz
rockbox-c9f59e6f75bcfa25a563fedd77bfa77b3617f133.tar.bz2
rockbox-c9f59e6f75bcfa25a563fedd77bfa77b3617f133.tar.xz
Accepted FS #5772 by Michael Sevakis
1. X5 lcd sleep 2. #define HAVE_LCD_ENABLE 3. add "backlight (on hold switch)" setting, adapted from FS #5735 Note that the while(1) yield ==> asm("halt") part is NOT commited here, I prefer it would be discussed separately. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@10489 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/export')
-rw-r--r--firmware/export/backlight.h16
-rw-r--r--firmware/export/config-h300.h5
-rw-r--r--firmware/export/config-iaudiox5.h15
-rw-r--r--firmware/export/config-ipod3g.h5
-rw-r--r--firmware/export/config.h1
-rw-r--r--firmware/export/lcd.h9
6 files changed, 43 insertions, 8 deletions
diff --git a/firmware/export/backlight.h b/firmware/export/backlight.h
index 09960b7..62f0248 100644
--- a/firmware/export/backlight.h
+++ b/firmware/export/backlight.h
@@ -27,6 +27,10 @@ void backlight_off(void);
void backlight_set_timeout(int index);
#ifdef CONFIG_BACKLIGHT
void backlight_init(void);
+#if defined(IAUDIO_X5) && !defined(SIMULATOR)
+#define X5_BACKLIGHT_SHUTDOWN
+void x5_backlight_shutdown(void);
+#endif
int backlight_get_current_timeout(void);
#ifdef HAVE_BACKLIGHT_PWM_FADING
void backlight_set_fade_in(int index);
@@ -34,9 +38,17 @@ void backlight_set_fade_out(int index);
#endif
void backlight_set_timeout_plugged(int index);
extern const signed char backlight_timeout_value[];
-#else
-#define backlight_init()
+#ifdef HAS_BUTTON_HOLD
+void backlight_set_on_button_hold(int index);
+void backlight_hold_changed(bool hold_button);
#endif
+#ifdef HAVE_LCD_SLEEP
+void lcd_set_sleep_after_backlight_off(int index);
+extern const signed char lcd_sleep_timeout_value[];
+#endif
+#else /* ndef CONFIG_BACKLIGHT */
+#define backlight_init()
+#endif /* CONFIG_BACKLIGHT */
#ifdef HAVE_REMOTE_LCD
void remote_backlight_on(void);
diff --git a/firmware/export/config-h300.h b/firmware/export/config-h300.h
index e98b60c..6d5fbab 100644
--- a/firmware/export/config-h300.h
+++ b/firmware/export/config-h300.h
@@ -70,6 +70,9 @@
#ifndef SIMULATOR
+/* Define this if your LCD can be enabled/disabled */
+#define HAVE_LCD_ENABLE
+
/* Define this if you have a Motorola SCF5249 */
#define CONFIG_CPU MCF5249
@@ -126,4 +129,4 @@
/* define this if the unit can be powered or charged via USB */
#define HAVE_USB_POWER
-#endif
+#endif /* SIMULATOR */
diff --git a/firmware/export/config-iaudiox5.h b/firmware/export/config-iaudiox5.h
index a828ca1..afb5074 100644
--- a/firmware/export/config-iaudiox5.h
+++ b/firmware/export/config-iaudiox5.h
@@ -23,7 +23,6 @@
#define LCD_HEIGHT 128
#define LCD_DEPTH 16 /* pseudo 262.144 colors */
#define LCD_PIXELFORMAT RGB565 /* rgb565 */
-#define HAVE_LCD_CONTRAST
/* remote LCD */
#define LCD_REMOTE_WIDTH 128
@@ -47,7 +46,7 @@
#define DEFAULT_CONTRAST_SETTING 19 /* Match boot contrast */
/* Define this for LCD backlight available */
-#define CONFIG_BACKLIGHT BL_IRIVER_H100 /* port controlled !?!? */
+#define CONFIG_BACKLIGHT BL_X5 /* PCF50606 I2C */
#define HAVE_BACKLIGHT_BRIGHTNESS
/* Define this if you have a software controlled poweroff */
@@ -70,6 +69,16 @@
#ifndef SIMULATOR
+/* Define this if your LCD can set contrast */
+#define HAVE_LCD_CONTRAST
+
+/* 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
+
/* Define this if you have a Motorola SCF5250 */
#define CONFIG_CPU MCF5250
@@ -122,4 +131,4 @@
#define BOOTFILE_EXT "iaudio"
#define BOOTFILE "rockbox." BOOTFILE_EXT
-#endif
+#endif /* SIMULATOR */
diff --git a/firmware/export/config-ipod3g.h b/firmware/export/config-ipod3g.h
index d0d2d06..831ff40 100644
--- a/firmware/export/config-ipod3g.h
+++ b/firmware/export/config-ipod3g.h
@@ -54,6 +54,9 @@
#ifndef SIMULATOR
+/* Define this if your LCD can be enabled/disabled */
+#define HAVE_LCD_ENABLE
+
/* Define this if you have a PortalPlayer PP5002 */
#define CONFIG_CPU PP5002
@@ -103,4 +106,4 @@
#define BOOTFILE_EXT "ipod"
#define BOOTFILE "rockbox." BOOTFILE_EXT
-#endif
+#endif /* SIMULATOR */
diff --git a/firmware/export/config.h b/firmware/export/config.h
index 0dd1d25..f00ac64 100644
--- a/firmware/export/config.h
+++ b/firmware/export/config.h
@@ -116,6 +116,7 @@
#define BL_IPODMINI 10 /* Apple iPod Mini */
#define BL_GIGABEAT 11 /* Toshiba Gigabeat */
#define BL_IRIVER_H10 12 /* iriver H10 */
+#define BL_X5 13 /* iAudio X5 PCF50606 I2C */
/* CONFIG_I2C */
#define I2C_PLAYREC 0 /* Archos Player/Recorder style */
diff --git a/firmware/export/lcd.h b/firmware/export/lcd.h
index c3ad4f9..5c362c2 100644
--- a/firmware/export/lcd.h
+++ b/firmware/export/lcd.h
@@ -227,10 +227,17 @@ extern fb_data lcd_framebuffer[LCD_HEIGHT][LCD_WIDTH];
#define LCD_FBWIDTH LCD_WIDTH
#endif
-#if (CONFIG_BACKLIGHT==BL_IRIVER_H300) || (CONFIG_BACKLIGHT==BL_IPOD3G)
+/** Port-specific functions. Enable in port config file. **/
+#ifdef HAVE_LCD_ENABLE
+/* Enable/disable the main display. */
extern void lcd_enable(bool on);
#endif
+#ifdef HAVE_LCD_SLEEP
+/* Put the LCD into a power saving state deeper than lcd_enable(false). */
+extern void lcd_sleep(void);
+#endif
+
/* Bitmap formats */
enum
{