diff options
author | Rafaël Carré <rafael.carre@gmail.com> | 2010-09-15 07:43:55 +0000 |
---|---|---|
committer | Rafaël Carré <rafael.carre@gmail.com> | 2010-09-15 07:43:55 +0000 |
commit | 128593538b6d8d778b4d48cba58908b255a5570b (patch) | |
tree | f99c2ecec623d00f5c3abc79e4cc44b7a5256156 | |
parent | 24d8e8ef1a08a7a1be24dc6d60a0164fbfed02a4 (diff) | |
download | rockbox-128593538b6d8d778b4d48cba58908b255a5570b.tar.gz rockbox-128593538b6d8d778b4d48cba58908b255a5570b.zip |
button driver: make repeat timings be centiseconds and not ticks
This doesn't change the value with the current HZ=100,
but makes it easy to change HZ in custome builds and still have buttons be usable
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28086 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r-- | firmware/drivers/button.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/firmware/drivers/button.c b/firmware/drivers/button.c index 171acaaded..0d0d1cd7ad 100644 --- a/firmware/drivers/button.c +++ b/firmware/drivers/button.c | |||
@@ -69,14 +69,14 @@ static bool remote_filter_first_keypress; | |||
69 | static bool phones_present = false; | 69 | static bool phones_present = false; |
70 | #endif | 70 | #endif |
71 | 71 | ||
72 | /* how long until repeat kicks in, in ticks */ | 72 | /* how long until repeat kicks in, in centiseconds */ |
73 | #define REPEAT_START 30 | 73 | #define REPEAT_START (30*HZ/100) |
74 | 74 | ||
75 | /* the speed repeat starts at, in ticks */ | 75 | /* the speed repeat starts at, in centiseconds */ |
76 | #define REPEAT_INTERVAL_START 16 | 76 | #define REPEAT_INTERVAL_START (16*HZ/100) |
77 | 77 | ||
78 | /* speed repeat finishes at, in ticks */ | 78 | /* speed repeat finishes at, in centiseconds */ |
79 | #define REPEAT_INTERVAL_FINISH 5 | 79 | #define REPEAT_INTERVAL_FINISH (5*HZ/100) |
80 | 80 | ||
81 | #ifdef HAVE_BUTTON_DATA | 81 | #ifdef HAVE_BUTTON_DATA |
82 | static int button_read(int *data); | 82 | static int button_read(int *data); |