aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/touchpad/ads7843_lld.c6
-rw-r--r--drivers/touchpad/ads7843_lld.h6
-rw-r--r--drivers/touchpad/xpt2046_lld.c6
-rw-r--r--drivers/touchpad/xpt2046_lld.h6
-rw-r--r--touchpad/touchpad.c18
5 files changed, 17 insertions, 25 deletions
diff --git a/drivers/touchpad/ads7843_lld.c b/drivers/touchpad/ads7843_lld.c
index 507a2104..b097e0a5 100644
--- a/drivers/touchpad/ads7843_lld.c
+++ b/drivers/touchpad/ads7843_lld.c
@@ -2,7 +2,7 @@
#ifdef TOUCHPAD_USE_ADS7843
-__inline uint16_t lld_readX(void) {
+__inline uint16_t lld_tpReadX(void) {
uint8_t txbuf[1];
uint8_t rxbuf[2];
uint16_t x;
@@ -19,7 +19,7 @@ __inline uint16_t lld_readX(void) {
return x;
}
-__inline uint16_t lld_readY(void) {
+__inline uint16_t lld_tpReadY(void) {
uint8_t txbuf[1];
uint8_t rxbuf[2];
uint16_t y;
@@ -36,7 +36,7 @@ __inline uint16_t lld_readY(void) {
return y;
}
-__inline uint16_t lld_readZ(void) {
+__inline uint16_t lld_tpReadZ(void) {
return 0;
}
diff --git a/drivers/touchpad/ads7843_lld.h b/drivers/touchpad/ads7843_lld.h
index 121e6288..d288c3ea 100644
--- a/drivers/touchpad/ads7843_lld.h
+++ b/drivers/touchpad/ads7843_lld.h
@@ -6,9 +6,9 @@
#ifdef TOUCHPAD_USE_ADS7843
-uint16_t lld_readX(void);
-uint16_t lld_readY(void);
-uint16_t lld_readZ(void);
+uint16_t lld_tpReadX(void);
+uint16_t lld_tpReadY(void);
+uint16_t lld_tpReadZ(void);
#endif
#endif
diff --git a/drivers/touchpad/xpt2046_lld.c b/drivers/touchpad/xpt2046_lld.c
index 02ded390..eac9d19a 100644
--- a/drivers/touchpad/xpt2046_lld.c
+++ b/drivers/touchpad/xpt2046_lld.c
@@ -2,7 +2,7 @@
#ifdef TOUCHPAD_USE_XPT2046
-__inline uint16_t lld_readX(void) {
+__inline uint16_t lld_tpReadX(void) {
uint8_t txbuf[1];
uint8_t rxbuf[2];
uint16_t x;
@@ -19,7 +19,7 @@ __inline uint16_t lld_readX(void) {
return x;
}
-__inline uint16_t lld_readY(void) {
+__inline uint16_t lld_tpReadY(void) {
uint8_t txbuf[1];
uint8_t rxbuf[2];
uint16_t y;
@@ -36,7 +36,7 @@ __inline uint16_t lld_readY(void) {
return y;
}
-__inline uint16_t lld_readZ(void) {
+__inline uint16_t lld_tpReadZ(void) {
return 0;
}
diff --git a/drivers/touchpad/xpt2046_lld.h b/drivers/touchpad/xpt2046_lld.h
index c3a12077..249c66ca 100644
--- a/drivers/touchpad/xpt2046_lld.h
+++ b/drivers/touchpad/xpt2046_lld.h
@@ -6,9 +6,9 @@
#ifdef TOUCHPAD_USE_XPT2046
-uint16_t lld_readX(void);
-uint16_t lld_readY(void);
-uint16_t lld_readZ(void);
+uint16_t lld_tpReadX(void);
+uint16_t lld_tpReadY(void);
+uint16_t lld_tpReadZ(void);
#endif
#endif
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) {