1
0
Fork 0
forked from len0rd/rockbox

Disabled charger detection and ide_power_enable() for Ondio; some cleanup

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@5270 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Jens Arnold 2004-10-13 23:21:57 +00:00
parent dd4ce34e00
commit 0fc34c773f

View file

@ -40,6 +40,7 @@ void power_init(void)
bool charger_inserted(void) bool charger_inserted(void)
{ {
#ifdef HAVE_CHARGING
#ifdef HAVE_CHARGE_CTRL #ifdef HAVE_CHARGE_CTRL
/* Recorder */ /* Recorder */
return adc_read(ADC_EXT_POWER) > 0x100; return adc_read(ADC_EXT_POWER) > 0x100;
@ -53,10 +54,15 @@ bool charger_inserted(void)
return (PADR & 1) == 0; return (PADR & 1) == 0;
#endif /* HAVE_FMADC */ #endif /* HAVE_FMADC */
#endif /* HAVE_CHARGE_CTRL */ #endif /* HAVE_CHARGE_CTRL */
#else
/* Ondio */
return false;
#endif /* HAVE_CHARGING */
} }
void charger_enable(bool on) void charger_enable(bool on)
{ {
(void)on;
#ifdef HAVE_CHARGE_CTRL #ifdef HAVE_CHARGE_CTRL
if(on) if(on)
{ {
@ -68,11 +74,10 @@ void charger_enable(bool on)
or_b(0x20, &PBDRL); or_b(0x20, &PBDRL);
charger_enabled = 0; charger_enabled = 0;
} }
#else
on = on;
#endif #endif
} }
#ifndef HAVE_MMC
void ide_power_enable(bool on) void ide_power_enable(bool on)
{ {
(void)on; (void)on;
@ -101,6 +106,7 @@ void ide_power_enable(bool on)
PACR2 &= 0xFBFF; /* GPIO for PA5 */ PACR2 &= 0xFBFF; /* GPIO for PA5 */
} }
} }
#endif /* !HAVE_MMC */
bool ide_powered(void) bool ide_powered(void)
@ -144,7 +150,7 @@ bool charger_inserted(void)
void charger_enable(bool on) void charger_enable(bool on)
{ {
on = on; (void)on;
} }
void power_off(void) void power_off(void)
@ -153,7 +159,7 @@ void power_off(void)
void ide_power_enable(bool on) void ide_power_enable(bool on)
{ {
on = on; (void)on;
} }
#endif /* SIMULATOR */ #endif /* SIMULATOR */