summaryrefslogtreecommitdiffstats
path: root/firmware
diff options
context:
space:
mode:
authorSzymon Dziok <b0hoon@o2.pl>2010-05-24 19:48:06 +0000
committerSzymon Dziok <b0hoon@o2.pl>2010-05-24 19:48:06 +0000
commit06601e5fbaa772bdfe4265c19ff75c3f8c24e223 (patch)
tree65bb61032f2fdb189b005c07239c03aba7469870 /firmware
parentf7253e322f552e7185c25b81632594b1ec133a0f (diff)
downloadrockbox-06601e5fbaa772bdfe4265c19ff75c3f8c24e223.tar.gz
rockbox-06601e5fbaa772bdfe4265c19ff75c3f8c24e223.tar.bz2
rockbox-06601e5fbaa772bdfe4265c19ff75c3f8c24e223.zip
Vibe 500: fix the scrolling through the lists by implementing BUTTON_REPEAT for the scrollstrip.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26268 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware')
-rw-r--r--firmware/target/arm/pbell/vibe500/button-vibe500.c22
1 files changed, 20 insertions, 2 deletions
diff --git a/firmware/target/arm/pbell/vibe500/button-vibe500.c b/firmware/target/arm/pbell/vibe500/button-vibe500.c
index b129cfea2d..54b4d2dbb1 100644
--- a/firmware/target/arm/pbell/vibe500/button-vibe500.c
+++ b/firmware/target/arm/pbell/vibe500/button-vibe500.c
@@ -29,6 +29,9 @@
static int int_btn = BUTTON_NONE;
static int old_pos = -1;
+static int scroll_repeat = BUTTON_NONE;
+static int repeat = 0;
+
void button_init_device(void)
{
}
@@ -68,9 +71,23 @@ void button_int(void)
int scr_pos = val >> 8; /* split the scrollstrip into 16 regions */
if ((old_pos<scr_pos)&&(old_pos!=-1)) int_btn = BUTTON_DOWN;
if ((old_pos>scr_pos)&&(old_pos!=-1)) int_btn = BUTTON_UP;
+
old_pos = scr_pos;
+
+ /* repeat button */
+ repeat = 0;
+ if (int_btn!=BUTTON_NONE)
+ {
+ if (int_btn!=scroll_repeat)
+ scroll_repeat = int_btn;
+ else repeat = BUTTON_REPEAT;
+ }
+ }
+ else
+ {
+ old_pos = -1;
+ scroll_repeat = BUTTON_NONE;
}
- else old_pos=-1;
}
}
@@ -106,12 +123,13 @@ int button_read_device(void)
/* Scrollstrip direct button post - much better response */
if ((buttons==BUTTON_UP) || (buttons==BUTTON_DOWN))
{
- queue_post(&button_queue,buttons,0);
+ queue_post(&button_queue,buttons|repeat,0);
backlight_on();
buttonlight_on();
reset_poweroff_timer();
buttons = BUTTON_NONE;
int_btn = BUTTON_NONE;
+ repeat = BUTTON_NONE;
}
}
else return BUTTON_NONE;