FS#8778: Fix iPod 1G scroll wheel not being enabled (Mark Fawcus and Rune Pade)

They confirmed it worked in the original ticket.

Change-Id: I949f119554a1e8bbdd0e4160c104cbc4aa2bd17d
This commit is contained in:
Solomon Peachy 2020-07-27 21:00:49 -04:00
parent be04c4be0a
commit 5e72616618
4 changed files with 6 additions and 5 deletions

View file

@ -695,6 +695,7 @@ Sylvain Saubier
Adrián Tinoco Adrián Tinoco
Boris Kovačević Boris Kovačević
Stéphane Moutard-Martin Stéphane Moutard-Martin
Rune Pade
The libmad team The libmad team
The wavpack team The wavpack team

View file

@ -40,7 +40,7 @@ unsigned short adc_scan(int channel)
(void)channel; /* there is only one */ (void)channel; /* there is only one */
mutex_lock(&adc_mtx); mutex_lock(&adc_mtx);
if ((IPOD_HW_REVISION >> 16) == 1) if ((IPOD_HW_REVISION >> 16) != 2)
{ {
int i; int i;
unsigned pval = GPIOB_OUTPUT_VAL; unsigned pval = GPIOB_OUTPUT_VAL;
@ -109,7 +109,7 @@ void adc_init(void)
GPIOB_ENABLE |= 0x1e; /* enable B1..B4 */ GPIOB_ENABLE |= 0x1e; /* enable B1..B4 */
if ((IPOD_HW_REVISION >> 16) == 1) if ((IPOD_HW_REVISION >> 16) != 2)
{ {
GPIOB_OUTPUT_EN = (GPIOB_OUTPUT_EN & ~0x08) | 0x16; GPIOB_OUTPUT_EN = (GPIOB_OUTPUT_EN & ~0x08) | 0x16;
/* B1, B2, B4 -> output, B3 -> input */ /* B1, B2, B4 -> output, B3 -> input */

View file

@ -61,7 +61,7 @@ int _battery_voltage(void)
{ {
unsigned adcval = adc_read(ADC_UNREG_POWER); unsigned adcval = adc_read(ADC_UNREG_POWER);
if ((IPOD_HW_REVISION >> 16) == 1) if ((IPOD_HW_REVISION >> 16) != 2)
return (adcval * BATTERY_SCALE_FACTOR_1G) >> 8; return (adcval * BATTERY_SCALE_FACTOR_1G) >> 8;
else else
return (adcval * BATTERY_SCALE_FACTOR_2G) >> 8; return (adcval * BATTERY_SCALE_FACTOR_2G) >> 8;

View file

@ -265,7 +265,7 @@ void button_init_device(void)
GPIOA_INT_CLR = GPIOA_INT_STAT; GPIOA_INT_CLR = GPIOA_INT_STAT;
#ifdef IPOD_1G2G #ifdef IPOD_1G2G
if ((IPOD_HW_REVISION >> 16) == 1) if ((IPOD_HW_REVISION >> 16) != 2)
{ /* enable scroll wheel */ { /* enable scroll wheel */
GPIOB_ENABLE |= 0x01; GPIOB_ENABLE |= 0x01;
GPIOB_OUTPUT_EN |= 0x01; GPIOB_OUTPUT_EN |= 0x01;
@ -289,7 +289,7 @@ int button_read_device(void)
static unsigned char last_wheel_value = 0; static unsigned char last_wheel_value = 0;
unsigned char wheel_value; unsigned char wheel_value;
if ((IPOD_HW_REVISION >> 16) == 1) if ((IPOD_HW_REVISION >> 16) != 2)
{ {
if (!hold_button && (wheel_timeout == 0)) if (!hold_button && (wheel_timeout == 0))
{ {