From 18accc018bc58b04d994e25a791702e88ef222e6 Mon Sep 17 00:00:00 2001 From: Marcin Bukat Date: Fri, 10 Dec 2010 15:12:16 +0000 Subject: HD300 - do not handle scrollstrip events when hold is on git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28782 a1c6a512-1295-4272-9138-f99709370657 --- firmware/target/coldfire/mpio/hd300/button-hd300.c | 41 ++++++++++++---------- 1 file changed, 23 insertions(+), 18 deletions(-) (limited to 'firmware/target/coldfire/mpio/hd300') diff --git a/firmware/target/coldfire/mpio/hd300/button-hd300.c b/firmware/target/coldfire/mpio/hd300/button-hd300.c index 2b7add7820..8239b54e28 100644 --- a/firmware/target/coldfire/mpio/hd300/button-hd300.c +++ b/firmware/target/coldfire/mpio/hd300/button-hd300.c @@ -180,7 +180,14 @@ int button_read_device(void) #ifndef BOOTLOADER /* Only main hold affects backlight */ if (hold_button != hold_button_old) + { backlight_hold_changed(hold_button); + + if ( hold_button ) + disable_scrollstrip_interrupts(); + else + enable_scrollstrip_interrupts(); + } #endif /* Skip if main hold is active */ @@ -207,28 +214,26 @@ int button_read_device(void) if (data > 950) btn |= BUTTON_REC; } - } - - /* Handle GPIOs buttons - * - * GPIO56 active high PLAY/PAUSE/ON - * GPIO45 active low ENTER - * GPIO41 active low MENU - */ + + /* Handle GPIOs buttons + * + * GPIO56 active high PLAY/PAUSE/ON + * GPIO45 active low ENTER + * GPIO41 active low MENU + */ - data = GPIO1_READ; + data = GPIO1_READ; - if (!hold_button) - { - if (data & (1<<24)) - btn |= BUTTON_PLAY; + if (data & (1<<24)) + btn |= BUTTON_PLAY; - if (!(data & (1<<13))) - btn |= BUTTON_ENTER; + if (!(data & (1<<13))) + btn |= BUTTON_ENTER; - if (!(data & (1<<9))) - btn |= BUTTON_MENU; - } + if (!(data & (1<<9))) + btn |= BUTTON_MENU; + + } /* !button_hold() */ return btn; } -- cgit v1.2.3