osd-contiki/include/isr.h
Mariano Alvira bdbf279d0f tmr imts works. I'm not thrilled with how the interrupts and modes are
set... but I'm not sure what to do about it. The big problem is that I
have to be in user mode to service irqs, but I can't enable and
disable F and I in usermode. All I can do is an swi and then have
handler which lets me enable or disable them (like a mini-syscall).
2009-04-22 14:55:40 -04:00

23 lines
407 B
C

#ifndef ISR_H
#define ISR_H
#include "embedded_types.h"
#define INTBASE (0x80020000)
#define INTENNUM_OFF (0x8)
#define INTSRC_OFF (0x30)
#define INTENNUM INTBASE + INTENNUM_OFF
#define INTSRC INTBASE + INTSRC_OFF
#define no_isrs() no_tmr_isr();
#define enable_tmr_irq() *(volatile uint32_t *)(INTENNUM) = 5;
#define no_tmr_isr() void tmr_isr(void) { return; }
extern void tmr_isr(void);
#endif