diff options
author | Bertrik Sikken <bertrik@sikken.nl> | 2011-04-01 21:29:08 +0000 |
---|---|---|
committer | Bertrik Sikken <bertrik@sikken.nl> | 2011-04-01 21:29:08 +0000 |
commit | eab630a1e1463be244118613537f6a04d290f5e0 (patch) | |
tree | 7aff5d533a3b8ab4cf77c335e7695c801e4f1fd5 /firmware/target/arm/as3525/sansa-fuzev2/backlight-fuzev2.c | |
parent | a7354e7925e65c203b83a60c3b651f8b93cb9cab (diff) | |
download | rockbox-eab630a1e1463be244118613537f6a04d290f5e0.tar.gz rockbox-eab630a1e1463be244118613537f6a04d290f5e0.zip |
AMSv2: fix dependency between button light and sd card control for fuze v2 variant 0
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29667 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/target/arm/as3525/sansa-fuzev2/backlight-fuzev2.c')
-rw-r--r-- | firmware/target/arm/as3525/sansa-fuzev2/backlight-fuzev2.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/firmware/target/arm/as3525/sansa-fuzev2/backlight-fuzev2.c b/firmware/target/arm/as3525/sansa-fuzev2/backlight-fuzev2.c index 617f7095f4..68c626d829 100644 --- a/firmware/target/arm/as3525/sansa-fuzev2/backlight-fuzev2.c +++ b/firmware/target/arm/as3525/sansa-fuzev2/backlight-fuzev2.c | |||
@@ -26,8 +26,6 @@ | |||
26 | #include "ascodec-target.h" | 26 | #include "ascodec-target.h" |
27 | #include "as3514.h" | 27 | #include "as3514.h" |
28 | 28 | ||
29 | int buttonlight_is_on = 0; | ||
30 | |||
31 | void _backlight_set_brightness(int brightness) | 29 | void _backlight_set_brightness(int brightness) |
32 | { | 30 | { |
33 | ascodec_write_pmu(AS3543_BACKLIGHT, 2, brightness * 10); | 31 | ascodec_write_pmu(AS3543_BACKLIGHT, 2, brightness * 10); |
@@ -39,8 +37,14 @@ bool _backlight_init(void) | |||
39 | ascodec_write_pmu(AS3543_BACKLIGHT, 2, backlight_brightness * 10); | 37 | ascodec_write_pmu(AS3543_BACKLIGHT, 2, backlight_brightness * 10); |
40 | 38 | ||
41 | /* needed for button light */ | 39 | /* needed for button light */ |
42 | if (amsv2_variant == 1) | 40 | if (amsv2_variant == 0) |
41 | { | ||
42 | GPIOB_DIR |= 1<<5; | ||
43 | } | ||
44 | else | ||
45 | { | ||
43 | ascodec_write_pmu(0x1a, 1, 0x30); /* MUX_PWGD = PWM */ | 46 | ascodec_write_pmu(0x1a, 1, 0x30); /* MUX_PWGD = PWM */ |
47 | } | ||
44 | 48 | ||
45 | return true; | 49 | return true; |
46 | } | 50 | } |
@@ -65,9 +69,7 @@ void _buttonlight_on(void) | |||
65 | { | 69 | { |
66 | if (amsv2_variant == 0) | 70 | if (amsv2_variant == 0) |
67 | { | 71 | { |
68 | GPIOB_DIR |= 1<<5; | ||
69 | GPIOB_PIN(5) = (1<<5); | 72 | GPIOB_PIN(5) = (1<<5); |
70 | buttonlight_is_on = 1; | ||
71 | } | 73 | } |
72 | else | 74 | else |
73 | { | 75 | { |
@@ -80,8 +82,6 @@ void _buttonlight_off(void) | |||
80 | if (amsv2_variant == 0) | 82 | if (amsv2_variant == 0) |
81 | { | 83 | { |
82 | GPIOB_PIN(5) = 0; | 84 | GPIOB_PIN(5) = 0; |
83 | GPIOB_DIR &= ~(1<<5); | ||
84 | buttonlight_is_on = 0; | ||
85 | } | 85 | } |
86 | else | 86 | else |
87 | { | 87 | { |