Merge pull request #15399 from maribu/msp430-irq-arch

cpu/msp430_common: Prevent conflicting defines
This commit is contained in:
benpicco 2020-11-06 22:23:27 +01:00 committed by GitHub
commit 77ddc9d391
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -24,7 +24,6 @@
#define IRQ_ARCH_H #define IRQ_ARCH_H
#include "irq.h" #include "irq.h"
#include "cpu.h"
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
@ -38,6 +37,7 @@ extern "C" {
extern volatile int __irq_is_in; extern volatile int __irq_is_in;
#define _GENERAL_INTERRUPT_ENABLE (0x0008)
__attribute__((always_inline)) static inline unsigned int irq_disable(void) __attribute__((always_inline)) static inline unsigned int irq_disable(void)
{ {
@ -48,7 +48,7 @@ __attribute__((always_inline)) static inline unsigned int irq_disable(void)
"nop" "\n\t" "nop" "\n\t"
"and %[gie], %[state]" "\n\t" "and %[gie], %[state]" "\n\t"
: [state] "=r"(state) : [state] "=r"(state)
: [gie] "i"(GIE) : [gie] "i"(_GENERAL_INTERRUPT_ENABLE)
: "memory" : "memory"
); );
@ -65,7 +65,7 @@ __attribute__((always_inline)) static inline unsigned int irq_enable(void)
"nop" "\n\t" "nop" "\n\t"
"and %[gie], %[state]" "\n\t" "and %[gie], %[state]" "\n\t"
: [state] "=r"(state) : [state] "=r"(state)
: [gie] "i"(GIE) : [gie] "i"(_GENERAL_INTERRUPT_ENABLE)
: "memory" : "memory"
); );