summaryrefslogtreecommitdiffstats
path: root/firmware/powermgmt.c
diff options
context:
space:
mode:
authorThomas Jarosch <tomj@simonv.com>2011-03-01 20:31:20 +0000
committerThomas Jarosch <tomj@simonv.com>2011-03-01 20:31:20 +0000
commitacd8bffb9576432cb52c6c325da74192a30bae67 (patch)
tree0374b5422ae31493abd8060c18178b3b1aec2494 /firmware/powermgmt.c
parent0f68a91bc567083ff8956e5cd68536728888e696 (diff)
downloadrockbox-acd8bffb9576432cb52c6c325da74192a30bae67.tar.gz
rockbox-acd8bffb9576432cb52c6c325da74192a30bae67.tar.bz2
rockbox-acd8bffb9576432cb52c6c325da74192a30bae67.zip
Expose sys_poweroff() and cancel_shutdown() to RaaA. Hopefully fixes android build
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29485 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/powermgmt.c')
-rw-r--r--firmware/powermgmt.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/firmware/powermgmt.c b/firmware/powermgmt.c
index 615b96deae..c856e1be70 100644
--- a/firmware/powermgmt.c
+++ b/firmware/powermgmt.c
@@ -76,8 +76,9 @@ enum charge_state_type charge_state = DISCHARGING;
#endif
#endif /* CONFIG_CHARGING */
-#if (CONFIG_PLATFORM & PLATFORM_NATIVE)
static int shutdown_timeout = 0;
+
+#if (CONFIG_PLATFORM & PLATFORM_NATIVE)
/*
* Average battery voltage and charger voltage, filtered via a digital
* exponential filter (aka. exponential moving average, scaled):
@@ -755,6 +756,7 @@ void shutdown_hw(void)
sleep(HZ/4);
power_off();
}
+#endif /* PLATFORM_NATIVE */
void sys_poweroff(void)
{
@@ -794,7 +796,6 @@ void cancel_shutdown(void)
shutdown_timeout = 0;
}
-#endif /* PLATFORM_NATIVE */
/* Send system battery level update events on reaching certain significant
levels. This must be called after battery_percent has been updated. */