diff options
author | Thomas Jarosch <tomj@simonv.com> | 2011-03-01 20:31:20 +0000 |
---|---|---|
committer | Thomas Jarosch <tomj@simonv.com> | 2011-03-01 20:31:20 +0000 |
commit | acd8bffb9576432cb52c6c325da74192a30bae67 (patch) | |
tree | 0374b5422ae31493abd8060c18178b3b1aec2494 | |
parent | 0f68a91bc567083ff8956e5cd68536728888e696 (diff) | |
download | rockbox-acd8bffb9576432cb52c6c325da74192a30bae67.tar.gz 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
-rw-r--r-- | firmware/powermgmt.c | 5 | ||||
-rw-r--r-- | firmware/target/hosted/maemo/maemo-thread.c | 4 | ||||
-rw-r--r-- | firmware/target/hosted/sdl/system-sdl.c | 6 | ||||
-rw-r--r-- | uisimulator/common/powermgmt-sim.c | 4 |
4 files changed, 3 insertions, 16 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; | |||
76 | #endif | 76 | #endif |
77 | #endif /* CONFIG_CHARGING */ | 77 | #endif /* CONFIG_CHARGING */ |
78 | 78 | ||
79 | #if (CONFIG_PLATFORM & PLATFORM_NATIVE) | ||
80 | static int shutdown_timeout = 0; | 79 | static int shutdown_timeout = 0; |
80 | |||
81 | #if (CONFIG_PLATFORM & PLATFORM_NATIVE) | ||
81 | /* | 82 | /* |
82 | * Average battery voltage and charger voltage, filtered via a digital | 83 | * Average battery voltage and charger voltage, filtered via a digital |
83 | * exponential filter (aka. exponential moving average, scaled): | 84 | * exponential filter (aka. exponential moving average, scaled): |
@@ -755,6 +756,7 @@ void shutdown_hw(void) | |||
755 | sleep(HZ/4); | 756 | sleep(HZ/4); |
756 | power_off(); | 757 | power_off(); |
757 | } | 758 | } |
759 | #endif /* PLATFORM_NATIVE */ | ||
758 | 760 | ||
759 | void sys_poweroff(void) | 761 | void sys_poweroff(void) |
760 | { | 762 | { |
@@ -794,7 +796,6 @@ void cancel_shutdown(void) | |||
794 | 796 | ||
795 | shutdown_timeout = 0; | 797 | shutdown_timeout = 0; |
796 | } | 798 | } |
797 | #endif /* PLATFORM_NATIVE */ | ||
798 | 799 | ||
799 | /* Send system battery level update events on reaching certain significant | 800 | /* Send system battery level update events on reaching certain significant |
800 | levels. This must be called after battery_percent has been updated. */ | 801 | levels. This must be called after battery_percent has been updated. */ |
diff --git a/firmware/target/hosted/maemo/maemo-thread.c b/firmware/target/hosted/maemo/maemo-thread.c index a0e5824252..8300c8f0b6 100644 --- a/firmware/target/hosted/maemo/maemo-thread.c +++ b/firmware/target/hosted/maemo/maemo-thread.c | |||
@@ -210,7 +210,3 @@ void set_poweroff_timeout(int timeout) | |||
210 | void reset_poweroff_timer(void) | 210 | void reset_poweroff_timer(void) |
211 | { | 211 | { |
212 | } | 212 | } |
213 | |||
214 | void cancel_shutdown(void) | ||
215 | { | ||
216 | } | ||
diff --git a/firmware/target/hosted/sdl/system-sdl.c b/firmware/target/hosted/sdl/system-sdl.c index 0b487d0c2b..750a0144a4 100644 --- a/firmware/target/hosted/sdl/system-sdl.c +++ b/firmware/target/hosted/sdl/system-sdl.c | |||
@@ -71,12 +71,6 @@ bool debug_audio = false; | |||
71 | bool debug_wps = false; | 71 | bool debug_wps = false; |
72 | int wps_verbose_level = 3; | 72 | int wps_verbose_level = 3; |
73 | 73 | ||
74 | void sys_poweroff(void) | ||
75 | { | ||
76 | /* Post SYS_POWEROFF event. Will post SDL_USEREVENT in shutdown_hw() if successful. */ | ||
77 | queue_broadcast(SYS_POWEROFF, 0); | ||
78 | } | ||
79 | |||
80 | /* | 74 | /* |
81 | * This thread will read the buttons in an interrupt like fashion, and | 75 | * This thread will read the buttons in an interrupt like fashion, and |
82 | * also initializes SDL_INIT_VIDEO and the surfaces | 76 | * also initializes SDL_INIT_VIDEO and the surfaces |
diff --git a/uisimulator/common/powermgmt-sim.c b/uisimulator/common/powermgmt-sim.c index 12bb94fd5d..14054dca1d 100644 --- a/uisimulator/common/powermgmt-sim.c +++ b/uisimulator/common/powermgmt-sim.c | |||
@@ -152,7 +152,3 @@ void lineout_set(bool enable) | |||
152 | void reset_poweroff_timer(void) | 152 | void reset_poweroff_timer(void) |
153 | { | 153 | { |
154 | } | 154 | } |
155 | |||
156 | void cancel_shutdown(void) | ||
157 | { | ||
158 | } | ||