1
0
Fork 0
forked from len0rd/rockbox

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>
This commit is contained in:
Sebastian Leonhardt 2014-03-15 17:14:12 +01:00 committed by Marcin Bukat
parent f9d60e14c9
commit 580104db4d

View file

@ -29,6 +29,14 @@
#include "usb.h" #include "usb.h"
#include "synaptics-mep.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) void power_init(void)
{ {
GPIOD_ENABLE |= 0x80; /* enable ACK */ GPIOD_ENABLE |= 0x80; /* enable ACK */
@ -46,10 +54,11 @@ void power_init(void)
{ {
logf("touchpad not ready"); 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. KeyMatrix=0,Buttons=1,Relative=0,Absolute=1.
MEP parameter 0x20 - Report Modes */ 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, /* MinAbsReporting=0, NotAllCapButtons=0,SingleCapButton=0,
50msDebounce=0,MotionReporting=1 (reduce transmission overhead), 50msDebounce=0,MotionReporting=1 (reduce transmission overhead),
ClipZifnoFinger=0,DisableDeceleration=0,Dribble=0. ClipZifnoFinger=0,DisableDeceleration=0,Dribble=0.