diff options
author | Sebastian Leonhardt <sebastian.leonhardt@web.de> | 2014-03-15 17:14:12 +0100 |
---|---|---|
committer | Marcin Bukat <marcin.bukat@gmail.com> | 2014-04-03 07:35:47 +0200 |
commit | 580104db4deb7d1aae47d8c734aab80e60f4889b (patch) | |
tree | 878a7ac3252e82a9d298b80228ea7cde78b50c64 | |
parent | f9d60e14c9dd020ca892e0e4328a5b48274aedf2 (diff) | |
download | rockbox-580104db4deb7d1aae47d8c734aab80e60f4889b.tar.gz rockbox-580104db4deb7d1aae47d8c734aab80e60f4889b.zip |
Vibe500: change scrollstrip and button sensitivity to defines
Apart from the fact that the original settings were much
to sensitive for my taste, they are now easier configurable.
Change-Id: If1772367fc1f34fa1255f57b1831d1f33dc34558
Reviewed-on: http://gerrit.rockbox.org/772
Reviewed-by: Marcin Bukat <marcin.bukat@gmail.com>
-rw-r--r-- | firmware/target/arm/pbell/vibe500/power-vibe500.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/firmware/target/arm/pbell/vibe500/power-vibe500.c b/firmware/target/arm/pbell/vibe500/power-vibe500.c index a5660d7e73..e062ebddb7 100644 --- a/firmware/target/arm/pbell/vibe500/power-vibe500.c +++ b/firmware/target/arm/pbell/vibe500/power-vibe500.c | |||
@@ -29,6 +29,14 @@ | |||
29 | #include "usb.h" | 29 | #include "usb.h" |
30 | #include "synaptics-mep.h" | 30 | #include "synaptics-mep.h" |
31 | 31 | ||
32 | |||
33 | /* sensitivity settings for capacitive buttons and scrollstrip. | ||
34 | The values are signed 4-bit two's complement, | ||
35 | reaching from -8 (least sensitive) to +7 (most sensitive) */ | ||
36 | #define MEP_SENSITIVITY_BTN 2 | ||
37 | #define MEP_SENSITIVITY_STRIP 4 | ||
38 | |||
39 | |||
32 | void power_init(void) | 40 | void power_init(void) |
33 | { | 41 | { |
34 | GPIOD_ENABLE |= 0x80; /* enable ACK */ | 42 | GPIOD_ENABLE |= 0x80; /* enable ACK */ |
@@ -46,10 +54,11 @@ void power_init(void) | |||
46 | { | 54 | { |
47 | logf("touchpad not ready"); | 55 | logf("touchpad not ready"); |
48 | } | 56 | } |
49 | /* Max touch sensivity = 0x77, Rate=80/s,NoFilter=0, | 57 | /* Set touch sensivity, Rate=80/s,NoFilter=0, |
50 | KeyMatrix=0,Buttons=1,Relative=0,Absolute=1. | 58 | KeyMatrix=0,Buttons=1,Relative=0,Absolute=1. |
51 | MEP parameter 0x20 - Report Modes */ | 59 | MEP parameter 0x20 - Report Modes */ |
52 | touchpad_set_parameter(0,0x20,0x7785); | 60 | touchpad_set_parameter(0,0x20,0x0085 | (MEP_SENSITIVITY_BTN & 0x0F)<<12 |
61 | | (MEP_SENSITIVITY_STRIP & 0x0F)<<8); | ||
53 | /* MinAbsReporting=0, NotAllCapButtons=0,SingleCapButton=0, | 62 | /* MinAbsReporting=0, NotAllCapButtons=0,SingleCapButton=0, |
54 | 50msDebounce=0,MotionReporting=1 (reduce transmission overhead), | 63 | 50msDebounce=0,MotionReporting=1 (reduce transmission overhead), |
55 | ClipZifnoFinger=0,DisableDeceleration=0,Dribble=0. | 64 | ClipZifnoFinger=0,DisableDeceleration=0,Dribble=0. |