diff options
author | Jean-Philippe Bernardy <jeanphilippe.bernardy@gmail.com> | 2005-02-05 10:53:41 +0000 |
---|---|---|
committer | Jean-Philippe Bernardy <jeanphilippe.bernardy@gmail.com> | 2005-02-05 10:53:41 +0000 |
commit | 5f91f4acfffd20a344407eeb9578fb64d13c591a (patch) | |
tree | b8bbbc21b28ec3e3c8b43fd5b920595e8914d8ed /firmware | |
parent | 0b033a74d71741fc9a2aa262829a1247719f5d03 (diff) | |
download | rockbox-5f91f4acfffd20a344407eeb9578fb64d13c591a.tar.gz rockbox-5f91f4acfffd20a344407eeb9578fb64d13c591a.zip |
backlight driver for Gmini
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@5795 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware')
-rw-r--r-- | firmware/backlight.c | 6 | ||||
-rw-r--r-- | firmware/export/config-gmini120.h | 2 | ||||
-rw-r--r-- | firmware/export/config.h | 1 |
3 files changed, 9 insertions, 0 deletions
diff --git a/firmware/backlight.c b/firmware/backlight.c index de3ebe3e05..fd1e96a942 100644 --- a/firmware/backlight.c +++ b/firmware/backlight.c | |||
@@ -60,6 +60,8 @@ static void __backlight_off(void) | |||
60 | and_b(~0x40, &PAIORH); /* let it float (up) */ | 60 | and_b(~0x40, &PAIORH); /* let it float (up) */ |
61 | #elif CONFIG_BACKLIGHT == BL_PA14_HI /* Ondio */ | 61 | #elif CONFIG_BACKLIGHT == BL_PA14_HI /* Ondio */ |
62 | and_b(~0x40, &PADRH); /* drive it low */ | 62 | and_b(~0x40, &PADRH); /* drive it low */ |
63 | #elif CONFIG_BACKLIGHT == BL_GMINI | ||
64 | P1 &= ~0x10; | ||
63 | #endif | 65 | #endif |
64 | } | 66 | } |
65 | 67 | ||
@@ -75,6 +77,8 @@ static void __backlight_on(void) | |||
75 | or_b(0x40, &PAIORH); | 77 | or_b(0x40, &PAIORH); |
76 | #elif CONFIG_BACKLIGHT == BL_PA14_HI /* Ondio */ | 78 | #elif CONFIG_BACKLIGHT == BL_PA14_HI /* Ondio */ |
77 | or_b(0x40, &PADRH); /* drive it high */ | 79 | or_b(0x40, &PADRH); /* drive it high */ |
80 | #elif CONFIG_BACKLIGHT == BL_GMINI | ||
81 | P1 |= 0x10; | ||
78 | #endif | 82 | #endif |
79 | } | 83 | } |
80 | 84 | ||
@@ -193,6 +197,8 @@ void backlight_init(void) | |||
193 | #elif CONFIG_BACKLIGHT == BL_PA14_LO || CONFIG_BACKLIGHT == BL_PA14_HI | 197 | #elif CONFIG_BACKLIGHT == BL_PA14_LO || CONFIG_BACKLIGHT == BL_PA14_HI |
194 | PACR1 &= ~0x3000; /* Set PA14 (backlight control) to GPIO */ | 198 | PACR1 &= ~0x3000; /* Set PA14 (backlight control) to GPIO */ |
195 | or_b(0x40, &PAIORH); /* ..and output */ | 199 | or_b(0x40, &PAIORH); /* ..and output */ |
200 | #elif CONFIG_BACKLIGHT == BL_GMINI | ||
201 | P1CON |= 0x10; /* P1.4 C-MOS output mode */ | ||
196 | #endif | 202 | #endif |
197 | backlight_on(); | 203 | backlight_on(); |
198 | } | 204 | } |
diff --git a/firmware/export/config-gmini120.h b/firmware/export/config-gmini120.h index e125c285de..e105d77d21 100644 --- a/firmware/export/config-gmini120.h +++ b/firmware/export/config-gmini120.h | |||
@@ -48,6 +48,8 @@ | |||
48 | 48 | ||
49 | #define CONFIG_I2C I2C_GMINI | 49 | #define CONFIG_I2C I2C_GMINI |
50 | 50 | ||
51 | #define CONFIG_BACKLIGHT BL_GMINI | ||
52 | |||
51 | #define GMINI_ARCH | 53 | #define GMINI_ARCH |
52 | 54 | ||
53 | #endif | 55 | #endif |
diff --git a/firmware/export/config.h b/firmware/export/config.h index 5528f93d09..da44e8eaf1 100644 --- a/firmware/export/config.h +++ b/firmware/export/config.h | |||
@@ -61,6 +61,7 @@ | |||
61 | #define BL_RTC 1 /* Recorder, RTC square wave output */ | 61 | #define BL_RTC 1 /* Recorder, RTC square wave output */ |
62 | #define BL_PA14_HI 2 /* Ondio, PA14 high active */ | 62 | #define BL_PA14_HI 2 /* Ondio, PA14 high active */ |
63 | #define BL_IRIVER 3 /* IRiver GPIO */ | 63 | #define BL_IRIVER 3 /* IRiver GPIO */ |
64 | #define BL_GMINI 4 /* Archos GMini */ | ||
64 | 65 | ||
65 | /* CONFIG_I2C */ | 66 | /* CONFIG_I2C */ |
66 | #define I2C_PLAYREC 0 /* Archos Player/Recorder style */ | 67 | #define I2C_PLAYREC 0 /* Archos Player/Recorder style */ |