diff options
author | balrog <balrog@c046a42c-6fe2-441c-8c8c-71466251a162> | 2007-06-24 13:45:36 +0000 |
---|---|---|
committer | balrog <balrog@c046a42c-6fe2-441c-8c8c-71466251a162> | 2007-06-24 13:45:36 +0000 |
commit | 611d7189e7dc58cdd8e770924677161f72149922 (patch) | |
tree | 291f8a17c07be9f72a9bdc477386c9ffc6639490 /hw | |
parent | 610c3c8afd99f4f118b12ede39ee8d62ee44a446 (diff) |
Make touchscreen calibration values better match the HW. Invert WM8750 GPIO.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3014 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'hw')
-rw-r--r-- | hw/ads7846.c | 13 | ||||
-rw-r--r-- | hw/spitz.c | 4 |
2 files changed, 9 insertions, 8 deletions
diff --git a/hw/ads7846.c b/hw/ads7846.c index 8eeb143b11..2f891b1251 100644 --- a/hw/ads7846.c +++ b/hw/ads7846.c @@ -30,10 +30,10 @@ struct ads7846_state_s { #define CB_A2 (1 << 6) #define CB_START (1 << 7) -#define X_AXIS_DMAX 3680 -#define X_AXIS_MIN 150 -#define Y_AXIS_DMAX 3640 -#define Y_AXIS_MIN 190 +#define X_AXIS_DMAX 3470 +#define X_AXIS_MIN 290 +#define Y_AXIS_DMAX 3450 +#define Y_AXIS_MIN 200 #define ADS_VBAT 2000 #define ADS_VAUX 2000 @@ -95,10 +95,11 @@ static void ads7846_ts_event(void *opaque, struct ads7846_state_s *s = opaque; if (buttons_state) { - s->input[1] = ADS_YPOS(x, y); + x = 0x7fff - x; + s->input[1] = ADS_XPOS(x, y); s->input[3] = ADS_Z1POS(x, y); s->input[4] = ADS_Z2POS(x, y); - s->input[5] = ADS_XPOS(x, y); + s->input[5] = ADS_YPOS(x, y); } if (s->pressure == !buttons_state) { diff --git a/hw/spitz.c b/hw/spitz.c index 590e1fc082..c6fb598f49 100644 --- a/hw/spitz.c +++ b/hw/spitz.c @@ -919,8 +919,8 @@ static void spitz_microdrive_attach(struct pxa2xx_state_s *cpu) /* Wm8750 and Max7310 on I2C */ #define AKITA_MAX_ADDR 0x18 -#define SPITZ_WM_ADDRL 0x1a -#define SPITZ_WM_ADDRH 0x1b +#define SPITZ_WM_ADDRL 0x1b +#define SPITZ_WM_ADDRH 0x1a #define SPITZ_GPIO_WM 5 |