summaryrefslogtreecommitdiff
path: root/firmware/target/arm/sandisk
diff options
context:
space:
mode:
authorDaniel Ankers <dan@weirdo.org.uk>2006-12-10 22:58:59 +0000
committerDaniel Ankers <dan@weirdo.org.uk>2006-12-10 22:58:59 +0000
commita5852f6855fa90d2bd833c50de8bf20f472e06f3 (patch)
treeae0017f009327e4197e3faa569d6f2f21a23df3f /firmware/target/arm/sandisk
parentf98fd72fe7d1076cf7a7758a60541a65d5fda578 (diff)
Charger detection for Sansa
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11710 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/target/arm/sandisk')
-rw-r--r--firmware/target/arm/sandisk/sansa-e200/power-e200.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/firmware/target/arm/sandisk/sansa-e200/power-e200.c b/firmware/target/arm/sandisk/sansa-e200/power-e200.c
index f1ce7e27e6..b9022974d1 100644
--- a/firmware/target/arm/sandisk/sansa-e200/power-e200.c
+++ b/firmware/target/arm/sandisk/sansa-e200/power-e200.c
@@ -17,6 +17,9 @@
*
****************************************************************************/
+#include <stdbool.h>
+#include "cpu.h"
+
void power_init(void)
{
}
@@ -24,3 +27,10 @@ void power_init(void)
void power_off(void)
{
}
+
+bool charger_inserted(void)
+{
+ if(GPIOB_INPUT_VAL & 0x10)
+ return true;
+ return false;
+}