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.tar.gz
rockbox-c9f59e6f75bcfa25a563fedd77bfa77b3617f133.zip
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 09960b7537..62f024816f 100644
--- a/firmware/export/backlight.h
+++ b/firmware/export/backlight.h
@@ -27,6 +27,10 @@ void backlight_off(void);
27void backlight_set_timeout(int index); 27void backlight_set_timeout(int index);
28#ifdef CONFIG_BACKLIGHT 28#ifdef CONFIG_BACKLIGHT
29void backlight_init(void); 29void backlight_init(void);
30#if defined(IAUDIO_X5) && !defined(SIMULATOR)
31#define X5_BACKLIGHT_SHUTDOWN
32void x5_backlight_shutdown(void);
33#endif
30int backlight_get_current_timeout(void); 34int backlight_get_current_timeout(void);
31#ifdef HAVE_BACKLIGHT_PWM_FADING 35#ifdef HAVE_BACKLIGHT_PWM_FADING
32void backlight_set_fade_in(int index); 36void backlight_set_fade_in(int index);
@@ -34,9 +38,17 @@ void backlight_set_fade_out(int index);
34#endif 38#endif
35void backlight_set_timeout_plugged(int index); 39void backlight_set_timeout_plugged(int index);
36extern const signed char backlight_timeout_value[]; 40extern const signed char backlight_timeout_value[];
37#else 41#ifdef HAS_BUTTON_HOLD
38#define backlight_init() 42void backlight_set_on_button_hold(int index);
43void backlight_hold_changed(bool hold_button);
39#endif 44#endif
45#ifdef HAVE_LCD_SLEEP
46void lcd_set_sleep_after_backlight_off(int index);
47extern const signed char lcd_sleep_timeout_value[];
48#endif
49#else /* ndef CONFIG_BACKLIGHT */
50#define backlight_init()
51#endif /* CONFIG_BACKLIGHT */
40 52
41#ifdef HAVE_REMOTE_LCD 53#ifdef HAVE_REMOTE_LCD
42void remote_backlight_on(void); 54void remote_backlight_on(void);
diff --git a/firmware/export/config-h300.h b/firmware/export/config-h300.h
index e98b60c9fc..6d5fbabbdf 100644
--- a/firmware/export/config-h300.h
+++ b/firmware/export/config-h300.h
@@ -70,6 +70,9 @@
70 70
71#ifndef SIMULATOR 71#ifndef SIMULATOR
72 72
73/* Define this if your LCD can be enabled/disabled */
74#define HAVE_LCD_ENABLE
75
73/* Define this if you have a Motorola SCF5249 */ 76/* Define this if you have a Motorola SCF5249 */
74#define CONFIG_CPU MCF5249 77#define CONFIG_CPU MCF5249
75 78
@@ -126,4 +129,4 @@
126/* define this if the unit can be powered or charged via USB */ 129/* define this if the unit can be powered or charged via USB */
127#define HAVE_USB_POWER 130#define HAVE_USB_POWER
128 131
129#endif 132#endif /* SIMULATOR */
diff --git a/firmware/export/config-iaudiox5.h b/firmware/export/config-iaudiox5.h
index a828ca1ec9..afb5074662 100644
--- a/firmware/export/config-iaudiox5.h
+++ b/firmware/export/config-iaudiox5.h
@@ -23,7 +23,6 @@
23#define LCD_HEIGHT 128 23#define LCD_HEIGHT 128
24#define LCD_DEPTH 16 /* pseudo 262.144 colors */ 24#define LCD_DEPTH 16 /* pseudo 262.144 colors */
25#define LCD_PIXELFORMAT RGB565 /* rgb565 */ 25#define LCD_PIXELFORMAT RGB565 /* rgb565 */
26#define HAVE_LCD_CONTRAST
27 26
28/* remote LCD */ 27/* remote LCD */
29#define LCD_REMOTE_WIDTH 128 28#define LCD_REMOTE_WIDTH 128
@@ -47,7 +46,7 @@
47#define DEFAULT_CONTRAST_SETTING 19 /* Match boot contrast */ 46#define DEFAULT_CONTRAST_SETTING 19 /* Match boot contrast */
48 47
49/* Define this for LCD backlight available */ 48/* Define this for LCD backlight available */
50#define CONFIG_BACKLIGHT BL_IRIVER_H100 /* port controlled !?!? */ 49#define CONFIG_BACKLIGHT BL_X5 /* PCF50606 I2C */
51#define HAVE_BACKLIGHT_BRIGHTNESS 50#define HAVE_BACKLIGHT_BRIGHTNESS
52 51
53/* Define this if you have a software controlled poweroff */ 52/* Define this if you have a software controlled poweroff */
@@ -70,6 +69,16 @@
70 69
71#ifndef SIMULATOR 70#ifndef SIMULATOR
72 71
72/* Define this if your LCD can set contrast */
73#define HAVE_LCD_CONTRAST
74
75/* Define this if your LCD can be enabled/disabled */
76#define HAVE_LCD_ENABLE
77
78/* Define this if your LCD can be put to sleep. HAVE_LCD_ENABLE
79 should be defined as well. */
80#define HAVE_LCD_SLEEP
81
73/* Define this if you have a Motorola SCF5250 */ 82/* Define this if you have a Motorola SCF5250 */
74#define CONFIG_CPU MCF5250 83#define CONFIG_CPU MCF5250
75 84
@@ -122,4 +131,4 @@
122#define BOOTFILE_EXT "iaudio" 131#define BOOTFILE_EXT "iaudio"
123#define BOOTFILE "rockbox." BOOTFILE_EXT 132#define BOOTFILE "rockbox." BOOTFILE_EXT
124 133
125#endif 134#endif /* SIMULATOR */
diff --git a/firmware/export/config-ipod3g.h b/firmware/export/config-ipod3g.h
index d0d2d0664c..831ff40c1d 100644
--- a/firmware/export/config-ipod3g.h
+++ b/firmware/export/config-ipod3g.h
@@ -54,6 +54,9 @@
54 54
55#ifndef SIMULATOR 55#ifndef SIMULATOR
56 56
57/* Define this if your LCD can be enabled/disabled */
58#define HAVE_LCD_ENABLE
59
57/* Define this if you have a PortalPlayer PP5002 */ 60/* Define this if you have a PortalPlayer PP5002 */
58#define CONFIG_CPU PP5002 61#define CONFIG_CPU PP5002
59 62
@@ -103,4 +106,4 @@
103#define BOOTFILE_EXT "ipod" 106#define BOOTFILE_EXT "ipod"
104#define BOOTFILE "rockbox." BOOTFILE_EXT 107#define BOOTFILE "rockbox." BOOTFILE_EXT
105 108
106#endif 109#endif /* SIMULATOR */
diff --git a/firmware/export/config.h b/firmware/export/config.h
index 0dd1d25637..f00ac6498c 100644
--- a/firmware/export/config.h
+++ b/firmware/export/config.h
@@ -116,6 +116,7 @@
116#define BL_IPODMINI 10 /* Apple iPod Mini */ 116#define BL_IPODMINI 10 /* Apple iPod Mini */
117#define BL_GIGABEAT 11 /* Toshiba Gigabeat */ 117#define BL_GIGABEAT 11 /* Toshiba Gigabeat */
118#define BL_IRIVER_H10 12 /* iriver H10 */ 118#define BL_IRIVER_H10 12 /* iriver H10 */
119#define BL_X5 13 /* iAudio X5 PCF50606 I2C */
119 120
120/* CONFIG_I2C */ 121/* CONFIG_I2C */
121#define I2C_PLAYREC 0 /* Archos Player/Recorder style */ 122#define I2C_PLAYREC 0 /* Archos Player/Recorder style */
diff --git a/firmware/export/lcd.h b/firmware/export/lcd.h
index c3ad4f97d9..5c362c2b53 100644
--- a/firmware/export/lcd.h
+++ b/firmware/export/lcd.h
@@ -227,10 +227,17 @@ extern fb_data lcd_framebuffer[LCD_HEIGHT][LCD_WIDTH];
227#define LCD_FBWIDTH LCD_WIDTH 227#define LCD_FBWIDTH LCD_WIDTH
228#endif 228#endif
229 229
230#if (CONFIG_BACKLIGHT==BL_IRIVER_H300) || (CONFIG_BACKLIGHT==BL_IPOD3G) 230/** Port-specific functions. Enable in port config file. **/
231#ifdef HAVE_LCD_ENABLE
232/* Enable/disable the main display. */
231extern void lcd_enable(bool on); 233extern void lcd_enable(bool on);
232#endif 234#endif
233 235
236#ifdef HAVE_LCD_SLEEP
237/* Put the LCD into a power saving state deeper than lcd_enable(false). */
238extern void lcd_sleep(void);
239#endif
240
234/* Bitmap formats */ 241/* Bitmap formats */
235enum 242enum
236{ 243{