summaryrefslogtreecommitdiff
path: root/firmware/target/arm
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/target/arm
parentf7253e322f552e7185c25b81632594b1ec133a0f (diff)
downloadrockbox-06601e5fbaa772bdfe4265c19ff75c3f8c24e223.tar.gz
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/target/arm')
-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 @@
29static int int_btn = BUTTON_NONE; 29static int int_btn = BUTTON_NONE;
30static int old_pos = -1; 30static int old_pos = -1;
31 31
32static int scroll_repeat = BUTTON_NONE;
33static int repeat = 0;
34
32void button_init_device(void) 35void button_init_device(void)
33{ 36{
34} 37}
@@ -68,9 +71,23 @@ void button_int(void)
68 int scr_pos = val >> 8; /* split the scrollstrip into 16 regions */ 71 int scr_pos = val >> 8; /* split the scrollstrip into 16 regions */
69 if ((old_pos<scr_pos)&&(old_pos!=-1)) int_btn = BUTTON_DOWN; 72 if ((old_pos<scr_pos)&&(old_pos!=-1)) int_btn = BUTTON_DOWN;
70 if ((old_pos>scr_pos)&&(old_pos!=-1)) int_btn = BUTTON_UP; 73 if ((old_pos>scr_pos)&&(old_pos!=-1)) int_btn = BUTTON_UP;
74
71 old_pos = scr_pos; 75 old_pos = scr_pos;
76
77 /* repeat button */
78 repeat = 0;
79 if (int_btn!=BUTTON_NONE)
80 {
81 if (int_btn!=scroll_repeat)
82 scroll_repeat = int_btn;
83 else repeat = BUTTON_REPEAT;
84 }
85 }
86 else
87 {
88 old_pos = -1;
89 scroll_repeat = BUTTON_NONE;
72 } 90 }
73 else old_pos=-1;
74 } 91 }
75} 92}
76 93
@@ -106,12 +123,13 @@ int button_read_device(void)
106 /* Scrollstrip direct button post - much better response */ 123 /* Scrollstrip direct button post - much better response */
107 if ((buttons==BUTTON_UP) || (buttons==BUTTON_DOWN)) 124 if ((buttons==BUTTON_UP) || (buttons==BUTTON_DOWN))
108 { 125 {
109 queue_post(&button_queue,buttons,0); 126 queue_post(&button_queue,buttons|repeat,0);
110 backlight_on(); 127 backlight_on();
111 buttonlight_on(); 128 buttonlight_on();
112 reset_poweroff_timer(); 129 reset_poweroff_timer();
113 buttons = BUTTON_NONE; 130 buttons = BUTTON_NONE;
114 int_btn = BUTTON_NONE; 131 int_btn = BUTTON_NONE;
132 repeat = BUTTON_NONE;
115 } 133 }
116 } 134 }
117 else return BUTTON_NONE; 135 else return BUTTON_NONE;