From: hackbard Date: Thu, 20 Sep 2007 13:00:29 +0000 (+0200) Subject: callback addr as u32 not a void ptr X-Git-Url: https://hackdaworld.org/gitweb/?a=commitdiff_plain;h=202c5cb4442b81aa5d0f7389b6dca62b2c121ac1;p=my-code%2Farm.git callback addr as u32 not a void ptr --- diff --git a/betty/interrupts.c b/betty/interrupts.c index a96cc2f..bb2344c 100644 --- a/betty/interrupts.c +++ b/betty/interrupts.c @@ -25,9 +25,9 @@ void interrupt_init(void) { VICDefVectAddr=0; } -void interrupt_set_default_callback(void *callback) { +void interrupt_set_default_callback(u32 callback_addr) { - VICDefVectAddr=(u32)callback; + VICDefVectAddr=callback_addr; } void interrupt_set_soft_callback(void (*callback)(void)) { diff --git a/betty/interrupts.h b/betty/interrupts.h index 4ddee8f..c1a4f04 100644 --- a/betty/interrupts.h +++ b/betty/interrupts.h @@ -55,10 +55,13 @@ typedef struct s_interrupt { /* function prototypes */ -void interrupt_set_default_callback(t_interrupt *ir,void *callback); - -void interrupt_ext_ir_conf(u8 pin,u8 mode,u8 polar, - void (*ext_ir_callback)(t_interrupt *ir)); +void interrupt_init(void); +void interrupt_set_default_callback(u32 callback_addr); +void interrupt_set_soft_callback(void (*callback)(void)); +void interrupt_soft_clear(u8 src_number); +void interrupt_clear(u8 src_number); +void interrupt_soft_enable(u8 src_number); +int interrupt_enable(u8 src_number,u8 mode,u8 priority,u32 callback_addr); void interrupt_handler_reset(void); void interrupt_handler_undef_instruction(void);