touchpad fix
This commit is contained in:
parent
18581a40de
commit
385798b212
2 changed files with 7 additions and 5 deletions
|
@ -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);
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue