From 059fff29ec662ffa0b2c2e5ebc91d574007b81a8 Mon Sep 17 00:00:00 2001 From: Frank Gevaerts Date: Tue, 4 Nov 2008 19:57:36 +0000 Subject: [PATCH] Since *set_led_enabled() is actually an ata-specific feature, move it back to ata_* only git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19006 a1c6a512-1295-4272-9138-f99709370657 --- apps/recorder/recording.c | 14 ++++++++++---- firmware/export/mmc.h | 4 ---- firmware/export/nand.h | 4 ---- firmware/export/ramdisk.h | 4 ---- firmware/export/sd.h | 4 ---- firmware/export/storage.h | 18 ------------------ 6 files changed, 10 insertions(+), 38 deletions(-) diff --git a/apps/recorder/recording.c b/apps/recorder/recording.c index 5a2aa096db..b2c81cd21b 100644 --- a/apps/recorder/recording.c +++ b/apps/recorder/recording.c @@ -66,6 +66,10 @@ #include "talk.h" #include "sound.h" #include "storage.h" +#if (CONFIG_STORAGE & STORAGE_ATA) && (CONFIG_LED == LED_REAL) \ + && !defined(SIMULATOR) +#include "ata.h" +#endif #include "splash.h" #include "screen_access.h" #include "action.h" @@ -1033,8 +1037,9 @@ bool recording_screen(bool no_source) struct audio_recording_options rec_options; rec_status = RCSTAT_IN_RECSCREEN; -#if (CONFIG_LED == LED_REAL) && !defined(SIMULATOR) - storage_set_led_enabled(false); +#if (CONFIG_STORAGE & STORAGE_ATA) && (CONFIG_LED == LED_REAL) \ + && !defined(SIMULATOR) + ata_set_led_enabled(false); #endif #if CONFIG_CODEC == SWCODEC @@ -1904,8 +1909,9 @@ rec_abort: if (rec_status & (RCSTAT_CREATED_DIRECTORY | RCSTAT_HAVE_RECORDED)) reload_directory(); -#if (CONFIG_LED == LED_REAL) && !defined(SIMULATOR) - storage_set_led_enabled(true); +#if (CONFIG_STORAGE & STORAGE_ATA) && (CONFIG_LED == LED_REAL) \ + && !defined(SIMULATOR) + ata_set_led_enabled(true); #endif #if CONFIG_TUNER diff --git a/firmware/export/mmc.h b/firmware/export/mmc.h index 0d99fac0ca..06d99d219e 100644 --- a/firmware/export/mmc.h +++ b/firmware/export/mmc.h @@ -40,10 +40,6 @@ int mmc_write_sectors(IF_MV2(int drive,) unsigned long start, int count, const v void mmc_spin(void); int mmc_spinup_time(void); -#if (CONFIG_LED == LED_REAL) -void mmc_set_led_enabled(bool enabled); -#endif - #ifdef STORAGE_GET_INFO void mmc_get_info(IF_MV2(int drive,) struct storage_info *info); #endif diff --git a/firmware/export/nand.h b/firmware/export/nand.h index 1757a1421a..a5b0a1ceee 100644 --- a/firmware/export/nand.h +++ b/firmware/export/nand.h @@ -38,10 +38,6 @@ int nand_read_sectors(IF_MV2(int drive,) unsigned long start, int count, void* b int nand_write_sectors(IF_MV2(int drive,) unsigned long start, int count, const void* buf); void nand_spin(void); -#if (CONFIG_LED == LED_REAL) -void nand_set_led_enabled(bool enabled); -#endif - #ifdef STORAGE_GET_INFO void nand_get_info(IF_MV2(int drive,) struct storage_info *info); #endif diff --git a/firmware/export/ramdisk.h b/firmware/export/ramdisk.h index 5fb78ed386..a0c011fadd 100644 --- a/firmware/export/ramdisk.h +++ b/firmware/export/ramdisk.h @@ -39,10 +39,6 @@ int ramdisk_write_sectors(IF_MV2(int drive,) unsigned long start, int count, con void ramdisk_spin(void); void ramdisk_sleepnow(void); -#if (CONFIG_LED == LED_REAL) -void ramdisk_set_led_enabled(bool enabled); -#endif - #ifdef STORAGE_GET_INFO void ramdisk_get_info(IF_MV2(int drive,) struct storage_info *info); #endif diff --git a/firmware/export/sd.h b/firmware/export/sd.h index 8f1c8fe413..11923fdc92 100644 --- a/firmware/export/sd.h +++ b/firmware/export/sd.h @@ -38,10 +38,6 @@ int sd_read_sectors(IF_MV2(int drive,) unsigned long start, int count, void* buf int sd_write_sectors(IF_MV2(int drive,) unsigned long start, int count, const void* buf); void sd_spin(void); -#if (CONFIG_LED == LED_REAL) -void sd_set_led_enabled(bool enabled); -#endif - #ifdef STORAGE_GET_INFO void sd_get_info(IF_MV2(int drive,) struct storage_info *info); #endif diff --git a/firmware/export/storage.h b/firmware/export/storage.h index 14cd481f74..47d8abda52 100644 --- a/firmware/export/storage.h +++ b/firmware/export/storage.h @@ -73,9 +73,6 @@ struct storage_info #define storage_spinup_time() ata_spinup_time() #define storage_get_identify() ata_get_identify() - #if (CONFIG_LED == LED_REAL) - #define storage_set_led_enabled(enabled) ata_set_led_enabled(enabled) - #endif #ifdef STORAGE_GET_INFO #define storage_get_info(drive, info) ata_get_info(IF_MV2(drive,) info) #endif @@ -100,9 +97,6 @@ struct storage_info #define storage_spinup_time() 0 #define storage_get_identify() sd_get_identify() - #if (CONFIG_LED == LED_REAL) - #define storage_set_led_enabled(enabled) sd_set_led_enabled(enabled) - #endif #ifdef STORAGE_GET_INFO #define storage_get_info(drive, info) sd_get_info(IF_MV2(drive,) info) #endif @@ -127,9 +121,6 @@ struct storage_info #define storage_spinup_time() 0 #define storage_get_identify() mmc_get_identify() - #if (CONFIG_LED == LED_REAL) - #define storage_set_led_enabled(enabled) mmc_set_led_enabled(enabled) - #endif #ifdef STORAGE_GET_INFO #define storage_get_info(drive, info) mmc_get_info(IF_MV2(drive,) info) #endif @@ -154,9 +145,6 @@ struct storage_info #define storage_spinup_time() 0 #define storage_get_identify() nand_get_identify() - #if (CONFIG_LED == LED_REAL) - #define storage_set_led_enabled(enabled) nand_set_led_enabled(enabled) - #endif #ifdef STORAGE_GET_INFO #define storage_get_info(drive, info) nand_get_info(IF_MV2(drive,) info) #endif @@ -181,9 +169,6 @@ struct storage_info #define storage_spinup_time() 0 #define storage_get_identify() ramdisk_get_identify() - #if (CONFIG_LED == LED_REAL) - #define storage_set_led_enabled(enabled) ramdisk_set_led_enabled(enabled) - #endif #ifdef STORAGE_GET_INFO #define storage_get_info(drive, info) ramdisk_get_info(IF_MV2(drive,) info) #endif @@ -212,9 +197,6 @@ int storage_read_sectors(int drive, unsigned long start, int count, void* buf); int storage_write_sectors(int drive, unsigned long start, int count, const void* buf); void storage_spin(void); void storage_spindown(int seconds); -#if (CONFIG_LED == LED_REAL) -void storage_set_led_enabled(bool enabled); -#endif long storage_last_disk_activity(void); int storage_spinup_time(void); #ifdef STORAGE_GET_INFO