aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTectu <joel@unormal.org>2012-06-04 00:15:38 +0200
committerTectu <joel@unormal.org>2012-06-04 00:15:38 +0200
commite292bab1576ba122e2c3615c30a929b40f5ebfb1 (patch)
tree2f7e2179909ee734d59cdd90ca1729ed4f73e792
parent181ce2153097d40b6e6945e6120943896c0db00b (diff)
downloaduGFX-e292bab1576ba122e2c3615c30a929b40f5ebfb1.tar.gz
uGFX-e292bab1576ba122e2c3615c30a929b40f5ebfb1.tar.bz2
uGFX-e292bab1576ba122e2c3615c30a929b40f5ebfb1.zip
added tpIRQ()
-rw-r--r--touchpad.c2
-rw-r--r--touchpad.h5
2 files changed, 3 insertions, 4 deletions
diff --git a/touchpad.c b/touchpad.c
index a4c3dcc5..9a3005d0 100644
--- a/touchpad.c
+++ b/touchpad.c
@@ -116,7 +116,7 @@ void tpCalibrate(void) {
cal[i][0] = tpReadX();
cal[i][1] = tpReadY();
while(tpIRQ());
- lcdDrawRect(cross[i][0]-15, cross[i][1]-15, cross[i][0]+16, cross[i][1]+16, 1, Red);
+ lcdDrawRect(cross[i][0]-15, cross[i][1]-15, cross[i][0]+16, cross[i][1]+16, filled, Red);
}
for(i=0, j=0; i<3; i++) {
diff --git a/touchpad.h b/touchpad.h
index 88e397a8..c69a5af0 100644
--- a/touchpad.h
+++ b/touchpad.h
@@ -9,10 +9,9 @@
#define SET_CS(a) (TP_PORT->BSRR = 1 << (TP_CS + (a ? 0 : 16)))
void tpInit(void);
-void tpWriteData(uint8_t data);
-void tpDrawCross(uint16_t x, uint16_t y);
-uint16_t tpReadData(void);
+uint8_t tpIRQ(void);
uint16_t tpReadX(void);
uint16_t tpReadY(void);
+void tpDrawCross(uint16_t x, uint16_t y);
#endif