diff options
Diffstat (limited to 'lib/ultralib/src/os/sethwinterrupt.c')
| -rw-r--r-- | lib/ultralib/src/os/sethwinterrupt.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/lib/ultralib/src/os/sethwinterrupt.c b/lib/ultralib/src/os/sethwinterrupt.c new file mode 100644 index 0000000..0fc9d30 --- /dev/null +++ b/lib/ultralib/src/os/sethwinterrupt.c @@ -0,0 +1,16 @@ +#include "PR/os_internal.h" + +struct __osHwInt { + s32 (*handler)(void); + void *stackEnd; +}; + +extern struct __osHwInt __osHwIntTable[]; + +void __osSetHWIntrRoutine(OSHWIntr interrupt, s32 (*handler)(void), void *stackEnd) { + register u32 saveMask= __osDisableInt(); + + __osHwIntTable[interrupt].handler = handler; + __osHwIntTable[interrupt].stackEnd = stackEnd; + __osRestoreInt(saveMask); +} |
