This commit is contained in:
Mariano Alvira 2009-05-05 16:24:47 -04:00
parent d231cd0120
commit be410aceaf

View file

@ -1,5 +1,4 @@
#include "embedded_types.h" #include "embedded_types.h"
//#include "interrupt-utils.h"
#include "isr.h" #include "isr.h"
#define reg32(x) (*(volatile uint32_t *)(x)) #define reg32(x) (*(volatile uint32_t *)(x))
@ -8,18 +7,7 @@ __attribute__ ((section (".irq")))
__attribute__ ((interrupt("IRQ"))) __attribute__ ((interrupt("IRQ")))
void irq(void) void irq(void)
{ {
// ISR_ENTRY();
/* check for TMR0 interrupt */
if(tmr_isr != NULL) { if(tmr_isr != NULL) {
tmr_isr(); // led turns off if I have this, indicating that the isr does jump to tmr_isr tmr_isr();
} }
// if(reg32(INTSRC) & (1<<5)) { tmr_isr(); }
// asm("SUBS PC,R14_IRQ,#4")
// enableIRQ(); // I think this is necessary, but the LED never turns off when I have this
// ISR_EXIT(); // behavior doesn't change if I have this or not.
/* putting anything in here breaks the other code :( */
// asm("ldmfd sp!, {r0-r12,lr}");
// enableIRQ();
} }