From c68e3cc3d6c071e774d40272963d6c3365afb154 Mon Sep 17 00:00:00 2001 From: Jens Arnold Date: Wed, 15 Aug 2007 17:53:23 +0000 Subject: Make the wheel work on 1st gen iPod. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@14359 a1c6a512-1295-4272-9138-f99709370657 --- firmware/target/arm/ipod/button-1g-3g.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/firmware/target/arm/ipod/button-1g-3g.c b/firmware/target/arm/ipod/button-1g-3g.c index d3fb526..3a9b9ea 100644 --- a/firmware/target/arm/ipod/button-1g-3g.c +++ b/firmware/target/arm/ipod/button-1g-3g.c @@ -39,6 +39,7 @@ #include "power.h" #include "system.h" #include "powermgmt.h" +#include "hwcompat.h" int int_btn = BUTTON_NONE; @@ -186,8 +187,14 @@ void button_init_device(void) GPIOA_INT_LEV = ~GPIOA_INPUT_VAL; GPIOA_INT_CLR = GPIOA_INT_STAT; - /* TODO: put additional G1 code here (wheel enable) */ - +#ifdef IPOD_1G2G + if ((IPOD_HW_REVISION >> 16) == 1) + { /* enable scroll wheel */ + GPIOB_ENABLE |= 0x01; + GPIOB_OUTPUT_EN |= 0x01; + GPIOB_OUTPUT_VAL |= 0x01; + } +#endif GPIOA_INT_EN = 0xff; CPU_INT_EN = GPIO_MASK; -- cgit v1.1