From: hackbard Date: Thu, 20 Sep 2007 12:57:57 +0000 (+0200) Subject: basic interrupt functions implemented X-Git-Url: https://hackdaworld.org/gitweb/?a=commitdiff_plain;h=26e5d8a9fcb9ff98019259619d7256a50220b8e9;p=my-code%2Farm.git basic interrupt functions implemented --- diff --git a/betty/interrupts.c b/betty/interrupts.c index 5327588..a96cc2f 100644 --- a/betty/interrupts.c +++ b/betty/interrupts.c @@ -7,27 +7,74 @@ #include "interrupts.h" +/* + * module static interrupt variable + */ + +static t_interrupt interrupt; + /* * functions */ +void interrupt_init(void) { + + memset(&interrupt,0,sizeof(t_interrupt)); + VICSoftIntClear=0xff; + VICIntEnClear=0xff; + VICDefVectAddr=0; +} + void interrupt_set_default_callback(void *callback) { VICDefVectAddr=(u32)callback; - } +void interrupt_set_soft_callback(void (*callback)(void)) { + + interrupt->default_soft_callback=callback; +} + +void interrupt_soft_clear(u8 src_number) { + + VICSoftIntClear=(1<