2009-04-21 00:38:45 +02:00
|
|
|
#include "embedded_types.h"
|
2009-04-22 20:55:40 +02:00
|
|
|
//#include "interrupt-utils.h"
|
2009-04-21 00:38:45 +02:00
|
|
|
#include "isr.h"
|
|
|
|
|
|
|
|
#define reg32(x) (*(volatile uint32_t *)(x))
|
|
|
|
|
2009-04-22 20:55:40 +02:00
|
|
|
//__attribute__ ((interrupt("IRQ")))
|
2009-04-21 00:38:45 +02:00
|
|
|
void isr(void)
|
|
|
|
{
|
|
|
|
// ISR_ENTRY();
|
|
|
|
/* check for TMR0 interrupt */
|
2009-04-22 20:55:40 +02:00
|
|
|
tmr_isr(); // led turns off if I have this, indicating that the isr does jump to tmr_isr
|
2009-04-21 00:38:45 +02:00
|
|
|
// 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 :( */
|
|
|
|
|
2009-04-22 20:55:40 +02:00
|
|
|
// asm("ldmfd sp!, {r0-r12,lr}");
|
|
|
|
// enableIRQ();
|
2009-04-21 00:38:45 +02:00
|
|
|
}
|