aboutsummaryrefslogtreecommitdiffstats
path: root/wirish/ext_interrupts.h
diff options
context:
space:
mode:
authorMarti Bolivar <mbolivar@leaflabs.com>2011-05-09 16:43:27 -0400
committerMarti Bolivar <mbolivar@leaflabs.com>2011-05-09 16:49:08 -0400
commit19ea6ba4ea3f1ecb9830cf4d3e1366513f4f96e3 (patch)
treea43f7e0fb3650ca54f245b750a078a0e8c356504 /wirish/ext_interrupts.h
parent868fb1c273e562a1140abfa948022c9d4f55bccf (diff)
parent1e2e177f6dae62e040c674b617744c73be187062 (diff)
downloadlibrambutan-19ea6ba4ea3f1ecb9830cf4d3e1366513f4f96e3.tar.gz
librambutan-19ea6ba4ea3f1ecb9830cf4d3e1366513f4f96e3.zip
Merge branch 'refactor'
This merges the libmaple refactor work into master. The contents of libmaple proper (/libmaple/) are almost completely incompatible with previous APIs in master. See /docs/source/libmaple/overview.rst for more information on the new design. Wirish incompatibilities are limited to the HardwareTimer class; however, there are several new deprecations, most likely to be removed in 0.1.0.
Diffstat (limited to 'wirish/ext_interrupts.h')
-rw-r--r--wirish/ext_interrupts.h17
1 files changed, 4 insertions, 13 deletions
diff --git a/wirish/ext_interrupts.h b/wirish/ext_interrupts.h
index 304e267..7d20801 100644
--- a/wirish/ext_interrupts.h
+++ b/wirish/ext_interrupts.h
@@ -28,7 +28,7 @@
/**
* @file ext_interrupts.h
*
- * @brief External interrupt wiring prototypes and types
+ * @brief Wiring-like external interrupt prototypes and types.
*/
#ifndef _EXT_INTERRUPTS_H_
@@ -38,7 +38,7 @@
* The kind of transition on an external pin which should trigger an
* interrupt.
*/
-typedef enum ExtIntTriggerMode_ {
+typedef enum ExtIntTriggerMode {
RISING, /**< To trigger an interrupt when the pin transitions LOW
to HIGH */
FALLING, /**< To trigger an interrupt when the pin transitions
@@ -48,10 +48,6 @@ typedef enum ExtIntTriggerMode_ {
changes). */
} ExtIntTriggerMode;
-#ifdef __cplusplus
-extern "C"{
-#endif
-
/**
* @brief Registers an interrupt handler on a pin.
*
@@ -86,7 +82,7 @@ void detachInterrupt(uint8 pin);
*
* @see noInterrupts()
*/
-static ALWAYS_INLINE void interrupts() {
+static inline void interrupts() {
nvic_globalirq_enable();
}
@@ -100,14 +96,9 @@ static ALWAYS_INLINE void interrupts() {
*
* @see interrupts()
*/
-static ALWAYS_INLINE void noInterrupts() {
+static inline void noInterrupts() {
nvic_globalirq_disable();
}
-#ifdef __cplusplus
-}
-#endif
-
-
#endif