Index: firmware/target/arm/ipod/button-1g-3g.c =================================================================== --- firmware/target/arm/ipod/button-1g-3g.c (revision 16731) +++ firmware/target/arm/ipod/button-1g-3g.c (working copy) @@ -63,7 +63,7 @@ {1, 0, 0, -1}, {0, -1, 1, 0} }; - + #ifdef IPOD_1G2G wheel_timeout = WHEEL_TIMEOUT; #endif @@ -117,7 +117,7 @@ unsigned char source, state; static bool was_hold = false; int btn = BUTTON_NONE; - + #ifdef IPOD_3G /* The following delay was 250 in the ipodlinux source, * but 50 seems to work fine. 250 causes the wheel to stop @@ -127,10 +127,10 @@ /* get source of interupts */ source = GPIOA_INT_STAT; - + /* get current keypad status */ state = GPIOA_INPUT_VAL; - + /* toggle interrupt level */ GPIOA_INT_LEV = ~state; @@ -199,7 +199,7 @@ GPIOA_INT_CLR = GPIOA_INT_STAT; #ifdef IPOD_1G2G - if ((IPOD_HW_REVISION >> 16) == 1) + if ((IPOD_HW_REVISION >> 16) != 2) { /* enable scroll wheel */ GPIOB_ENABLE |= 0x01; GPIOB_OUTPUT_EN |= 0x01; @@ -222,7 +222,7 @@ static unsigned char last_wheel_value = 0; unsigned char wheel_value; - if ((IPOD_HW_REVISION >> 16) == 1) + if ((IPOD_HW_REVISION >> 16) != 2) { if (!hold_button && (wheel_timeout == 0)) { @@ -230,11 +230,11 @@ udelay(50); /* let the voltage settle */ wheel_value = GPIOA_INPUT_VAL >> 6; if (wheel_value != last_wheel_value) - { - last_wheel_value = wheel_value; + { + last_wheel_value = wheel_value; wheel_timeout = WHEEL_TIMEOUT; /* keep wheel enabled */ } - } + } if (wheel_timeout) wheel_timeout--; else