return INTERRUPT_SET;
}
+int interrupt_change_callback(u8 src_number,u32 callback) {
+
+ int i;
+ u32 *addr,*cntl;
+
+ cntl=(u32 *)&VICVectCntl0;
+ addr=(u32 *)&VICVectAddr0;
+
+ i=0;
+ while(i<INTERRUPT_MAX_VIC) {
+ if((*cntl&0x1f)==src_number) {
+ *(addr+i)=callback;
+ return INTERRUPT_CALLBACK_CHANGED;
+ }
+ i++;
+ }
+
+ return INTERRUPT_SRC_NOT_USED;
+}
+
void interrupt_ext_ir_config(u8 eint,u8 wakeup,u8 mode,u8 polarity) {
if(eint>3)
EXTMODE=(EXTMODE&0xf)|(mode<<eint);
EXTPOLAR=(EXTPOLAR&0xf)|(polarity<<eint);
- EXTINT=(EXTINT&0xf)|(1<<eint);
+}
+
+void interrupt_ext_ir_set(u8 eint) {
+
+ if(eint>3)
+ return;
+
+ EXTINT=(1<<eint);
+}
+
+void interrupt_ack(void) {
+
+ VICVectAddr=0;
}
/*