touchpad fix

ugfx_release_2.6
Tectu 2012-08-09 03:07:07 +02:00
parent 18581a40de
commit 385798b212
2 changed files with 7 additions and 5 deletions

View File

@ -99,7 +99,7 @@ uint16_t tp_lld_read_x(void) {
uint8_t rxbuf[2]; uint8_t rxbuf[2];
uint16_t y; uint16_t y;
txbuf[0] = 0x90; txbuf[0] = 0xd0;
TP_CS_LOW; TP_CS_LOW;
spiSend(&SPID1, 1, txbuf); spiSend(&SPID1, 1, txbuf);
spiReceive(&SPID1, 2, rxbuf); spiReceive(&SPID1, 2, rxbuf);

View File

@ -132,8 +132,8 @@ uint16_t tpReadX(void) {
x = cal.xm * _tpReadRealX() + cal.xn; x = cal.xm * _tpReadRealX() + cal.xn;
y = cal.ym * _tpReadRealY() + cal.yn; y = cal.ym * _tpReadRealY() + cal.yn;
//switch(gdispGetOrientation()) { /*
switch(portrait) { // implement gdispGetOrientation() switch(gdispGetOrientation()) { // implement gdispGetOrientation()
case portrait: case portrait:
return x; return x;
case landscape: case landscape:
@ -143,6 +143,7 @@ uint16_t tpReadX(void) {
case landscapeInv: case landscapeInv:
return y; return y;
} }
*/
return x; return x;
} }
@ -160,8 +161,8 @@ uint16_t tpReadY(void) {
x = cal.xm * _tpReadRealX() + cal.xn; x = cal.xm * _tpReadRealX() + cal.xn;
y = cal.ym * _tpReadRealY() + cal.yn; y = cal.ym * _tpReadRealY() + cal.yn;
//switch(gdispGetOrientation()) { /*
switch(portrait) { // implement gdispGetOrientation() switch(gdispGetOrientation()) { // implement gdispGetOrientation()
case portrait: case portrait:
return y; return y;
case landscape: case landscape:
@ -171,6 +172,7 @@ uint16_t tpReadY(void) {
case landscapeInv: case landscapeInv:
return SCREEN_WIDTH - x; return SCREEN_WIDTH - x;
} }
*/
return y; return y;
} }