aboutsummaryrefslogtreecommitdiffstats
path: root/touchpad
diff options
context:
space:
mode:
authorTectu <joel@unormal.org>2012-07-22 22:21:19 +0200
committerTectu <joel@unormal.org>2012-07-22 22:21:19 +0200
commit952b0b69e8f8de054e133c7ddca6e9bcd744feaf (patch)
tree634cee5898f6be2cfbfb4a34bd592999ad00f28b /touchpad
parent637b0b7d5dfb4a8fc6a4e2da068b04474f2b3d0c (diff)
downloaduGFX-952b0b69e8f8de054e133c7ddca6e9bcd744feaf.tar.gz
uGFX-952b0b69e8f8de054e133c7ddca6e9bcd744feaf.tar.bz2
uGFX-952b0b69e8f8de054e133c7ddca6e9bcd744feaf.zip
touchpad fix
Diffstat (limited to 'touchpad')
-rw-r--r--touchpad/touchpad.c18
1 files changed, 5 insertions, 13 deletions
diff --git a/touchpad/touchpad.c b/touchpad/touchpad.c
index d44e03a1..97df206b 100644
--- a/touchpad/touchpad.c
+++ b/touchpad/touchpad.c
@@ -16,14 +16,6 @@ void tpInit(SPIDriver *spip) {
spiStart(spip, &spicfg);
}
-static __inline uint16_t readX(void) {
- return lld_readX();
-}
-
-static __inline uint16_t readY(void) {
- return lld_readY();
-}
-
uint8_t tpIRQ(void) {
return (!palReadPad(TP_IRQ_PORT, TP_IRQ));
}
@@ -33,8 +25,8 @@ static uint16_t tpReadRealX(void) {
uint16_t i, x;
for(i=0; i<CONVERSIONS; i++) {
- readX();
- results += readX();
+ lld_tpReadX();
+ results += lld_tpReadX();
}
x = (((SCREEN_WIDTH-1) * (results/CONVERSIONS)) / 2048);
@@ -47,8 +39,8 @@ static uint16_t tpReadRealY(void) {
uint16_t i, y;
for(i=0; i<CONVERSIONS; i++) {
- readY();
- results += readY();
+ lld_tpReadY();
+ results += lld_tpReadY();
}
y = (((SCREEN_HEIGHT-1) * (results/CONVERSIONS)) / 2048);
@@ -97,7 +89,7 @@ uint16_t tpReadY(void) {
}
uint16_t tpReadZ(void) {
- return lld_readZ();
+ return lld_tpReadZ();
}
static void tpDrawCross(uint16_t x, uint16_t y) {