diff options
author | Tectu <joel@unormal.org> | 2012-08-09 03:07:07 +0200 |
---|---|---|
committer | Tectu <joel@unormal.org> | 2012-08-09 03:07:07 +0200 |
commit | 385798b21217742ae63380bfdf623e9a5b2c9c36 (patch) | |
tree | c56f3eed4a59909ffa9f6264d731456a9b590edd | |
parent | 18581a40deb63aba81b9f1f6ccd7e6d9163034fd (diff) | |
download | uGFX-385798b21217742ae63380bfdf623e9a5b2c9c36.tar.gz uGFX-385798b21217742ae63380bfdf623e9a5b2c9c36.tar.bz2 uGFX-385798b21217742ae63380bfdf623e9a5b2c9c36.zip |
touchpad fix
-rw-r--r-- | halext/drivers/touchpad/touchpadXPT2046/touchpad_lld.c | 2 | ||||
-rw-r--r-- | halext/src/touchpad.c | 10 |
2 files changed, 7 insertions, 5 deletions
diff --git a/halext/drivers/touchpad/touchpadXPT2046/touchpad_lld.c b/halext/drivers/touchpad/touchpadXPT2046/touchpad_lld.c index a42f1bf8..4d02be69 100644 --- a/halext/drivers/touchpad/touchpadXPT2046/touchpad_lld.c +++ b/halext/drivers/touchpad/touchpadXPT2046/touchpad_lld.c @@ -99,7 +99,7 @@ uint16_t tp_lld_read_x(void) { uint8_t rxbuf[2];
uint16_t y;
- txbuf[0] = 0x90;
+ txbuf[0] = 0xd0;
TP_CS_LOW;
spiSend(&SPID1, 1, txbuf);
spiReceive(&SPID1, 2, rxbuf);
diff --git a/halext/src/touchpad.c b/halext/src/touchpad.c index 912e2256..7f7c87f6 100644 --- a/halext/src/touchpad.c +++ b/halext/src/touchpad.c @@ -132,8 +132,8 @@ uint16_t tpReadX(void) { x = cal.xm * _tpReadRealX() + cal.xn; y = cal.ym * _tpReadRealY() + cal.yn; - //switch(gdispGetOrientation()) { - switch(portrait) { // implement gdispGetOrientation() + /* + switch(gdispGetOrientation()) { // implement gdispGetOrientation() case portrait: return x; case landscape: @@ -143,6 +143,7 @@ uint16_t tpReadX(void) { case landscapeInv: return y; } + */ return x; } @@ -160,8 +161,8 @@ uint16_t tpReadY(void) { x = cal.xm * _tpReadRealX() + cal.xn; y = cal.ym * _tpReadRealY() + cal.yn; - //switch(gdispGetOrientation()) { - switch(portrait) { // implement gdispGetOrientation() + /* + switch(gdispGetOrientation()) { // implement gdispGetOrientation() case portrait: return y; case landscape: @@ -171,6 +172,7 @@ uint16_t tpReadY(void) { case landscapeInv: return SCREEN_WIDTH - x; } + */ return y; } |