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
This commit is contained in:
Rafaël Carré 2009-07-06 16:44:57 +00:00
parent cabd45086a
commit 03fe562a95
2 changed files with 8 additions and 10 deletions

View file

@ -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);

View file

@ -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)
{