summaryrefslogtreecommitdiffstats
path: root/firmware/target/arm/tcc77x
diff options
context:
space:
mode:
authorMichael Sevakis <jethead71@rockbox.org>2008-12-03 19:54:25 +0000
committerMichael Sevakis <jethead71@rockbox.org>2008-12-03 19:54:25 +0000
commit58eb784a5d1f0ac800e656d5dfa3a1bff8fb2657 (patch)
tree084c7b7c5d374fbfef2f8cddb3673a3b2a26a7df /firmware/target/arm/tcc77x
parent0d0cc039f88ced4f6db5c4468b19913f52cd08c8 (diff)
downloadrockbox-58eb784a5d1f0ac800e656d5dfa3a1bff8fb2657.tar.gz
rockbox-58eb784a5d1f0ac800e656d5dfa3a1bff8fb2657.tar.bz2
rockbox-58eb784a5d1f0ac800e656d5dfa3a1bff8fb2657.zip
Straighten out some powermanagement stuff. Give target complete control over how power inputs are sensed. Clean SIMULATOR stuff out of target files. Get rid of USB charging option on targets that don't support it or don't implement it yet. Menu string remains to avoid language incompatibility but should be removed on next cleanup for targets not using it (notice in english.lang). global_settings becomes incompatible for some builds and so plugin API version is incremented.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19315 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/target/arm/tcc77x')
-rw-r--r--firmware/target/arm/tcc77x/c100/power-c100.c21
-rw-r--r--firmware/target/arm/tcc77x/iaudio7/power-iaudio7.c5
-rw-r--r--firmware/target/arm/tcc77x/logikdax/power-logikdax.c25
-rw-r--r--firmware/target/arm/tcc77x/m200/power-m200.c25
4 files changed, 3 insertions, 73 deletions
diff --git a/firmware/target/arm/tcc77x/c100/power-c100.c b/firmware/target/arm/tcc77x/c100/power-c100.c
index 77574ccc87..e84ff1c852 100644
--- a/firmware/target/arm/tcc77x/c100/power-c100.c
+++ b/firmware/target/arm/tcc77x/c100/power-c100.c
@@ -25,8 +25,6 @@
#include "system.h"
#include "power.h"
-#ifndef SIMULATOR
-
void power_init(void)
{
}
@@ -43,22 +41,3 @@ bool ide_powered(void)
void power_off(void)
{
}
-
-#else /* SIMULATOR */
-
-bool charger_inserted(void)
-{
- return false;
-}
-
-void charger_enable(bool on)
-{
- (void)on;
-}
-
-void ide_power_enable(bool on)
-{
- (void)on;
-}
-
-#endif /* SIMULATOR */
diff --git a/firmware/target/arm/tcc77x/iaudio7/power-iaudio7.c b/firmware/target/arm/tcc77x/iaudio7/power-iaudio7.c
index ce7175ef55..0501ba272c 100644
--- a/firmware/target/arm/tcc77x/iaudio7/power-iaudio7.c
+++ b/firmware/target/arm/tcc77x/iaudio7/power-iaudio7.c
@@ -141,7 +141,8 @@ bool tuner_power(bool status)
#endif /* CONFIG_TUNER */
-bool charger_inserted(void)
+unsigned int power_input_status(void)
{
- return (GPIOA & 0x1) ? true : false;
+ return (GPIOA & 0x1) ?
+ POWER_INPUT_MAIN_CHARGER : POWER_INPUT_NONE;
}
diff --git a/firmware/target/arm/tcc77x/logikdax/power-logikdax.c b/firmware/target/arm/tcc77x/logikdax/power-logikdax.c
index 82eb8dce02..e84ff1c852 100644
--- a/firmware/target/arm/tcc77x/logikdax/power-logikdax.c
+++ b/firmware/target/arm/tcc77x/logikdax/power-logikdax.c
@@ -25,8 +25,6 @@
#include "system.h"
#include "power.h"
-#ifndef SIMULATOR
-
void power_init(void)
{
}
@@ -43,26 +41,3 @@ bool ide_powered(void)
void power_off(void)
{
}
-
-#else /* SIMULATOR */
-
-bool charger_inserted(void)
-{
- return false;
-}
-
-void charger_enable(bool on)
-{
- (void)on;
-}
-
-void power_off(void)
-{
-}
-
-void ide_power_enable(bool on)
-{
- (void)on;
-}
-
-#endif /* SIMULATOR */
diff --git a/firmware/target/arm/tcc77x/m200/power-m200.c b/firmware/target/arm/tcc77x/m200/power-m200.c
index 82eb8dce02..e84ff1c852 100644
--- a/firmware/target/arm/tcc77x/m200/power-m200.c
+++ b/firmware/target/arm/tcc77x/m200/power-m200.c
@@ -25,8 +25,6 @@
#include "system.h"
#include "power.h"
-#ifndef SIMULATOR
-
void power_init(void)
{
}
@@ -43,26 +41,3 @@ bool ide_powered(void)
void power_off(void)
{
}
-
-#else /* SIMULATOR */
-
-bool charger_inserted(void)
-{
- return false;
-}
-
-void charger_enable(bool on)
-{
- (void)on;
-}
-
-void power_off(void)
-{
-}
-
-void ide_power_enable(bool on)
-{
- (void)on;
-}
-
-#endif /* SIMULATOR */