From 3e743ec6c9685ef3b7d9729e2b21236bf66bed93 Mon Sep 17 00:00:00 2001 From: Mark Arigo Date: Tue, 13 May 2008 02:50:31 +0000 Subject: Preparing for the Philips SA9200 part 2. Since the SA9200 doesn't have a microsd card (no hotswap), use HAVE_ATA_SD for the Sansa flash driver so we don't rely on HAVE_HOTSWAP in some places. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17488 a1c6a512-1295-4272-9138-f99709370657 --- firmware/target/arm/ata-sd-pp.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'firmware/target/arm/ata-sd-pp.c') diff --git a/firmware/target/arm/ata-sd-pp.c b/firmware/target/arm/ata-sd-pp.c index 8c7ebcddc7..e4ab922f24 100644 --- a/firmware/target/arm/ata-sd-pp.c +++ b/firmware/target/arm/ata-sd-pp.c @@ -18,9 +18,7 @@ ****************************************************************************/ #include "fat.h" #include "hotswap.h" -#ifdef BOOTLOADER #include "ata-sd-target.h" -#endif #include "ata_idle_notify.h" #include "system.h" #include @@ -1278,16 +1276,20 @@ tCardInfo *card_get_info_target(int card_no) return &card; } -#ifdef HAVE_HOTSWAP bool card_detect_target(void) { +#ifdef HAVE_HOTSWAP #ifdef SANSA_E200 return (GPIOA_INPUT_VAL & 0x80) == 0; /* low active */ #elif defined SANSA_C200 return (GPIOL_INPUT_VAL & 0x08) != 0; /* high active */ #endif +#else + return false; +#endif } +#ifdef HAVE_HOTSWAP static bool sd1_oneshot_callback(struct timeout *tmo) { (void)tmo; -- cgit v1.2.3