diff options
-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; } |