/* * File : trap.c * This file is part of RT-Thread RTOS * COPYRIGHT (C) 2006, RT-Thread Development Team * * The license and distribution terms for this file may be * found in the file LICENSE in this distribution or at * http://openlab.rt-thread.com/license/LICENSE * * Change Logs: * Date Author Notes * 2006-09-06 XuXinming first version * 2006-09-15 Bernard add interrupt bank 0..3 for more effective * in irq trap */ #include #include "s3c44b0.h" #define MAX_HANDLERS 26 extern rt_uint32_t rt_interrupt_nest; /* exception and interrupt handler table */ rt_isr_handler_t isr_table[MAX_HANDLERS]; rt_uint32_t rt_interrupt_from_thread, rt_interrupt_to_thread; rt_uint32_t rt_thread_switch_interrput_flag; unsigned char interrupt_bank0[256]; unsigned char interrupt_bank1[256]; unsigned char interrupt_bank2[256]; unsigned char interrupt_bank3[256]; /** * @addtogroup S3C44B0 */ /*@{*/ void rt_hw_interrupt_handle(int vector) { rt_kprintf("Unhandled interrupt %d occured!!!\n", vector); } /** * This function will initialize hardware interrupt */ void rt_hw_interrupt_init() { register int i; /* all interrupt disabled include global bit */ INTMSK = 0x07ffffff; /* clear pending register */ I_ISPC = 0x03ffffff; /* non-vector mode IRQ enable */ INTCON = 0x5; /* all IRQ mode */ INTMOD = 0x0; /* init exceptions table */ for(i=0; i