summaryrefslogtreecommitdiffstats
path: root/firmware/target/arm/imx233/power-imx233.h
diff options
context:
space:
mode:
authorAmaury Pouly <pamaury@rockbox.org>2011-11-14 21:45:25 +0000
committerAmaury Pouly <pamaury@rockbox.org>2011-11-14 21:45:25 +0000
commit9e4299f6f09707fcde3aef7dd9ab3c4e6b843ce1 (patch)
treecd92d82ee8a111e253b1b7b90a32f1392dd13f38 /firmware/target/arm/imx233/power-imx233.h
parent4359b40cf1aa352abfc724f89161e4cd8ed8888c (diff)
downloadrockbox-9e4299f6f09707fcde3aef7dd9ab3c4e6b843ce1.tar.gz
rockbox-9e4299f6f09707fcde3aef7dd9ab3c4e6b843ce1.tar.bz2
rockbox-9e4299f6f09707fcde3aef7dd9ab3c4e6b843ce1.zip
imx233: implement battery reading using power register (automatically updated & scaled by lradc delay)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30988 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/target/arm/imx233/power-imx233.h')
-rw-r--r--firmware/target/arm/imx233/power-imx233.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/firmware/target/arm/imx233/power-imx233.h b/firmware/target/arm/imx233/power-imx233.h
index d0fe686888..4d6edaf0e2 100644
--- a/firmware/target/arm/imx233/power-imx233.h
+++ b/firmware/target/arm/imx233/power-imx233.h
@@ -67,6 +67,8 @@
#define HW_POWER_STS__PSWITCH_BM (3 << 20)
#define HW_POWER_BATTMONITOR (*(volatile uint32_t *)(HW_POWER_BASE + 0xe0))
+#define HW_POWER_BATTMONITOR__BATT_VAL_BP 16
+#define HW_POWER_BATTMONITOR__BATT_VAL_BM (0x3ff << 16)
#define HW_POWER_RESET (*(volatile uint32_t *)(HW_POWER_BASE + 0x100))
#define HW_POWER_RESET__UNLOCK 0x3E770000