summaryrefslogtreecommitdiffstats
path: root/firmware
diff options
context:
space:
mode:
authorRafaël Carré <rafael.carre@gmail.com>2009-07-06 16:44:57 +0000
committerRafaël Carré <rafael.carre@gmail.com>2009-07-06 16:44:57 +0000
commit03fe562a95a2b4fe4b3e316d3877140c3b4c822f (patch)
treebb27e1bd4c6f64f3526d112e9f7b5659204a27cd /firmware
parentcabd45086a206301302f99eaf80e381498a6e3fc (diff)
downloadrockbox-03fe562a95a2b4fe4b3e316d3877140c3b4c822f.tar.gz
rockbox-03fe562a95a2b4fe4b3e316d3877140c3b4c822f.tar.bz2
rockbox-03fe562a95a2b4fe4b3e316d3877140c3b4c822f.zip
Sansa AMS: display the virtual led icon on disk transfers
Sansa PP: directly use led() function, remove useless sd_led() Thanks to mc2739 (Michael Chicoine) git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21693 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware')
-rw-r--r--firmware/target/arm/as3525/ata_sd_as3525.c3
-rw-r--r--firmware/target/arm/ata-sd-pp.c15
2 files changed, 8 insertions, 10 deletions
diff --git a/firmware/target/arm/as3525/ata_sd_as3525.c b/firmware/target/arm/as3525/ata_sd_as3525.c
index 46f52abf94..96ad8fea76 100644
--- a/firmware/target/arm/as3525/ata_sd_as3525.c
+++ b/firmware/target/arm/as3525/ata_sd_as3525.c
@@ -27,6 +27,7 @@
#include "config.h" /* for HAVE_MULTIVOLUME & AMS_OF_SIZE */
#include "fat.h"
#include "thread.h"
+#include "led.h"
#include "hotswap.h"
#include "system.h"
#include "cpu.h"
@@ -619,6 +620,7 @@ static int sd_transfer_sectors(IF_MV2(int drive,) unsigned long start,
mutex_lock(&sd_mtx);
#ifndef BOOTLOADER
sd_enable(true);
+ led(true);
#endif
if (card_info[drive].initialized <= 0)
@@ -742,6 +744,7 @@ static int sd_transfer_sectors(IF_MV2(int drive,) unsigned long start,
dma_release();
#ifndef BOOTLOADER
+ led(false);
sd_enable(false);
#endif
mutex_unlock(&sd_mtx);
diff --git a/firmware/target/arm/ata-sd-pp.c b/firmware/target/arm/ata-sd-pp.c
index e1e85b8a92..1a76eeeba2 100644
--- a/firmware/target/arm/ata-sd-pp.c
+++ b/firmware/target/arm/ata-sd-pp.c
@@ -839,11 +839,6 @@ static void sd_select_device(int card_no)
/* API Functions */
-static void sd_led(bool onoff)
-{
- led(onoff);
-}
-
int sd_read_sectors(IF_MV2(int drive,) unsigned long start, int incount,
void* inbuf)
{
@@ -858,7 +853,7 @@ int sd_read_sectors(IF_MV2(int drive,) unsigned long start, int incount,
mutex_lock(&sd_mtx);
sd_enable(true);
- sd_led(true);
+ led(true);
sd_read_retry:
if (drive != 0 && !card_detect_target())
@@ -944,7 +939,7 @@ sd_read_retry:
while (1)
{
- sd_led(false);
+ led(false);
sd_enable(false);
mutex_unlock(&sd_mtx);
@@ -976,7 +971,7 @@ int sd_write_sectors(IF_MV2(int drive,) unsigned long start, int count,
mutex_lock(&sd_mtx);
sd_enable(true);
- sd_led(true);
+ led(true);
sd_write_retry:
if (drive != 0 && !card_detect_target())
@@ -1072,7 +1067,7 @@ sd_write_retry:
while (1)
{
- sd_led(false);
+ led(false);
sd_enable(false);
mutex_unlock(&sd_mtx);
@@ -1205,7 +1200,7 @@ int sd_init(void)
mutex_lock(&sd_mtx);
- sd_led(false);
+ led(false);
if (!initialized)
{