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) {
22 VICIntEnClear=(1<<src_number);
26 int interrupt_enable(u8 src_number,u8 mode,u8 priority,void *callback) {
28 /* check whether this ir source is allready assigned */
29 if(VICIntEnable&(1<<src_number))
30 return INTERRUPT_EINUSE;
33 VICIntEnable=(1<<src_number);
37 VICIntSelect|=(1<<src_number);
49 * the actual exception handlers (as defined in startup.s)
53 void interrupt_handler_reset(void) {
56 // undefined instruction
57 void interrupt_handler_undef_instruction(void) {
61 void interrupt_handler_soft_ir(void) {
65 void interrupt_handler_prefetch_abort(void) {
69 void interrupt_handler_data_abort(void) {
73 void interrupt_handler_fiq(void) {