projects
/
bertos.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Change macro name to IRQ_ENABLED.
[bertos.git]
/
cpu
/
cpu.h
diff --git
a/cpu/cpu.h
b/cpu/cpu.h
index 03a0827df5cf9d7518c772e997edb3f60fedcc19..1e68ac2c2d578e6deadb4e7d778ed6c62c74982d 100644
(file)
--- a/
cpu/cpu.h
+++ b/
cpu/cpu.h
@@
-154,7
+154,7
@@
set_CPSR(x); \
} while (0)
set_CPSR(x); \
} while (0)
- #define IRQ_
GETSTATE
() \
+ #define IRQ_
ENABLED
() \
((bool)(get_CPSR() & 0xb0))
#define BREAKPOINT /* asm("bkpt 0") DOES NOT WORK */
((bool)(get_CPSR() & 0xb0))
#define BREAKPOINT /* asm("bkpt 0") DOES NOT WORK */
@@
-214,7
+214,7
@@
sreg; \
})
sreg; \
})
- #define IRQ_
GETSTATE() (!((CPU_READ_FLAGS() & 0xc0) == 0xc0)
)
+ #define IRQ_
ENABLED() ((CPU_READ_FLAGS() & 0xc0) != 0xc0
)
/**
* Initialization value for registers in stack frame.
/**
* 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_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
typedef uint32_t cpuflags_t; // FIXME
typedef uint32_t cpustack_t; // FIXME
@@
-272,13
+272,13
@@
}
#define IRQ_RUNNING() irq_running()
}
#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);
}
{
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;
typedef uint16_t cpuflags_t;
typedef unsigned int cpustack_t;
@@
-320,7
+320,7
@@
); \
} while (0)
); \
} while (0)
- #define IRQ_
GETSTATE
() \
+ #define IRQ_
ENABLED
() \
({ \
uint8_t sreg; \
__asm__ __volatile__( \
({ \
uint8_t sreg; \
__asm__ __volatile__( \