aboutsummaryrefslogtreecommitdiffstats
path: root/src/touchpad.c
diff options
context:
space:
mode:
authorJoel Bodenmann <joel@unormal.org>2012-09-26 20:18:18 +0200
committerJoel Bodenmann <joel@unormal.org>2012-09-26 20:18:18 +0200
commit1003c37e0b468f04c6b328e000de2a5c109bad82 (patch)
tree6d70edd0aa2b958ef835a2a4955f5fed6bb7ace8 /src/touchpad.c
parent1d6a1b5338f3a1b5e95161793013f81b852d1a29 (diff)
downloaduGFX-1003c37e0b468f04c6b328e000de2a5c109bad82.tar.gz
uGFX-1003c37e0b468f04c6b328e000de2a5c109bad82.tar.bz2
uGFX-1003c37e0b468f04c6b328e000de2a5c109bad82.zip
cleanups
Diffstat (limited to 'src/touchpad.c')
-rw-r--r--src/touchpad.c39
1 files changed, 16 insertions, 23 deletions
diff --git a/src/touchpad.c b/src/touchpad.c
index 676e8e33..f0da743c 100644
--- a/src/touchpad.c
+++ b/src/touchpad.c
@@ -36,15 +36,6 @@
/* Driver local definitions. */
/*===========================================================================*/
-#ifdef UNUSED
-#elif defined(__GNUC__)
-# define UNUSED(x) UNUSED_ ## x __attribute__((unused))
-#elif defined(__LCLINT__)
-# define UNUSED(x) /*@unused@*/ x
-#else
-# define UNUSED(x) x
-#endif
-
/*===========================================================================*/
/* Driver exported variables. */
/*===========================================================================*/
@@ -172,6 +163,7 @@ uint16_t tpReadX(void) {
case landscapeInv:
return y;
}
+
return 0;
}
@@ -198,6 +190,7 @@ uint16_t tpReadY(void) {
case landscapeInv:
return SCREEN_WIDTH - x;
}
+
return 0;
}
@@ -232,27 +225,27 @@ void tpCalibrate(void) {
#endif
}
+/**
+ * @brief returns if touchpad is pressed or not
+ *
+ * @return 1 if pressed, 0 otherwise
+ *
+ * @api
+ */
#if TOUCHPAD_HAS_IRQ || defined(__DOXYGEN__)
- /**
- * @brief returns if touchpad is pressed or not
- *
- * @return 1 if pressed, 0 otherwise
- *
- * @api
- */
uint8_t tpIRQ(void) {
return tp_lld_irq();
}
#endif
+/**
+ * @brief Get the pressure.
+ *
+ * @return The pressure.
+ *
+ * @api
+ */
#if TOUCHPAD_HAS_PRESSURE || defined(__DOXYGEN__)
- /**
- * @brief Get the pressure.
- *
- * @return The pressure.
- *
- * @api
- */
uint16_t tpReadZ(void) {
/* ToDo */
return (tp_lld_read_z());