summaryrefslogtreecommitdiff
path: root/firmware/target/arm/pbell
diff options
context:
space:
mode:
authorSebastian Leonhardt <sebastian.leonhardt@web.de>2014-03-15 17:14:12 +0100
committerMarcin Bukat <marcin.bukat@gmail.com>2014-04-03 07:35:47 +0200
commit580104db4deb7d1aae47d8c734aab80e60f4889b (patch)
tree878a7ac3252e82a9d298b80228ea7cde78b50c64 /firmware/target/arm/pbell
parentf9d60e14c9dd020ca892e0e4328a5b48274aedf2 (diff)
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>
Diffstat (limited to 'firmware/target/arm/pbell')
-rw-r--r--firmware/target/arm/pbell/vibe500/power-vibe500.c13
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 @@
#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.