Skip to content

Commit

Permalink
Merge pull request #9 from Defragster/master
Browse files Browse the repository at this point in the history
Return IRQ touch state without SPI xfer
  • Loading branch information
PaulStoffregen authored Oct 16, 2017
2 parents c8712d4 + 8ccfd5b commit a60d1b1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
5 changes: 5 additions & 0 deletions XPT2046_Touchscreen.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,11 @@ TS_Point XPT2046_Touchscreen::getPoint()
return TS_Point(xraw, yraw, zraw);
}

bool XPT2046_Touchscreen::tirqTouched()
{
return (isrWake);
}

bool XPT2046_Touchscreen::touched()
{
update();
Expand Down
1 change: 1 addition & 0 deletions XPT2046_Touchscreen.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ class XPT2046_Touchscreen {
XPT2046_Touchscreen(uint8_t cspin, uint8_t tirq=255);
bool begin();
TS_Point getPoint();
bool tirqTouched();
bool touched();
void readData(uint16_t *x, uint16_t *y, uint8_t *z);
bool bufferEmpty();
Expand Down

0 comments on commit a60d1b1

Please sign in to comment.