2 * interrupts.c - arm exception handling
4 * author: hackbard@hackdaworld.org
8 #include "interrupts.h"
14 void interrupt_set_default_callback(void *callback) {
16 VICDefVectAddr=(u32)callback;
20 void interrupt_clear(u8 src_number) {
24 int interrupt_set(u8 src_number,u8 mode,u8 priority,void *callback) {
26 /* check whether this ir source is allready assigned */
27 if(VICSoftInt&(1<<src_number))
28 return INTERRUPT_EINUSE;
31 VICSoftInt|=(1<<src_number);
32 VICIntEnable|=(1<<src_number);
36 VICIntSelect|=(1<<src_number);
47 * the actual exception handlers (as defined in startup.s)
51 void interrupt_handler_reset(void) {
54 // undefined instruction
55 void interrupt_handler_undef_instruction(void) {
59 void interrupt_handler_soft_ir(void) {
63 void interrupt_handler_prefetch_abort(void) {
67 void interrupt_handler_data_abort(void) {
71 void interrupt_handler_fiq(void) {