diff options
Diffstat (limited to 'firmware/drivers/button.c')
-rw-r--r-- | firmware/drivers/button.c | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/firmware/drivers/button.c b/firmware/drivers/button.c index a50ce6420a..99b5b06c69 100644 --- a/firmware/drivers/button.c +++ b/firmware/drivers/button.c | |||
@@ -94,7 +94,7 @@ static bool remote_button_hold_only(void); | |||
94 | int int_btn = BUTTON_NONE; | 94 | int int_btn = BUTTON_NONE; |
95 | #endif | 95 | #endif |
96 | 96 | ||
97 | #if (CONFIG_KEYPAD == IPOD_4G_PAD) && (!defined(APPLE_IPODMINI)) | 97 | #if (CONFIG_KEYPAD == IPOD_4G_PAD) && !defined(IPOD_MINI) |
98 | static void opto_i2c_init(void) | 98 | static void opto_i2c_init(void) |
99 | { | 99 | { |
100 | int i, curr_value; | 100 | int i, curr_value; |
@@ -222,11 +222,8 @@ void ipod_4g_button_int(void) | |||
222 | CPU_HI_INT_EN = I2C_MASK; | 222 | CPU_HI_INT_EN = I2C_MASK; |
223 | } | 223 | } |
224 | #endif | 224 | #endif |
225 | #if (CONFIG_KEYPAD == IPOD_3G_PAD) || (defined(APPLE_IPODMINI)) | 225 | #if (CONFIG_KEYPAD == IPOD_3G_PAD) || defined(IPOD_MINI) |
226 | /** | 226 | /* iPod 3G and mini 1G, mini 2G uses iPod 4G code */ |
227 | * | ||
228 | * | ||
229 | */ | ||
230 | void handle_scroll_wheel(int new_scroll, int was_hold, int reverse) | 227 | void handle_scroll_wheel(int new_scroll, int was_hold, int reverse) |
231 | { | 228 | { |
232 | int wheel_keycode = BUTTON_NONE; | 229 | int wheel_keycode = BUTTON_NONE; |
@@ -274,7 +271,8 @@ void handle_scroll_wheel(int new_scroll, int was_hold, int reverse) | |||
274 | prev_scroll = new_scroll; | 271 | prev_scroll = new_scroll; |
275 | } | 272 | } |
276 | #endif | 273 | #endif |
277 | #if (CONFIG_KEYPAD == IPOD_4G_PAD) && (defined(APPLE_IPODMINI)) | 274 | #if (CONFIG_KEYPAD == IPOD_4G_PAD) && defined(IPOD_MINI) |
275 | /* mini 1 only, mini 2G uses iPod 4G code */ | ||
278 | static int ipod_mini_button_read(void) | 276 | static int ipod_mini_button_read(void) |
279 | { | 277 | { |
280 | unsigned char source, wheel_source, state, wheel_state; | 278 | unsigned char source, wheel_source, state, wheel_state; |
@@ -638,7 +636,7 @@ void button_init(void) | |||
638 | /* nothing to initialize here */ | 636 | /* nothing to initialize here */ |
639 | #elif CONFIG_KEYPAD == GMINI100_PAD | 637 | #elif CONFIG_KEYPAD == GMINI100_PAD |
640 | /* nothing to initialize here */ | 638 | /* nothing to initialize here */ |
641 | #elif (CONFIG_KEYPAD == IPOD_4G_PAD) && (!defined(APPLE_IPODMINI)) | 639 | #elif (CONFIG_KEYPAD == IPOD_4G_PAD) && !defined(IPOD_MINI) |
642 | opto_i2c_init(); | 640 | opto_i2c_init(); |
643 | /* hold button - enable as input */ | 641 | /* hold button - enable as input */ |
644 | GPIOA_ENABLE |= 0x20; | 642 | GPIOA_ENABLE |= 0x20; |
@@ -652,7 +650,7 @@ void button_init(void) | |||
652 | CPU_INT_EN = 0x40000000; | 650 | CPU_INT_EN = 0x40000000; |
653 | CPU_HI_INT_EN = I2C_MASK; | 651 | CPU_HI_INT_EN = I2C_MASK; |
654 | 652 | ||
655 | #elif (CONFIG_KEYPAD == IPOD_4G_PAD) && (defined(APPLE_IPODMINI)) | 653 | #elif (CONFIG_KEYPAD == IPOD_4G_PAD) && defined(IPOD_MINI) |
656 | /* iPod Mini G1 */ | 654 | /* iPod Mini G1 */ |
657 | /* buttons - enable as input */ | 655 | /* buttons - enable as input */ |
658 | GPIOA_ENABLE |= 0x3f; | 656 | GPIOA_ENABLE |= 0x3f; |