forked from len0rd/rockbox
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
This commit is contained in:
parent
f8866a3a9c
commit
c9f59e6f75
17 changed files with 644 additions and 211 deletions
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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 */
|
||||
|
|
|
|||
|
|
@ -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 */
|
||||
|
|
|
|||
|
|
@ -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 */
|
||||
|
|
|
|||
|
|
@ -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 */
|
||||
|
|
|
|||
|
|
@ -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
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue