From b12c69bac7a02ea161ebc02ce7323e82bebe7b23 Mon Sep 17 00:00:00 2001 From: Michael Sevakis Date: Sun, 13 Apr 2008 20:03:08 +0000 Subject: ADC driver for Gigabeat S - a bit on the general side for now. Needs to have scales set properly (what physical value a reading represents isn't clear from the docs or I'm just lazy atm). Throw-in a _bunch_ more reg defines for the PMIC. Show all 16 raw channels values in debug menu. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17100 a1c6a512-1295-4272-9138-f99709370657 --- firmware/target/arm/imx31/gigabeat-s/adc-target.h | 29 ++++++++++++++++------- 1 file changed, 20 insertions(+), 9 deletions(-) (limited to 'firmware/target/arm/imx31/gigabeat-s/adc-target.h') diff --git a/firmware/target/arm/imx31/gigabeat-s/adc-target.h b/firmware/target/arm/imx31/gigabeat-s/adc-target.h index 8d2beaf320..6b066b0b59 100644 --- a/firmware/target/arm/imx31/gigabeat-s/adc-target.h +++ b/firmware/target/arm/imx31/gigabeat-s/adc-target.h @@ -20,18 +20,29 @@ #define _ADC_TARGET_H_ /* only two channels used by the Gigabeat */ -#define NUM_ADC_CHANNELS 2 +#define NUM_ADC_CHANNELS 16 + +#define ADC_BATTERY 0 +#define ADC_UNKNOWN_1 1 +#define ADC_UNKNOWN_2 2 +#define ADC_UNKNOWN_3 3 +#define ADC_UNKNOWN_4 4 +#define ADC_UNKNOWN_5 5 +#define ADC_UNKNOWN_6 6 +#define ADC_UNKNOWN_7 7 +#define ADC_HPREMOTE 8 +#define ADC_UNKNOWN_9 9 +#define ADC_UNKNOWN_10 10 +#define ADC_UNKNOWN_11 11 +#define ADC_UNKNOWN_12 12 +#define ADC_UNKNOWN_13 13 +#define ADC_UNKNOWN_14 14 +#define ADC_UNKNOWN_15 15 -#define ADC_BATTERY 0 -#define ADC_HPREMOTE 1 -#define ADC_UNKNOWN_3 2 -#define ADC_UNKNOWN_4 3 -#define ADC_UNKNOWN_5 4 -#define ADC_UNKNOWN_6 5 -#define ADC_UNKNOWN_7 6 -#define ADC_UNKNOWN_8 7 #define ADC_UNREG_POWER ADC_BATTERY /* For compatibility */ #define ADC_READ_ERROR 0xFFFF +void adc_done(void); + #endif -- cgit v1.2.3