diff options
Diffstat (limited to 'firmware/target/arm/s5l8702/ipod6g/adc-target.h')
-rw-r--r-- | firmware/target/arm/s5l8702/ipod6g/adc-target.h | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/firmware/target/arm/s5l8702/ipod6g/adc-target.h b/firmware/target/arm/s5l8702/ipod6g/adc-target.h index d4dce3d31f..bedc0a8447 100644 --- a/firmware/target/arm/s5l8702/ipod6g/adc-target.h +++ b/firmware/target/arm/s5l8702/ipod6g/adc-target.h | |||
@@ -21,13 +21,23 @@ | |||
21 | #ifndef _ADC_TARGET_H_ | 21 | #ifndef _ADC_TARGET_H_ |
22 | #define _ADC_TARGET_H_ | 22 | #define _ADC_TARGET_H_ |
23 | 23 | ||
24 | #define NUM_ADC_CHANNELS 4 | 24 | #include <stdbool.h> |
25 | #include "config.h" | ||
25 | 26 | ||
26 | #define ADC_UNKNOWN_0 0 | 27 | enum |
27 | #define ADC_UNKNOWN_1 1 | 28 | { |
28 | #define ADC_BATTERY 2 | 29 | ADC_BATTERY = 0, |
29 | #define ADC_UNKNOWN_3 3 | 30 | ADC_USBDATA, |
31 | ADC_ACCESSORY, | ||
32 | NUM_ADC_CHANNELS | ||
33 | }; | ||
30 | 34 | ||
31 | #define ADC_UNREG_POWER ADC_BATTERY /* For compatibility */ | 35 | #define ADC_UNREG_POWER ADC_BATTERY /* For compatibility */ |
32 | 36 | ||
37 | unsigned short adc_read_millivolts(int channel); | ||
38 | unsigned int adc_read_battery_voltage(void); | ||
39 | unsigned int adc_read_usbdata_voltage(bool dp); | ||
40 | int adc_read_accessory_resistor(void); | ||
41 | const char *adc_name(int channel); | ||
42 | |||
33 | #endif | 43 | #endif |