diff options
author | Jörg Hohensohn <hohensoh@rockbox.org> | 2004-09-10 15:41:40 +0000 |
---|---|---|
committer | Jörg Hohensohn <hohensoh@rockbox.org> | 2004-09-10 15:41:40 +0000 |
commit | 7a9910ccb9d67aed276778cf1bdb48ebcc3fed38 (patch) | |
tree | ea1762d55005908e5d3c9833f63da3635369c956 /firmware/export/adc.h | |
parent | 76994fb50e81d9fe319d287f863ce8dc39b6a145 (diff) | |
download | rockbox-7a9910ccb9d67aed276778cf1bdb48ebcc3fed38.tar.gz rockbox-7a9910ccb9d67aed276778cf1bdb48ebcc3fed38.zip |
different ADC channels for Ondio
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@5062 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/export/adc.h')
-rw-r--r-- | firmware/export/adc.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/firmware/export/adc.h b/firmware/export/adc.h index 1c94eec63e..cbc40e2662 100644 --- a/firmware/export/adc.h +++ b/firmware/export/adc.h | |||
@@ -21,6 +21,21 @@ | |||
21 | 21 | ||
22 | #define NUM_ADC_CHANNELS 8 | 22 | #define NUM_ADC_CHANNELS 8 |
23 | 23 | ||
24 | #ifdef HAVE_ONDIO_ADC | ||
25 | |||
26 | #define ADC_MMC_SWITCH 0 /* Battery voltage always reads 0x3FF due to | ||
27 | silly scaling */ | ||
28 | #define ADC_USB_POWER 1 /* USB, reads 0x000 when USB is inserted */ | ||
29 | #define ADC_BUTTON_OPTION 2 /* the option button, low value if pressed */ | ||
30 | #define ADC_BUTTON_ONOFF 3 /* the on/off button, high value if pressed */ | ||
31 | #define ADC_BUTTON_ROW1 4 /* Used for scanning the keys, different | ||
32 | voltages for different keys */ | ||
33 | #define ADC_UNREG_POWER 7 /* Battery voltage */ | ||
34 | /* FixMe: this doesn't exist, just to make the compiler happy */ | ||
35 | #define ADC_EXT_POWER 5 /* The external power voltage, V=X*0.0148 */ | ||
36 | |||
37 | #else | ||
38 | /* normal JBR channel assignment */ | ||
24 | #define ADC_BATTERY 0 /* Battery voltage always reads 0x3FF due to | 39 | #define ADC_BATTERY 0 /* Battery voltage always reads 0x3FF due to |
25 | silly scaling */ | 40 | silly scaling */ |
26 | #ifdef HAVE_FMADC | 41 | #ifdef HAVE_FMADC |
@@ -39,6 +54,8 @@ | |||
39 | #define ADC_UNREG_POWER 6 /* Battery voltage with a better scaling */ | 54 | #define ADC_UNREG_POWER 6 /* Battery voltage with a better scaling */ |
40 | #define ADC_EXT_POWER 7 /* The external power voltage, V=X*0.0148 */ | 55 | #define ADC_EXT_POWER 7 /* The external power voltage, V=X*0.0148 */ |
41 | 56 | ||
57 | #endif | ||
58 | |||
42 | #define EXT_SCALE_FACTOR 14800 | 59 | #define EXT_SCALE_FACTOR 14800 |
43 | 60 | ||
44 | unsigned short adc_read(int channel); | 61 | unsigned short adc_read(int channel); |