From 580104db4deb7d1aae47d8c734aab80e60f4889b Mon Sep 17 00:00:00 2001 From: Sebastian Leonhardt Date: Sat, 15 Mar 2014 17:14:12 +0100 Subject: 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 --- firmware/target/arm/pbell/vibe500/power-vibe500.c | 13 +++++++++++-- 1 file 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 @@ #include "usb.h" #include "synaptics-mep.h" + +/* sensitivity settings for capacitive buttons and scrollstrip. + The values are signed 4-bit two's complement, + reaching from -8 (least sensitive) to +7 (most sensitive) */ +#define MEP_SENSITIVITY_BTN 2 +#define MEP_SENSITIVITY_STRIP 4 + + void power_init(void) { GPIOD_ENABLE |= 0x80; /* enable ACK */ @@ -46,10 +54,11 @@ void power_init(void) { logf("touchpad not ready"); } - /* Max touch sensivity = 0x77, Rate=80/s,NoFilter=0, + /* Set touch sensivity, Rate=80/s,NoFilter=0, KeyMatrix=0,Buttons=1,Relative=0,Absolute=1. MEP parameter 0x20 - Report Modes */ - touchpad_set_parameter(0,0x20,0x7785); + touchpad_set_parameter(0,0x20,0x0085 | (MEP_SENSITIVITY_BTN & 0x0F)<<12 + | (MEP_SENSITIVITY_STRIP & 0x0F)<<8); /* MinAbsReporting=0, NotAllCapButtons=0,SingleCapButton=0, 50msDebounce=0,MotionReporting=1 (reduce transmission overhead), ClipZifnoFinger=0,DisableDeceleration=0,Dribble=0. -- cgit v1.2.3