aboutsummaryrefslogtreecommitdiffstats
path: root/halext/src
diff options
context:
space:
mode:
Diffstat (limited to 'halext/src')
-rw-r--r--halext/src/touchpad.c17
1 files changed, 15 insertions, 2 deletions
diff --git a/halext/src/touchpad.c b/halext/src/touchpad.c
index 7f7c87f6..2b51504a 100644
--- a/halext/src/touchpad.c
+++ b/halext/src/touchpad.c
@@ -107,7 +107,7 @@ static uint16_t _tpReadRealY(void) {
* @note This function is NOT currently implicitly invoked by @p halInit().
* It must be called manually.
*
- * @init
+ * @api
*/
void tpInit(TOUCHPADDriver *tp) {
/* Initialise Mutex */
@@ -177,7 +177,20 @@ uint16_t tpReadY(void) {
return y;
}
-#if TOUCHPAD_PRESSURE || defined(__DOXYGEN__)
+#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
+
+#if TOUCHPAD_HAS_PRESSURE || defined(__DOXYGEN__)
/**
* @brief Get the pressure.
*