aboutsummaryrefslogtreecommitdiffstats
path: root/libmaple/include
diff options
context:
space:
mode:
authorMarti Bolivar <mbolivar@leaflabs.com>2014-11-13 13:17:18 -0500
committerbryan newbold <bnewbold@twinleaf.com>2014-11-24 15:17:51 -0800
commit476b8cebb31cdf00e56d3df20f1c4858d8a096a8 (patch)
tree7c746c4b4f99134d94599ee56368e48f52e3205e /libmaple/include
parent27db07c5857af897fad3b2326f1d6be5b0694c68 (diff)
downloadlibrambutan-476b8cebb31cdf00e56d3df20f1c4858d8a096a8.tar.gz
librambutan-476b8cebb31cdf00e56d3df20f1c4858d8a096a8.zip
nvic.h: silence some GCC inline warnings
Signed-off-by: Marti Bolivar <mbolivar@leaflabs.com>
Diffstat (limited to 'libmaple/include')
-rw-r--r--libmaple/include/libmaple/nvic.h8
1 files changed, 2 insertions, 6 deletions
diff --git a/libmaple/include/libmaple/nvic.h b/libmaple/include/libmaple/nvic.h
index ffe385d..3e29f9e 100644
--- a/libmaple/include/libmaple/nvic.h
+++ b/libmaple/include/libmaple/nvic.h
@@ -107,16 +107,12 @@ void nvic_sys_reset();
/**
* Enables interrupts and configurable fault handlers (clear PRIMASK).
*/
-static __always_inline void nvic_globalirq_enable() {
- asm volatile("cpsie i");
-}
+#define nvic_globalirq_enable() do { asm volatile("cpsie i"); } while (0)
/**
* Disable interrupts and configurable fault handlers (set PRIMASK).
*/
-static __always_inline void nvic_globalirq_disable() {
- asm volatile("cpsid i");
-}
+#define nvic_globalirq_disable() do { asm volatile("cpsid i"); } while (0)
/**
* @brief Enable interrupt irq_num