Index: apps/debug_menu.c =================================================================== --- apps/debug_menu.c (revision 23328) +++ apps/debug_menu.c (working copy) @@ -1126,12 +1126,15 @@ #ifdef ADC_ACCESSORY lcd_putsf(0, line++, "ACCESSORY: %d", adc_read(ADC_ACCESSORY)); #endif +#ifdef IPOD_VIDEO + lcd_putsf(0, line++, "4066_ISTAT: %d", adc_read(ADC_4066_ISTAT)); +#endif #if defined(IPOD_ACCESSORY_PROTOCOL) extern unsigned char serbuf[]; lcd_putsf(0, line++, "IAP PACKET: %02x %02x %02x %02x %02x %02x %02x %02x", - serbuf[0], serbuf[1], serbuf[2], serbuf[3], serbuf[4], serbuf[5], - serbuf[6], serbuf[7]); + serbuf[0], serbuf[1], serbuf[2], serbuf[3], serbuf[4], serbuf[5], + serbuf[6], serbuf[7]); #endif #if defined(IRIVER_H10) || defined(IRIVER_H10_5GB) @@ -1530,6 +1533,16 @@ dock ? "enabled" : "disabled"); lcd_putsf(0, 7, "Headphone: %s", headphone ? "connected" : "disconnected"); +#ifdef IPOD_VIDEO + x = (adc_read(ADC_4066_ISTAT) * 2400) / +#if MEM == 64 + (1024 * 2); +#else + (1024 * 3); +#endif + lcd_putsf(0, 8, "Ibat: %d mA", x); + lcd_putsf(0, 9, "Vbat * Ibat: %d mW", x * y / 1000); +#endif #elif defined TOSHIBA_GIGABEAT_S int line = 3; unsigned int st; Index: firmware/target/arm/ipod/adc-ipod-pcf.c =================================================================== --- firmware/target/arm/ipod/adc-ipod-pcf.c (revision 23328) +++ firmware/target/arm/ipod/adc-ipod-pcf.c (working copy) @@ -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); }