summaryrefslogtreecommitdiff
path: root/firmware/export
diff options
context:
space:
mode:
authorRob Purchase <shotofadds@rockbox.org>2009-10-08 15:47:43 +0000
committerRob Purchase <shotofadds@rockbox.org>2009-10-08 15:47:43 +0000
commit292a53da4b862dcb942b02eb47664efaf294d8c9 (patch)
tree613ea37b76ce89abb9235fa1587978177c708998 /firmware/export
parent5a435e62d062c7bc75c27a324e89de06cc4543f9 (diff)
downloadrockbox-292a53da4b862dcb942b02eb47664efaf294d8c9.tar.gz
rockbox-292a53da4b862dcb942b02eb47664efaf294d8c9.zip
D2: Use a common function for reading ADC values from the PMU
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23007 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/export')
-rw-r--r--firmware/export/pcf50606.h2
-rw-r--r--firmware/export/pcf5060x.h17
2 files changed, 19 insertions, 0 deletions
diff --git a/firmware/export/pcf50606.h b/firmware/export/pcf50606.h
index 8e01346028..4ae3d83f97 100644
--- a/firmware/export/pcf50606.h
+++ b/firmware/export/pcf50606.h
@@ -52,4 +52,6 @@ unsigned char pcf50606_i2c_inb(bool ack);
52void pcf50606_reset_timeout(void); 52void pcf50606_reset_timeout(void);
53#endif 53#endif
54 54
55void pcf50606_read_adc(int adc, short* res1, short* res2);
56
55#endif /* PCF50606_H */ 57#endif /* PCF50606_H */
diff --git a/firmware/export/pcf5060x.h b/firmware/export/pcf5060x.h
index 0a8927bab4..e2af9d7122 100644
--- a/firmware/export/pcf5060x.h
+++ b/firmware/export/pcf5060x.h
@@ -92,4 +92,21 @@
92#define PCF5060X_GPOC4 0x3b 92#define PCF5060X_GPOC4 0x3b
93#define PCF5060X_GPOC5 0x3c 93#define PCF5060X_GPOC5 0x3c
94 94
95/* ADCC2 mux values */
96#define PCF5060X_ADC_BATVOLT_RES 0x0
97#define PCF5060X_ADC_BATVOLT_SUBTR 0x1
98#define PCF5060X_ADC_ADCIN1_RES 0x2
99#define PCF5060X_ADC_ADCIN1_SUBTR 0x3
100#define PCF5060X_ADC_BATTEMP 0x4
101#define PCF5060X_ADC_ADCIN2 0x5
102#define PCF5060X_ADC_ADCIN3 0x6
103#define PCF5060X_ADC_ADCIN3_RATIO 0x7
104#define PCF5060X_ADC_TSC_X 0x8
105#define PCF5060X_ADC_TSC_Y 0x9
106#define PCF5060X_ADC_TSC_P1 0xa
107#define PCF5060X_ADC_TSC_P2 0xb
108#define PCF5060X_ADC_BATVOLT_ADCIN1 0xc
109#define PCF5060X_ADC_TSC_XY 0xe
110#define PCF5060X_ADC_TSC_P1P2 0xf
111
95#endif /* PCF5060X_H */ 112#endif /* PCF5060X_H */