projects
/
bertos.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
IRQ_ASSERT_{EN,DIS}ABLE(): Rename for consistency.
[bertos.git]
/
bertos
/
cpu
/
irq.h
diff --git
a/bertos/cpu/irq.h
b/bertos/cpu/irq.h
index 5fddfdc9cee57f08da34b6cbd70db60579a8e3fa..3a84dcb33b225c8ea5fc80d3b417d446647bbebb 100644
(file)
--- a/
bertos/cpu/irq.h
+++ b/
bertos/cpu/irq.h
@@
-245,15
+245,19
@@
#ifdef IRQ_ENABLED
/// Ensure interrupts are enabled
#ifdef IRQ_ENABLED
/// Ensure interrupts are enabled
- #define
ASSERT_IRQ
_ENABLED() ASSERT(IRQ_ENABLED())
+ #define
IRQ_ASSERT
_ENABLED() ASSERT(IRQ_ENABLED())
/// Ensure interrupts are not enabled
/// Ensure interrupts are not enabled
- #define
ASSERT_IRQ_DISABLED() ASSERT(
IRQ_ENABLED())
+ #define
IRQ_ASSERT_DISABLED() ASSERT(!
IRQ_ENABLED())
#else
#else
- #define
ASSERT_IRQ
_ENABLED() do {} while(0)
- #define
ASSERT_IRQ
_DISABLED() do {} while(0)
+ #define
IRQ_ASSERT
_ENABLED() do {} while(0)
+ #define
IRQ_ASSERT
_DISABLED() do {} while(0)
#endif
#endif
+// OBSOLETE names
+#define ASSERT_IRQ_ENABLED() IRQ_ASSERT_ENABLED()
+#define ASSERT_IRQ_DISABLED() IRQ_ASSERT_DISABLED()
+
/**
* Execute \a CODE atomically with respect to interrupts.
*
/**
* Execute \a CODE atomically with respect to interrupts.
*