X-Git-Url: https://codewiz.org/gitweb?a=blobdiff_plain;ds=sidebyside;f=cpu%2Fcpu.h;fp=cpu%2Fcpu.h;h=1e68ac2c2d578e6deadb4e7d778ed6c62c74982d;hb=8892633f666bee56325f62ff9693b9a164253dc8;hp=03a0827df5cf9d7518c772e997edb3f60fedcc19;hpb=569cd794010c99ae8e3e2e37a207b0a2eaeb2c3f;p=bertos.git diff --git a/cpu/cpu.h b/cpu/cpu.h index 03a0827d..1e68ac2c 100644 --- a/cpu/cpu.h +++ b/cpu/cpu.h @@ -154,7 +154,7 @@ set_CPSR(x); \ } while (0) - #define IRQ_GETSTATE() \ + #define IRQ_ENABLED() \ ((bool)(get_CPSR() & 0xb0)) #define BREAKPOINT /* asm("bkpt 0") DOES NOT WORK */ @@ -214,7 +214,7 @@ sreg; \ }) - #define IRQ_GETSTATE() (!((CPU_READ_FLAGS() & 0xc0) == 0xc0)) + #define IRQ_ENABLED() ((CPU_READ_FLAGS() & 0xc0) != 0xc0) /** * Initialization value for registers in stack frame. @@ -239,7 +239,7 @@ #define IRQ_ENABLE FIXME #define IRQ_SAVE_DISABLE(x) FIXME #define IRQ_RESTORE(x) FIXME - #define IRQ_GETSTATE() FIXME + #define IRQ_ENABLED() FIXME typedef uint32_t cpuflags_t; // FIXME typedef uint32_t cpustack_t; // FIXME @@ -272,13 +272,13 @@ } #define IRQ_RUNNING() irq_running() - static inline bool irq_getstate(void) + static inline bool irq_enabled(void) { uint16_t x; asm(move SR,x); return !(x & 0x0200); } - #define IRQ_GETSTATE() irq_getstate() + #define IRQ_ENABLED() irq_enabled() typedef uint16_t cpuflags_t; typedef unsigned int cpustack_t; @@ -320,7 +320,7 @@ ); \ } while (0) - #define IRQ_GETSTATE() \ + #define IRQ_ENABLED() \ ({ \ uint8_t sreg; \ __asm__ __volatile__( \