summaryrefslogtreecommitdiffstats
path: root/firmware/target/arm/imx233/lradc-imx233.h
diff options
context:
space:
mode:
authorAmaury Pouly <amaury.pouly@gmail.com>2014-02-04 00:23:35 +0100
committerAmaury Pouly <amaury.pouly@gmail.com>2014-02-10 23:14:25 +0100
commit0324bf59a8810cadf35d67f71f5ee409834ec4ee (patch)
treea636cb9b3ab6cfd6c0d3c54eb5659294799291a2 /firmware/target/arm/imx233/lradc-imx233.h
parent0e0c610df0d3d4044d0b21ddc1752a5dacd7f86e (diff)
downloadrockbox-0324bf59a8810cadf35d67f71f5ee409834ec4ee.tar.gz
rockbox-0324bf59a8810cadf35d67f71f5ee409834ec4ee.tar.bz2
rockbox-0324bf59a8810cadf35d67f71f5ee409834ec4ee.zip
imx233: make button-lradc drive able to handle VDDIO derived values
In most devices, the button ladder is not actually derived from VDDIO but from a constant voltage source, making it very easy to read it. However on some devices like ther ZEN X-Fi Style, the ladder is wired to VDDIO we can be changed so it's crucial that the button driver correctly scales the values wrt VDDIO. Change-Id: Ifc11abe2838fa7d16d0d60ecd96964a8dc5ea6d7
Diffstat (limited to 'firmware/target/arm/imx233/lradc-imx233.h')
-rw-r--r--firmware/target/arm/imx233/lradc-imx233.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/firmware/target/arm/imx233/lradc-imx233.h b/firmware/target/arm/imx233/lradc-imx233.h
index f274db3520..e7853b97a5 100644
--- a/firmware/target/arm/imx233/lradc-imx233.h
+++ b/firmware/target/arm/imx233/lradc-imx233.h
@@ -65,6 +65,9 @@
/* frequency of the delay counter */
#define LRADC_DELAY_FREQ 2000
+/* maximum value of a sample (without accumulation), defines the precision */
+#define LRADC_MAX_VALUE 4096
+
typedef void (*lradc_irq_fn_t)(int chan);
void imx233_lradc_init(void);