From e2ec2fe39141e3a9d3602221c5e36eb8e07db7da Mon Sep 17 00:00:00 2001 From: Rafaël Carré Date: Thu, 18 Jun 2009 22:45:30 +0000 Subject: Apply FS#10306 to Sansa c200v2 (fix build in the same time) git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21341 a1c6a512-1295-4272-9138-f99709370657 --- firmware/target/arm/as3525/sansa-c200v2/backlight-c200v2.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'firmware/target/arm/as3525/sansa-c200v2/backlight-c200v2.c') diff --git a/firmware/target/arm/as3525/sansa-c200v2/backlight-c200v2.c b/firmware/target/arm/as3525/sansa-c200v2/backlight-c200v2.c index 858e9aed49..0fd5c36771 100644 --- a/firmware/target/arm/as3525/sansa-c200v2/backlight-c200v2.c +++ b/firmware/target/arm/as3525/sansa-c200v2/backlight-c200v2.c @@ -26,6 +26,8 @@ #include "ascodec-target.h" #include "as3514.h" +int buttonlight_is_on = 0; + bool _backlight_init(void) { GPIOA_DIR |= 1<<5; @@ -58,12 +60,20 @@ void _backlight_off(void) void _buttonlight_on(void) { + /* Needed for buttonlight and MicroSD to work at the same time */ + /* Turn ROD control on, as the OF does */ GPIOD_DIR |= (1<<7); + SD_MCI_POWER |= (1<<7); GPIOD_PIN(7) = (1<<7); + buttonlight_is_on = 1; } void _buttonlight_off(void) { - GPIOD_DIR |= (1<<7); + /* Needed for buttonlight and MicroSD to work at the same time */ + /* Turn ROD control off, as the OF does */ + SD_MCI_POWER &= ~(1<<7); GPIOD_PIN(7) = 0; + GPIOD_DIR &= ~(1<<7); + buttonlight_is_on = 0; } -- cgit v1.2.3