summaryrefslogtreecommitdiffstats
path: root/firmware/target/arm/ipod
diff options
context:
space:
mode:
authorFrank Gevaerts <frank@gevaerts.be>2011-07-19 20:48:16 +0000
committerFrank Gevaerts <frank@gevaerts.be>2011-07-19 20:48:16 +0000
commitaa27d47782ad57fe586bd18988c64dd0f005421c (patch)
tree5bd3585d87db1b75da25954c1cf2e3be5ae7d978 /firmware/target/arm/ipod
parent354d8fbc63f861401b402f96975a5ab3e27d1dff (diff)
downloadrockbox-aa27d47782ad57fe586bd18988c64dd0f005421c.tar.gz
rockbox-aa27d47782ad57fe586bd18988c64dd0f005421c.tar.bz2
rockbox-aa27d47782ad57fe586bd18988c64dd0f005421c.zip
Set the default battery capacity for ipod video properly depending on detected RAM size.
Also set up a callback for the battery capacity setting (for all players) so changes take effect without having to reboot. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30170 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/target/arm/ipod')
-rw-r--r--firmware/target/arm/ipod/video/battery-video.c33
1 files changed, 33 insertions, 0 deletions
diff --git a/firmware/target/arm/ipod/video/battery-video.c b/firmware/target/arm/ipod/video/battery-video.c
new file mode 100644
index 0000000000..b4c460284b
--- /dev/null
+++ b/firmware/target/arm/ipod/video/battery-video.c
@@ -0,0 +1,33 @@
+/***************************************************************************
+ * __________ __ ___.
+ * Open \______ \ ____ ____ | | _\_ |__ _______ ___
+ * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
+ * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
+ * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
+ * \/ \/ \/ \/ \/
+ * $Id $
+ *
+ * Default battery capacity for ipod video
+ *
+ * Copyright (c) 2011 Frank Gevaerts
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
+ * KIND, either express or implied.
+ *
+ ****************************************************************************/
+
+#include "config.h"
+#include "system.h"
+
+int battery_default_capacity(void)
+{
+ if(probed_ramsize==64)
+ return BATTERY_CAPACITY_DEFAULT_THICK;
+ else
+ return BATTERY_CAPACITY_DEFAULT_THIN;
+}