aboutsummaryrefslogtreecommitdiffstats
path: root/src
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
parent1d6a1b5338f3a1b5e95161793013f81b852d1a29 (diff)
downloaduGFX-1003c37e0b468f04c6b328e000de2a5c109bad82.tar.gz
uGFX-1003c37e0b468f04c6b328e000de2a5c109bad82.tar.bz2
uGFX-1003c37e0b468f04c6b328e000de2a5c109bad82.zip
cleanups
Diffstat (limited to 'src')
-rw-r--r--src/gdisp.c12
-rw-r--r--src/touchpad.c39
2 files changed, 18 insertions, 33 deletions
diff --git a/src/gdisp.c b/src/gdisp.c
index b97260c1..d566d89f 100644
--- a/src/gdisp.c
+++ b/src/gdisp.c
@@ -43,15 +43,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
-
#if GDISP_NEED_MULTITHREAD
#if !CH_USE_MUTEXES
#error "GDISP: CH_USE_MUTEXES must be defined in chconf.h because GDISP_NEED_MULTITHREAD is defined"
@@ -94,7 +85,8 @@
/*===========================================================================*/
#if GDISP_NEED_ASYNC
- static msg_t GDISPThreadHandler(void *UNUSED(arg)) {
+ static msg_t GDISPThreadHandler(void *arg) {
+ (void)arg;
gdisp_lld_msg_t *pmsg;
#if CH_USE_REGISTRY
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());