diff options
author | Rafaël Carré <rafael.carre@gmail.com> | 2009-07-06 16:44:57 +0000 |
---|---|---|
committer | Rafaël Carré <rafael.carre@gmail.com> | 2009-07-06 16:44:57 +0000 |
commit | 03fe562a95a2b4fe4b3e316d3877140c3b4c822f (patch) | |
tree | bb27e1bd4c6f64f3526d112e9f7b5659204a27cd /firmware | |
parent | cabd45086a206301302f99eaf80e381498a6e3fc (diff) | |
download | rockbox-03fe562a95a2b4fe4b3e316d3877140c3b4c822f.tar.gz 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.c | 3 | ||||
-rw-r--r-- | firmware/target/arm/ata-sd-pp.c | 15 |
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 @@ | |||
27 | #include "config.h" /* for HAVE_MULTIVOLUME & AMS_OF_SIZE */ | 27 | #include "config.h" /* for HAVE_MULTIVOLUME & AMS_OF_SIZE */ |
28 | #include "fat.h" | 28 | #include "fat.h" |
29 | #include "thread.h" | 29 | #include "thread.h" |
30 | #include "led.h" | ||
30 | #include "hotswap.h" | 31 | #include "hotswap.h" |
31 | #include "system.h" | 32 | #include "system.h" |
32 | #include "cpu.h" | 33 | #include "cpu.h" |
@@ -619,6 +620,7 @@ static int sd_transfer_sectors(IF_MV2(int drive,) unsigned long start, | |||
619 | mutex_lock(&sd_mtx); | 620 | mutex_lock(&sd_mtx); |
620 | #ifndef BOOTLOADER | 621 | #ifndef BOOTLOADER |
621 | sd_enable(true); | 622 | sd_enable(true); |
623 | led(true); | ||
622 | #endif | 624 | #endif |
623 | 625 | ||
624 | if (card_info[drive].initialized <= 0) | 626 | if (card_info[drive].initialized <= 0) |
@@ -742,6 +744,7 @@ static int sd_transfer_sectors(IF_MV2(int drive,) unsigned long start, | |||
742 | dma_release(); | 744 | dma_release(); |
743 | 745 | ||
744 | #ifndef BOOTLOADER | 746 | #ifndef BOOTLOADER |
747 | led(false); | ||
745 | sd_enable(false); | 748 | sd_enable(false); |
746 | #endif | 749 | #endif |
747 | mutex_unlock(&sd_mtx); | 750 | 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) | |||
839 | 839 | ||
840 | /* API Functions */ | 840 | /* API Functions */ |
841 | 841 | ||
842 | static void sd_led(bool onoff) | ||
843 | { | ||
844 | led(onoff); | ||
845 | } | ||
846 | |||
847 | int sd_read_sectors(IF_MV2(int drive,) unsigned long start, int incount, | 842 | int sd_read_sectors(IF_MV2(int drive,) unsigned long start, int incount, |
848 | void* inbuf) | 843 | void* inbuf) |
849 | { | 844 | { |
@@ -858,7 +853,7 @@ int sd_read_sectors(IF_MV2(int drive,) unsigned long start, int incount, | |||
858 | 853 | ||
859 | mutex_lock(&sd_mtx); | 854 | mutex_lock(&sd_mtx); |
860 | sd_enable(true); | 855 | sd_enable(true); |
861 | sd_led(true); | 856 | led(true); |
862 | 857 | ||
863 | sd_read_retry: | 858 | sd_read_retry: |
864 | if (drive != 0 && !card_detect_target()) | 859 | if (drive != 0 && !card_detect_target()) |
@@ -944,7 +939,7 @@ sd_read_retry: | |||
944 | 939 | ||
945 | while (1) | 940 | while (1) |
946 | { | 941 | { |
947 | sd_led(false); | 942 | led(false); |
948 | sd_enable(false); | 943 | sd_enable(false); |
949 | mutex_unlock(&sd_mtx); | 944 | mutex_unlock(&sd_mtx); |
950 | 945 | ||
@@ -976,7 +971,7 @@ int sd_write_sectors(IF_MV2(int drive,) unsigned long start, int count, | |||
976 | 971 | ||
977 | mutex_lock(&sd_mtx); | 972 | mutex_lock(&sd_mtx); |
978 | sd_enable(true); | 973 | sd_enable(true); |
979 | sd_led(true); | 974 | led(true); |
980 | 975 | ||
981 | sd_write_retry: | 976 | sd_write_retry: |
982 | if (drive != 0 && !card_detect_target()) | 977 | if (drive != 0 && !card_detect_target()) |
@@ -1072,7 +1067,7 @@ sd_write_retry: | |||
1072 | 1067 | ||
1073 | while (1) | 1068 | while (1) |
1074 | { | 1069 | { |
1075 | sd_led(false); | 1070 | led(false); |
1076 | sd_enable(false); | 1071 | sd_enable(false); |
1077 | mutex_unlock(&sd_mtx); | 1072 | mutex_unlock(&sd_mtx); |
1078 | 1073 | ||
@@ -1205,7 +1200,7 @@ int sd_init(void) | |||
1205 | 1200 | ||
1206 | mutex_lock(&sd_mtx); | 1201 | mutex_lock(&sd_mtx); |
1207 | 1202 | ||
1208 | sd_led(false); | 1203 | led(false); |
1209 | 1204 | ||
1210 | if (!initialized) | 1205 | if (!initialized) |
1211 | { | 1206 | { |