diff options
| author | Rob Purchase <shotofadds@rockbox.org> | 2009-10-08 15:47:43 +0000 |
|---|---|---|
| committer | Rob Purchase <shotofadds@rockbox.org> | 2009-10-08 15:47:43 +0000 |
| commit | 292a53da4b862dcb942b02eb47664efaf294d8c9 (patch) | |
| tree | 613ea37b76ce89abb9235fa1587978177c708998 /firmware/export | |
| parent | 5a435e62d062c7bc75c27a324e89de06cc4543f9 (diff) | |
| download | rockbox-292a53da4b862dcb942b02eb47664efaf294d8c9.zip rockbox-292a53da4b862dcb942b02eb47664efaf294d8c9.tar.gz rockbox-292a53da4b862dcb942b02eb47664efaf294d8c9.tar.bz2 rockbox-292a53da4b862dcb942b02eb47664efaf294d8c9.tar.xz | |
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.h | 2 | ||||
| -rw-r--r-- | firmware/export/pcf5060x.h | 17 |
2 files changed, 19 insertions, 0 deletions
diff --git a/firmware/export/pcf50606.h b/firmware/export/pcf50606.h index 8e01346..4ae3d83 100644 --- a/firmware/export/pcf50606.h +++ b/firmware/export/pcf50606.h @@ -52,4 +52,6 @@ unsigned char pcf50606_i2c_inb(bool ack); void pcf50606_reset_timeout(void); #endif +void pcf50606_read_adc(int adc, short* res1, short* res2); + #endif /* PCF50606_H */ diff --git a/firmware/export/pcf5060x.h b/firmware/export/pcf5060x.h index 0a8927b..e2af9d7 100644 --- a/firmware/export/pcf5060x.h +++ b/firmware/export/pcf5060x.h @@ -92,4 +92,21 @@ #define PCF5060X_GPOC4 0x3b #define PCF5060X_GPOC5 0x3c +/* ADCC2 mux values */ +#define PCF5060X_ADC_BATVOLT_RES 0x0 +#define PCF5060X_ADC_BATVOLT_SUBTR 0x1 +#define PCF5060X_ADC_ADCIN1_RES 0x2 +#define PCF5060X_ADC_ADCIN1_SUBTR 0x3 +#define PCF5060X_ADC_BATTEMP 0x4 +#define PCF5060X_ADC_ADCIN2 0x5 +#define PCF5060X_ADC_ADCIN3 0x6 +#define PCF5060X_ADC_ADCIN3_RATIO 0x7 +#define PCF5060X_ADC_TSC_X 0x8 +#define PCF5060X_ADC_TSC_Y 0x9 +#define PCF5060X_ADC_TSC_P1 0xa +#define PCF5060X_ADC_TSC_P2 0xb +#define PCF5060X_ADC_BATVOLT_ADCIN1 0xc +#define PCF5060X_ADC_TSC_XY 0xe +#define PCF5060X_ADC_TSC_P1P2 0xf + #endif /* PCF5060X_H */ |