From 476b8cebb31cdf00e56d3df20f1c4858d8a096a8 Mon Sep 17 00:00:00 2001 From: Marti Bolivar Date: Thu, 13 Nov 2014 13:17:18 -0500 Subject: nvic.h: silence some GCC inline warnings Signed-off-by: Marti Bolivar --- libmaple/include/libmaple/nvic.h | 8 ++------ 1 file 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 -- cgit v1.2.3