H300 backlight
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@7885 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
e13fad3b4b
commit
d29aef3d62
|
@ -61,7 +61,7 @@ static int remote_backlight_timer;
|
|||
static unsigned int remote_backlight_timeout = 5;
|
||||
#endif
|
||||
|
||||
#if CONFIG_BACKLIGHT == BL_IRIVER
|
||||
#if CONFIG_BACKLIGHT == BL_IRIVER_H100
|
||||
/* backlight fading */
|
||||
#define BL_PWM_INTERVAL 5000 /* Cycle interval in µs */
|
||||
#define BL_PWM_COUNT 100
|
||||
|
@ -195,7 +195,7 @@ void backlight_set_fade_out(int index)
|
|||
|
||||
static void __backlight_off(void)
|
||||
{
|
||||
#if CONFIG_BACKLIGHT == BL_IRIVER
|
||||
#if CONFIG_BACKLIGHT == BL_IRIVER_H100
|
||||
if (fade_out_count > 0)
|
||||
backlight_dim(0);
|
||||
else
|
||||
|
@ -203,6 +203,8 @@ static void __backlight_off(void)
|
|||
bl_dim_target = bl_dim_current = 0;
|
||||
or_l(0x00020000, &GPIO1_OUT);
|
||||
}
|
||||
#elif CONFIG_BACKLIGHT == BL_IRIVER_H300
|
||||
and_l(~0x00020000, &GPIO1_OUT);
|
||||
#elif CONFIG_BACKLIGHT == BL_RTC
|
||||
/* Disable square wave */
|
||||
rtc_write(0x0a, rtc_read(0x0a) & ~0x40);
|
||||
|
@ -227,7 +229,7 @@ static void __backlight_off(void)
|
|||
|
||||
static void __backlight_on(void)
|
||||
{
|
||||
#if CONFIG_BACKLIGHT == BL_IRIVER
|
||||
#if CONFIG_BACKLIGHT == BL_IRIVER_H100
|
||||
if (fade_in_count > 0)
|
||||
backlight_dim(BL_PWM_COUNT);
|
||||
else
|
||||
|
@ -235,6 +237,8 @@ static void __backlight_on(void)
|
|||
bl_dim_target = bl_dim_current = BL_PWM_COUNT;
|
||||
and_l(~0x00020000, &GPIO1_OUT);
|
||||
}
|
||||
#elif CONFIG_BACKLIGHT == BL_IRIVER_H300
|
||||
or_l(0x00020000, &GPIO1_OUT);
|
||||
#elif CONFIG_BACKLIGHT == BL_RTC
|
||||
/* Enable square wave */
|
||||
rtc_write(0x0a, rtc_read(0x0a) | 0x40);
|
||||
|
@ -317,7 +321,7 @@ void backlight_thread(void)
|
|||
__backlight_off();
|
||||
break;
|
||||
|
||||
#if CONFIG_BACKLIGHT == BL_IRIVER
|
||||
#if CONFIG_BACKLIGHT == BL_IRIVER_H100
|
||||
case BACKLIGHT_UNBOOST_CPU:
|
||||
cpu_boost(false);
|
||||
break;
|
||||
|
@ -430,10 +434,14 @@ void backlight_init(void)
|
|||
create_thread(backlight_thread, backlight_stack,
|
||||
sizeof(backlight_stack), backlight_thread_name);
|
||||
|
||||
#if CONFIG_BACKLIGHT == BL_IRIVER
|
||||
#if CONFIG_BACKLIGHT == BL_IRIVER_H100
|
||||
or_l(0x00020000, &GPIO1_ENABLE);
|
||||
or_l(0x00020000, &GPIO1_FUNCTION);
|
||||
and_l(~0x00020000, &GPIO1_OUT); /* Start with the backlight ON */
|
||||
#elif CONFIG_BACKLIGHT == BL_IRIVER_H300
|
||||
or_l(0x00020000, &GPIO1_ENABLE);
|
||||
or_l(0x00020000, &GPIO1_FUNCTION);
|
||||
or_l(0x00020000, &GPIO1_OUT); /* Start with the backlight ON */
|
||||
#elif CONFIG_BACKLIGHT == BL_PA14_LO || CONFIG_BACKLIGHT == BL_PA14_HI
|
||||
PACR1 &= ~0x3000; /* Set PA14 (backlight control) to GPIO */
|
||||
or_b(0x40, &PAIORH); /* ..and output */
|
||||
|
|
|
@ -75,7 +75,7 @@
|
|||
#define FLASH_SIZE 0x200000
|
||||
|
||||
/* Define this for LCD backlight available */
|
||||
#define CONFIG_BACKLIGHT BL_IRIVER /* port controlled */
|
||||
#define CONFIG_BACKLIGHT BL_IRIVER_H100 /* port controlled */
|
||||
|
||||
/* Define this to the CPU frequency */
|
||||
#define CPU_FREQ 11289600
|
||||
|
|
|
@ -72,7 +72,7 @@
|
|||
#define FLASH_SIZE 0x200000
|
||||
|
||||
/* Define this for LCD backlight available */
|
||||
#define CONFIG_BACKLIGHT BL_IRIVER /* port controlled */
|
||||
#define CONFIG_BACKLIGHT BL_IRIVER_H100 /* port controlled */
|
||||
|
||||
/* Define this to the CPU frequency */
|
||||
#define CPU_FREQ 11289600
|
||||
|
|
|
@ -69,7 +69,7 @@
|
|||
#define FLASH_SIZE 0x400000
|
||||
|
||||
/* Define this for LCD backlight available */
|
||||
#define CONFIG_BACKLIGHT BL_IRIVER /* port controlled */
|
||||
#define CONFIG_BACKLIGHT BL_IRIVER_H300 /* port controlled PWM */
|
||||
|
||||
/* Define this to the CPU frequency */
|
||||
#define CPU_FREQ 11289600
|
||||
|
|
|
@ -77,13 +77,14 @@
|
|||
#define LCD_IPODNANO 7 /* as used by iPod Nano */
|
||||
|
||||
/* CONFIG_BACKLIGHT */
|
||||
#define BL_PA14_LO 0 /* Player, PA14 low active */
|
||||
#define BL_RTC 1 /* Recorder, RTC square wave output */
|
||||
#define BL_PA14_HI 2 /* Ondio, PA14 high active */
|
||||
#define BL_IRIVER 3 /* IRiver GPIO */
|
||||
#define BL_GMINI 4 /* Archos GMini */
|
||||
#define BL_IPOD4G 5 /* Apple iPod 4G */
|
||||
#define BL_IPODNANO 6 /* Apple iPod Nano */
|
||||
#define BL_PA14_LO 0 /* Player, PA14 low active */
|
||||
#define BL_RTC 1 /* Recorder, RTC square wave output */
|
||||
#define BL_PA14_HI 2 /* Ondio, PA14 high active */
|
||||
#define BL_IRIVER_H100 3 /* IRiver GPIO */
|
||||
#define BL_GMINI 4 /* Archos GMini */
|
||||
#define BL_IPOD4G 5 /* Apple iPod 4G */
|
||||
#define BL_IPODNANO 6 /* Apple iPod Nano */
|
||||
#define BL_IRIVER_H300 7 /* IRiver PWM */
|
||||
|
||||
/* CONFIG_I2C */
|
||||
#define I2C_PLAYREC 0 /* Archos Player/Recorder style */
|
||||
|
|
Loading…
Reference in New Issue
Block a user