diff -ru rockbox-svn-trunk/apps/debug_menu.c rockbox-19614-ibat/apps/debug_menu.c --- rockbox-svn-trunk/apps/debug_menu.c 2008-12-28 23:14:58.832000000 -0500 +++ rockbox-19614-ibat/apps/debug_menu.c 2008-12-30 13:08:30.268400000 -0500 @@ -1194,6 +1194,10 @@ snprintf(buf, sizeof(buf), "ACCESSORY: %d", adc_read(ADC_ACCESSORY)); lcd_puts(0, line++, buf); #endif +#ifdef IPOD_VIDEO + snprintf(buf, sizeof(buf), "4066_ISTAT: %d", adc_read(ADC_4066_ISTAT)); + lcd_puts(0, line++, buf); +#endif #if defined(IPOD_ACCESSORY_PROTOCOL) extern unsigned char serbuf[]; @@ -1650,6 +1654,18 @@ snprintf(buf, 30, "Headphone: %s", headphone ? "connected" : "disconnected"); lcd_puts(0, 7, buf); +#ifdef IPOD_VIDEO + x = (adc_read(ADC_4066_ISTAT) * 2400) / +#if MEM == 64 + (1024 * 2); +#else + (1024 * 3); +#endif + snprintf(buf, sizeof(buf), "Ibat: %d mA", x); + lcd_puts(0, 8, buf); + snprintf(buf, sizeof(buf), "Vbat * Ibat: %d mW", x * y / 1000); + lcd_puts(0, 9, buf); +#endif #elif defined TOSHIBA_GIGABEAT_S int line = 3; unsigned int st; diff -ru rockbox-svn-trunk/firmware/target/arm/ipod/adc-ipod-pcf.c rockbox-19614-ibat/firmware/target/arm/ipod/adc-ipod-pcf.c --- rockbox-svn-trunk/firmware/target/arm/ipod/adc-ipod-pcf.c 2008-12-24 13:34:45.945000000 -0500 +++ rockbox-19614-ibat/firmware/target/arm/ipod/adc-ipod-pcf.c 2008-12-30 12:55:27.101200000 -0500 @@ -87,5 +87,9 @@ adc_battery->timeout = 0; adcdata[ADC_ACCESSORY].channelnum = 4; adcdata[ADC_ACCESSORY].timeout = 0; +#ifdef IPOD_VIDEO + adcdata[ADC_4066_ISTAT].channelnum = 7; + adcdata[ADC_4066_ISTAT].timeout = 0; +#endif _adc_read(adc_battery); } diff -ru rockbox-svn-trunk/firmware/target/arm/ipod/adc-target.h rockbox-19614-ibat/firmware/target/arm/ipod/adc-target.h --- rockbox-svn-trunk/firmware/target/arm/ipod/adc-target.h 2008-12-24 13:34:45.900000000 -0500 +++ rockbox-19614-ibat/firmware/target/arm/ipod/adc-target.h 2008-12-30 12:54:10.318000000 -0500 @@ -21,12 +21,16 @@ #ifndef _ADC_TARGET_H_ #define _ADC_TARGET_H_ -#define NUM_ADC_CHANNELS 2 - #define ADC_BATTERY 0 #define ADC_ACCESSORY 1 #define ADC_UNREG_POWER ADC_BATTERY - +#ifdef IPOD_VIDEO +#define ADC_4066_ISTAT 2 +#define NUM_ADC_CHANNELS 3 +#else +#define NUM_ADC_CHANNELS 2 +#endif + /* Force a scan now */ unsigned short adc_scan(int channel); #endif