summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLinus Nielsen Feltzing <linus@haxx.se>2002-06-07 13:00:33 +0000
committerLinus Nielsen Feltzing <linus@haxx.se>2002-06-07 13:00:33 +0000
commit16ff7be475cc07a697419f9f370bef96329d2738 (patch)
tree1a3fffe3cfc0fcb636c72a559ce58b439df26c75
parentdf203f399774c8c4ba6203e12118e53ff3404fe3 (diff)
downloadrockbox-16ff7be475cc07a697419f9f370bef96329d2738.zip
rockbox-16ff7be475cc07a697419f9f370bef96329d2738.tar.gz
rockbox-16ff7be475cc07a697419f9f370bef96329d2738.tar.bz2
rockbox-16ff7be475cc07a697419f9f370bef96329d2738.tar.xz
Fixed poll interval handling
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@909 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r--firmware/drivers/button.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/firmware/drivers/button.c b/firmware/drivers/button.c
index 16a5494..20503fd 100644
--- a/firmware/drivers/button.c
+++ b/firmware/drivers/button.c
@@ -28,9 +28,9 @@
static struct event_queue button_queue;
-#define POLL_FREQUENCY HZ/10
-#define REPEAT_START 3
-#define REPEAT_INTERVAL 2
+#define POLL_FREQUENCY HZ/20
+#define REPEAT_START 6
+#define REPEAT_INTERVAL 4
static int button_read(void);
@@ -42,7 +42,7 @@ static void button_tick(void)
static bool repeat=false;
/* only poll every X ticks */
- if ( tick++ > POLL_FREQUENCY ) {
+ if ( ++tick >= POLL_FREQUENCY ) {
bool post = false;
int btn = button_read();