mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-11-16 08:32:36 -05:00
Add the ADC_ACCESSORY channel on the ipod, to allow for accessory detection once we figure that out.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17648 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
5c5e849196
commit
07bfba21ae
3 changed files with 6 additions and 1 deletions
|
|
@ -1194,6 +1194,8 @@ bool dbg_ports(void)
|
|||
lcd_puts(0, line++, buf);
|
||||
snprintf(buf, sizeof(buf), "DEV_INIT2: %08lx", DEV_INIT2);
|
||||
lcd_puts(0, line++, buf);
|
||||
snprintf(buf, sizeof(buf), "ACCESSORY: %d", adc_read(ADC_ACCESSORY));
|
||||
lcd_puts(0, line++, buf);
|
||||
|
||||
#if defined(IRIVER_H10) || defined(IRIVER_H10_5GB)
|
||||
line++;
|
||||
|
|
|
|||
|
|
@ -83,5 +83,7 @@ void adc_init(void)
|
|||
struct adc_struct *adc_battery = &adcdata[ADC_BATTERY];
|
||||
adc_battery->channelnum = 0x2; /* ADCVIN1, resistive divider */
|
||||
adc_battery->timeout = 0;
|
||||
adcdata[ADC_ACCESSORY].channelnum = 4;
|
||||
adcdata[ADC_ACCESSORY].timeout = 0;
|
||||
_adc_read(adc_battery);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -19,9 +19,10 @@
|
|||
#ifndef _ADC_TARGET_H_
|
||||
#define _ADC_TARGET_H_
|
||||
|
||||
#define NUM_ADC_CHANNELS 1
|
||||
#define NUM_ADC_CHANNELS 2
|
||||
|
||||
#define ADC_BATTERY 0
|
||||
#define ADC_ACCESSORY 1
|
||||
#define ADC_UNREG_POWER ADC_BATTERY
|
||||
|
||||
/* Force a scan now */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue