summaryrefslogtreecommitdiffstats
path: root/firmware/target/arm/imx31/gigabeat-s/power-imx31.c
diff options
context:
space:
mode:
authorNils Wallménius <nils@rockbox.org>2008-04-13 10:04:21 +0000
committerNils Wallménius <nils@rockbox.org>2008-04-13 10:04:21 +0000
commit8c5d552ebdadd00a3f1610110afb6eb4fa77071a (patch)
tree0af146dd372ea8110e89fe474ad9e419af762533 /firmware/target/arm/imx31/gigabeat-s/power-imx31.c
parentd715f79ed6f8aa113c529b8a1ac5d8d82b69670f (diff)
downloadrockbox-8c5d552ebdadd00a3f1610110afb6eb4fa77071a.tar.gz
rockbox-8c5d552ebdadd00a3f1610110afb6eb4fa77071a.tar.bz2
rockbox-8c5d552ebdadd00a3f1610110afb6eb4fa77071a.zip
Charger detection for Gigabeat S
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17093 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/target/arm/imx31/gigabeat-s/power-imx31.c')
-rw-r--r--firmware/target/arm/imx31/gigabeat-s/power-imx31.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/firmware/target/arm/imx31/gigabeat-s/power-imx31.c b/firmware/target/arm/imx31/gigabeat-s/power-imx31.c
index f57c55a70b..e51318d16f 100644
--- a/firmware/target/arm/imx31/gigabeat-s/power-imx31.c
+++ b/firmware/target/arm/imx31/gigabeat-s/power-imx31.c
@@ -26,13 +26,21 @@
#ifndef SIMULATOR
+static bool charger_detect = false;
+
void power_init(void)
{
}
+/* This is called from the mc13783 interrupt thread */
+void set_charger_inserted(bool inserted)
+{
+ charger_detect = inserted;
+}
+
bool charger_inserted(void)
{
- return false;
+ return charger_detect;
}
/* Returns true if the unit is charging the batteries. */