diff options
-rw-r--r-- | firmware/export/config/sansafuzeplus.h | 3 | ||||
-rw-r--r-- | firmware/target/arm/imx233/sdmmc-imx233.c | 13 |
2 files changed, 16 insertions, 0 deletions
diff --git a/firmware/export/config/sansafuzeplus.h b/firmware/export/config/sansafuzeplus.h index 1364d75637..7c40600fc8 100644 --- a/firmware/export/config/sansafuzeplus.h +++ b/firmware/export/config/sansafuzeplus.h | |||
@@ -192,6 +192,9 @@ | |||
192 | /* Define this if you have adjustable CPU frequency */ | 192 | /* Define this if you have adjustable CPU frequency */ |
193 | //#define HAVE_ADJUSTABLE_CPU_FREQ | 193 | //#define HAVE_ADJUSTABLE_CPU_FREQ |
194 | 194 | ||
195 | /* Virtual LED (icon) */ | ||
196 | #define CONFIG_LED LED_VIRTUAL | ||
197 | |||
195 | #define BOOTFILE_EXT "sansa" | 198 | #define BOOTFILE_EXT "sansa" |
196 | #define BOOTFILE "rockbox." BOOTFILE_EXT | 199 | #define BOOTFILE "rockbox." BOOTFILE_EXT |
197 | #define BOOTDIR "/.rockbox" | 200 | #define BOOTDIR "/.rockbox" |
diff --git a/firmware/target/arm/imx233/sdmmc-imx233.c b/firmware/target/arm/imx233/sdmmc-imx233.c index e0966f784b..32d0013574 100644 --- a/firmware/target/arm/imx233/sdmmc-imx233.c +++ b/firmware/target/arm/imx233/sdmmc-imx233.c | |||
@@ -33,6 +33,7 @@ | |||
33 | #include "debug.h" | 33 | #include "debug.h" |
34 | #include "string.h" | 34 | #include "string.h" |
35 | #include "ata_idle_notify.h" | 35 | #include "ata_idle_notify.h" |
36 | #include "led.h" | ||
36 | 37 | ||
37 | /** NOTE For convenience, this drivers relies on the many similar commands | 38 | /** NOTE For convenience, this drivers relies on the many similar commands |
38 | * between SD and MMC. The following assumptions are made: | 39 | * between SD and MMC. The following assumptions are made: |
@@ -501,6 +502,13 @@ static int __xfer_sectors(int drive, unsigned long start, int count, void *buf, | |||
501 | return ret; | 502 | return ret; |
502 | } | 503 | } |
503 | 504 | ||
505 | static void do_led(int delta) | ||
506 | { | ||
507 | static int level = 0; | ||
508 | level += delta; | ||
509 | led(level > 0); | ||
510 | } | ||
511 | |||
504 | static int transfer_sectors(int drive, unsigned long start, int count, void *buf, bool read) | 512 | static int transfer_sectors(int drive, unsigned long start, int count, void *buf, bool read) |
505 | { | 513 | { |
506 | int ret = 0; | 514 | int ret = 0; |
@@ -511,6 +519,9 @@ static int transfer_sectors(int drive, unsigned long start, int count, void *buf | |||
511 | /* lock per-drive mutex */ | 519 | /* lock per-drive mutex */ |
512 | mutex_lock(&mutex[drive]); | 520 | mutex_lock(&mutex[drive]); |
513 | 521 | ||
522 | /* update led status */ | ||
523 | do_led(1); | ||
524 | |||
514 | /* for SD cards, init if necessary */ | 525 | /* for SD cards, init if necessary */ |
515 | #if CONFIG_STORAGE & STORAGE_SD | 526 | #if CONFIG_STORAGE & STORAGE_SD |
516 | if(SDMMC_MODE(drive) == SD_MODE && SDMMC_INFO(drive).initialized <= 0) | 527 | if(SDMMC_MODE(drive) == SD_MODE && SDMMC_INFO(drive).initialized <= 0) |
@@ -604,6 +615,8 @@ static int transfer_sectors(int drive, unsigned long start, int count, void *buf | |||
604 | if(!send_cmd(drive, SD_DESELECT_CARD, 0, MCI_NO_RESP, NULL)) | 615 | if(!send_cmd(drive, SD_DESELECT_CARD, 0, MCI_NO_RESP, NULL)) |
605 | ret = -23; | 616 | ret = -23; |
606 | Lend: | 617 | Lend: |
618 | /* update led status */ | ||
619 | do_led(-1); | ||
607 | /* release per-drive mutex */ | 620 | /* release per-drive mutex */ |
608 | mutex_unlock(&mutex[drive]); | 621 | mutex_unlock(&mutex[drive]); |
609 | return ret; | 622 | return ret; |