summaryrefslogtreecommitdiffstats
path: root/firmware
diff options
context:
space:
mode:
authorRafaël Carré <rafael.carre@gmail.com>2010-07-19 17:12:47 +0000
committerRafaël Carré <rafael.carre@gmail.com>2010-07-19 17:12:47 +0000
commitc57ba97246247111856e16fb48a419ff689064ad (patch)
tree8fd36affb4684b3e247da5983b3446a75e73c47e /firmware
parent08c600ca07503d6f4f34db9eae2ffbe0230c4fd7 (diff)
downloadrockbox-c57ba97246247111856e16fb48a419ff689064ad.tar.gz
rockbox-c57ba97246247111856e16fb48a419ff689064ad.tar.bz2
rockbox-c57ba97246247111856e16fb48a419ff689064ad.zip
newer Fuzev2 doesn't seem to use B5 for button light
playing from µSD now works to some degree database update or copy between the 2 drives lock up git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27496 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware')
-rw-r--r--firmware/target/arm/as3525/sansa-fuzev2/backlight-fuzev2.c18
-rw-r--r--firmware/target/arm/as3525/sd-as3525v2.c18
2 files changed, 25 insertions, 11 deletions
diff --git a/firmware/target/arm/as3525/sansa-fuzev2/backlight-fuzev2.c b/firmware/target/arm/as3525/sansa-fuzev2/backlight-fuzev2.c
index 29e145053c..6797903ba9 100644
--- a/firmware/target/arm/as3525/sansa-fuzev2/backlight-fuzev2.c
+++ b/firmware/target/arm/as3525/sansa-fuzev2/backlight-fuzev2.c
@@ -59,14 +59,20 @@ void _backlight_off(void)
void _buttonlight_on(void)
{
- GPIOB_DIR |= 1<<5;
- GPIOB_PIN(5) = (1<<5);
- buttonlight_is_on = 1;
+ if (fuzev2_variant == 0)
+ {
+ GPIOB_DIR |= 1<<5;
+ GPIOB_PIN(5) = (1<<5);
+ buttonlight_is_on = 1;
+ }
}
void _buttonlight_off(void)
{
- GPIOB_PIN(5) = 0;
- GPIOB_DIR &= ~(1<<5);
- buttonlight_is_on = 0;
+ if (fuzev2_variant == 0)
+ {
+ GPIOB_PIN(5) = 0;
+ GPIOB_DIR &= ~(1<<5);
+ buttonlight_is_on = 0;
+ }
}
diff --git a/firmware/target/arm/as3525/sd-as3525v2.c b/firmware/target/arm/as3525/sd-as3525v2.c
index 552d88d3bb..65308089b7 100644
--- a/firmware/target/arm/as3525/sd-as3525v2.c
+++ b/firmware/target/arm/as3525/sd-as3525v2.c
@@ -430,11 +430,14 @@ static bool send_cmd(const int drive, const int cmd, const int arg, const int fl
/*b31 */ | CMD_DONE_BIT;
#ifdef SANSA_FUZEV2
- extern int buttonlight_is_on;
- if(buttonlight_is_on)
- _buttonlight_on();
- else
- _buttonlight_off();
+ if (fuzev2_variant == 0)
+ {
+ extern int buttonlight_is_on;
+ if(buttonlight_is_on)
+ _buttonlight_on();
+ else
+ _buttonlight_off();
+ }
#endif
wakeup_wait(&command_completion_signal, TIMEOUT_BLOCK);
@@ -771,6 +774,11 @@ int sd_init(void)
wakeup_init(&transfer_completion_signal);
wakeup_init(&command_completion_signal);
+#ifdef SANSA_FUZEV2
+ if (fuzev2_variant == 1)
+ GPIOB_DIR |= 1 << 5;
+#endif
+
#ifdef HAVE_MULTIDRIVE
/* clear previous irq */
GPIOA_IC = EXT_SD_BITS;