1
0
Fork 0
forked from len0rd/rockbox

backlight driver for Gmini

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@5795 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Jean-Philippe Bernardy 2005-02-05 10:53:41 +00:00
parent 0b033a74d7
commit 5f91f4acff
3 changed files with 9 additions and 0 deletions

View file

@ -60,6 +60,8 @@ static void __backlight_off(void)
and_b(~0x40, &PAIORH); /* let it float (up) */ and_b(~0x40, &PAIORH); /* let it float (up) */
#elif CONFIG_BACKLIGHT == BL_PA14_HI /* Ondio */ #elif CONFIG_BACKLIGHT == BL_PA14_HI /* Ondio */
and_b(~0x40, &PADRH); /* drive it low */ and_b(~0x40, &PADRH); /* drive it low */
#elif CONFIG_BACKLIGHT == BL_GMINI
P1 &= ~0x10;
#endif #endif
} }
@ -75,6 +77,8 @@ static void __backlight_on(void)
or_b(0x40, &PAIORH); or_b(0x40, &PAIORH);
#elif CONFIG_BACKLIGHT == BL_PA14_HI /* Ondio */ #elif CONFIG_BACKLIGHT == BL_PA14_HI /* Ondio */
or_b(0x40, &PADRH); /* drive it high */ or_b(0x40, &PADRH); /* drive it high */
#elif CONFIG_BACKLIGHT == BL_GMINI
P1 |= 0x10;
#endif #endif
} }
@ -193,6 +197,8 @@ void backlight_init(void)
#elif CONFIG_BACKLIGHT == BL_PA14_LO || CONFIG_BACKLIGHT == BL_PA14_HI #elif CONFIG_BACKLIGHT == BL_PA14_LO || CONFIG_BACKLIGHT == BL_PA14_HI
PACR1 &= ~0x3000; /* Set PA14 (backlight control) to GPIO */ PACR1 &= ~0x3000; /* Set PA14 (backlight control) to GPIO */
or_b(0x40, &PAIORH); /* ..and output */ or_b(0x40, &PAIORH); /* ..and output */
#elif CONFIG_BACKLIGHT == BL_GMINI
P1CON |= 0x10; /* P1.4 C-MOS output mode */
#endif #endif
backlight_on(); backlight_on();
} }

View file

@ -48,6 +48,8 @@
#define CONFIG_I2C I2C_GMINI #define CONFIG_I2C I2C_GMINI
#define CONFIG_BACKLIGHT BL_GMINI
#define GMINI_ARCH #define GMINI_ARCH
#endif #endif

View file

@ -61,6 +61,7 @@
#define BL_RTC 1 /* Recorder, RTC square wave output */ #define BL_RTC 1 /* Recorder, RTC square wave output */
#define BL_PA14_HI 2 /* Ondio, PA14 high active */ #define BL_PA14_HI 2 /* Ondio, PA14 high active */
#define BL_IRIVER 3 /* IRiver GPIO */ #define BL_IRIVER 3 /* IRiver GPIO */
#define BL_GMINI 4 /* Archos GMini */
/* CONFIG_I2C */ /* CONFIG_I2C */
#define I2C_PLAYREC 0 /* Archos Player/Recorder style */ #define I2C_PLAYREC 0 /* Archos Player/Recorder style */