OSDN Git Service
(root)
/
scilog
/
cpu2010.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
thread_rcv.c: check sum calc add
[scilog/cpu2010.git]
/
myint.h
diff --git
a/myint.h
b/myint.h
index
51c6949
..
900a480
100644
(file)
--- a/
myint.h
+++ b/
myint.h
@@
-34,5
+34,10
@@
#define cnint_int_enable() IEC1bits.CNIE = 1
#define cnint_int_disable() IEC1bits.CNIE = 0
+#define INTERRUPT_PROTECT(x) { \
+ char saved_ipl; \
+ SET_AND_SAVE_CPU_IPL(saved_ipl,7); \
+ x; \
+ RESTORE_CPU_IPL(saved_ipl); } (void) 0;
#endif