aboutsummaryrefslogtreecommitdiffstats
path: root/wirish/ext_interrupts.h
diff options
context:
space:
mode:
Diffstat (limited to 'wirish/ext_interrupts.h')
-rw-r--r--wirish/ext_interrupts.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/wirish/ext_interrupts.h b/wirish/ext_interrupts.h
index 80e2e9e..d44978a 100644
--- a/wirish/ext_interrupts.h
+++ b/wirish/ext_interrupts.h
@@ -34,7 +34,7 @@
#define _EXT_INTERRUPTS_H_
/**
- * The kind transition on an external pin which should trigger an
+ * The kind of transition on an external pin which should trigger an
* interrupt.
*/
typedef enum ExtIntTriggerMode_ {
@@ -56,13 +56,16 @@ extern "C"{
*
* The interrupt will be triggered on a given transition on the pin,
* as specified by the mode parameter. The handler runs in interrupt
- * context.
+ * context. The new handler will replace whatever handler is
+ * currently registered for the pin, if any.
*
* @param pin Maple pin number
* @param handler Function to run upon external interrupt trigger.
+ * The handler should take no arguments, and have void return type.
* @param mode Type of transition to trigger on, e.g. falling, rising, etc.
*
* @sideeffect Registers a handler
+ * @see detachInterrupt()
*/
void attachInterrupt(uint8 pin, voidFuncPtr handler, ExtIntTriggerMode mode);
@@ -70,6 +73,7 @@ void attachInterrupt(uint8 pin, voidFuncPtr handler, ExtIntTriggerMode mode);
* @brief Disable any registered external interrupt.
* @param pin Maple pin number
* @sideeffect unregisters external interrupt handler
+ * @see attachInterrupt()
*/
void detachInterrupt(uint8 pin);