summaryrefslogtreecommitdiff
path: root/firmware/target/arm/imx233/powermgmt-imx233.c
diff options
context:
space:
mode:
authorAmaury Pouly <pamaury@rockbox.org>2011-09-13 23:40:06 +0000
committerAmaury Pouly <pamaury@rockbox.org>2011-09-13 23:40:06 +0000
commit45537a4e87c8696629cbda8efcd721b74f084ff1 (patch)
treeda58cad942cb958a374a627b5e48abfee8f6cfe9 /firmware/target/arm/imx233/powermgmt-imx233.c
parent06c03b51b288fe3d12c1b76608367b5a4fe3e794 (diff)
imx233/fuze+: implement power management stubs
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30533 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/target/arm/imx233/powermgmt-imx233.c')
-rw-r--r--firmware/target/arm/imx233/powermgmt-imx233.c30
1 files changed, 30 insertions, 0 deletions
diff --git a/firmware/target/arm/imx233/powermgmt-imx233.c b/firmware/target/arm/imx233/powermgmt-imx233.c
index f11618b50c..37c5527a0e 100644
--- a/firmware/target/arm/imx233/powermgmt-imx233.c
+++ b/firmware/target/arm/imx233/powermgmt-imx233.c
@@ -21,6 +21,36 @@
#include "powermgmt.h"
+const unsigned short battery_level_dangerous[BATTERY_TYPES_COUNT] =
+{
+ 3659
+};
+
+const unsigned short battery_level_shutoff[BATTERY_TYPES_COUNT] =
+{
+ 3630
+};
+
+/* voltages (millivolt) of 0%, 10%, ... 100% when charging disabled */
+const unsigned short percent_to_volt_discharge[BATTERY_TYPES_COUNT][11] =
+{
+ /* Toshiba Gigabeat S Li Ion 700mAH figured from discharge curve */
+ { 3659, 3719, 3745, 3761, 3785, 3813, 3856, 3926, 3984, 4040, 4121 },
+};
+
+/* voltages (millivolt) of 0%, 10%, ... 100% when charging enabled */
+const unsigned short percent_to_volt_charge[11] =
+{
+ /* Toshiba Gigabeat S Li Ion 700mAH figured from charge curve */
+ 4028, 4063, 4087, 4111, 4135, 4156, 4173, 4185, 4194, 4202, 4208
+};
+
+/* Returns battery voltage from ADC [millivolts] */
+unsigned int battery_adc_voltage(void)
+{
+ return 4100;
+}
+
void powermgmt_init_target(void)
{
}