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];
uint16_t y;
txbuf[0] = 0x90;
txbuf[0] = 0xd0;
TP_CS_LOW;
spiSend(&SPID1, 1, txbuf);
spiReceive(&SPID1, 2, rxbuf);

View File

@ -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;
}