summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJens Arnold <amiconn@rockbox.org>2005-05-08 12:56:48 +0000
committerJens Arnold <amiconn@rockbox.org>2005-05-08 12:56:48 +0000
commit2629071b253838c27f8f034aa7d1bead34ff8046 (patch)
tree07021bc963192d29825d7d5cf043c7dd792f83d7
parentd89b75bbc04b0ff39f6cae526655a0a3310afb55 (diff)
downloadrockbox-2629071b253838c27f8f034aa7d1bead34ff8046.tar.gz
rockbox-2629071b253838c27f8f034aa7d1bead34ff8046.zip
More dead code...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@6428 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r--firmware/backlight.c3
-rw-r--r--firmware/drivers/power.c25
2 files changed, 14 insertions, 14 deletions
diff --git a/firmware/backlight.c b/firmware/backlight.c
index ad9c8ca677..e430583d2d 100644
--- a/firmware/backlight.c
+++ b/firmware/backlight.c
@@ -197,10 +197,12 @@ void backlight_set_timeout(int index)
backlight_on();
}
+#ifdef HAVE_CHARGE_CTRL
bool backlight_get_on_when_charging(void)
{
return backlight_on_when_charging;
}
+#endif
void backlight_set_on_when_charging(bool yesno)
{
@@ -267,7 +269,6 @@ void backlight_off(void) {}
void backlight_tick(void) {}
int backlight_get_timeout(void) {return 0;}
void backlight_set_timeout(int index) {(void)index;}
-bool backlight_get_on_when_charging(void) {return 0;}
void backlight_set_on_when_charging(bool yesno) {(void)yesno;}
#ifdef HAVE_REMOTE_LCD
void remote_backlight_on(void) {}
diff --git a/firmware/drivers/power.c b/firmware/drivers/power.c
index 2d6c1c815c..66e479e1ce 100644
--- a/firmware/drivers/power.c
+++ b/firmware/drivers/power.c
@@ -120,11 +120,10 @@ bool charger_inserted(void)
#endif
}
+#ifdef HAVE_CHARGE_CTRL
void charger_enable(bool on)
{
- (void)on;
-#ifdef HAVE_CHARGE_CTRL
- if(on)
+ if(on)
{
and_b(~0x20, &PBDRL);
charger_enabled = 1;
@@ -134,8 +133,8 @@ void charger_enable(bool on)
or_b(0x20, &PBDRL);
charger_enabled = 0;
}
-#endif
}
+#endif
#ifdef HAVE_SPDIF_POWER
void spdif_power_enable(bool on)
@@ -165,7 +164,7 @@ void ide_power_enable(bool on)
P1 |= 0x08;
else
P1 &= ~0x08;
-#else
+#else /* SH1 based archos */
bool touched = false;
#ifdef NEEDS_ATA_POWER_ON
if(on)
@@ -177,7 +176,7 @@ void ide_power_enable(bool on)
#endif
touched = true;
}
-#endif
+#endif /* NEEDS_ATA_POWER_ON */
#ifdef HAVE_ATA_POWER_OFF
if(!on)
{
@@ -188,7 +187,7 @@ void ide_power_enable(bool on)
#endif
touched = true;
}
-#endif
+#endif /* HAVE_ATA_POWER_OFF */
/* late port preparation, else problems with read/modify/write
of other bits on same port, while input and floating high */
@@ -202,9 +201,8 @@ void ide_power_enable(bool on)
PACR2 &= 0xFBFF; /* GPIO for PA5 */
#endif
}
-#endif
+#endif /* SH1 based archos */
}
-#endif /* !HAVE_MMC */
bool ide_powered(void)
@@ -213,7 +211,7 @@ bool ide_powered(void)
return (GPIO_OUT & 0x80000000)?false:true;
#elif defined(GMINI_ARCH)
return (P1 & 0x08?true:false);
-#else
+#else /* SH1 based archos */
#if defined(NEEDS_ATA_POWER_ON) || defined(HAVE_ATA_POWER_OFF)
#ifdef ATA_POWER_PLAYERSTYLE
/* This is not correct for very old players, since these are unable to
@@ -223,17 +221,18 @@ bool ide_powered(void)
return false; /* would be floating low, disk off */
else
return (PBDRL & 0x10) != 0;
-#else
+#else /* !ATA_POWER_PLAYERSTYLE */
if ((PACR2 & 0x0400) || !(PAIORL & 0x20)) /* not configured for output */
return true; /* would be floating high, disk on */
else
return (PADRL & 0x20) != 0;
-#endif /* ATA_POWER_PLAYERSTYLE */
-#else
+#endif /* !ATA_POWER_PLAYERSTYLE */
+#else /* !defined(NEEDS_ATA_POWER_ON) && !defined(HAVE_ATA_POWER_OFF) */
return true; /* pretend always powered if not controlable */
#endif
#endif
}
+#endif /* !HAVE_MMC */
void power_off(void)