* Make total stack size available as a symbol

* Implement SWI handler to enable/disable interrupts
* Implement event system to deal with kicking non-interrupt code
This commit is contained in:
2011-06-03 21:22:01 +00:00
parent 0f508fb424
commit 9f79b3d82e
9 changed files with 171 additions and 3 deletions

View File

@@ -1,6 +1,8 @@
#ifndef __INTERRUPT_H
#define __INTERRUPT_H
#include "swi.h"
#define VICVectAddr (*(volatile unsigned int *)0xFFFFF030)
#define I_WDT 0
@@ -43,4 +45,7 @@ void interrupt_register_code(unsigned int source, unsigned int priority,
#define interrupt_register(x, fn) \
interrupt_register_code(I_##x, I_PRIORITY_##x, fn)
#define interrupt_block() swi_call(SWI_INTERRUPT_BLOCK)
#define interrupt_unblock() swi_call(SWI_INTERRUPT_UNBLOCK)
#endif /* __INTERRUPT_H */