From 05f12e08772d1ca03101b176e329bfd313daf673 Mon Sep 17 00:00:00 2001 From: Thomas Martitz Date: Sat, 31 Dec 2011 13:34:56 +0000 Subject: ypr0: Enable battery voltage read-out, charging monitoring and charger detection. Voltage can be read using as3543 adc (i.e. ascodec api, on this target implemented via ioctl()). TODO: Look into possibly controlling charging more by re-using powermgmt-ascodec.c. However, charging seems to be controlled by the kernel, so may not be needed. Charger state can be read using /dev/minivet. It allows to differentiate between wall charger and usb charging, but that's not implemented (is it even worthwhile?) git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31470 a1c6a512-1295-4272-9138-f99709370657 --- firmware/target/hosted/ypr0/system-ypr0.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) (limited to 'firmware/target/hosted/ypr0/system-ypr0.c') diff --git a/firmware/target/hosted/ypr0/system-ypr0.c b/firmware/target/hosted/ypr0/system-ypr0.c index 3a2b30339f..bf3b1cd4c9 100644 --- a/firmware/target/hosted/ypr0/system-ypr0.c +++ b/firmware/target/hosted/ypr0/system-ypr0.c @@ -32,16 +32,11 @@ #include "ascodec-target.h" -void sim_do_exit(void) -{ - exit(EXIT_SUCCESS); -} - -void shutdown_hw(void) +void power_off(void) { /* Something that we need to do before exit on our platform YPR0 */ ascodec_close(); - sim_do_exit(); + exit(EXIT_SUCCESS); } uintptr_t *stackbegin; @@ -62,7 +57,7 @@ void system_init(void) void system_reboot(void) { - sim_do_exit(); + power_off(); } void system_exception_wait(void) -- cgit v1.2.3