initial isr. has problems.

This commit is contained in:
Mariano Alvira 2009-04-20 18:38:45 -04:00
parent 09b15558a1
commit 10fdafbcb2
2 changed files with 42 additions and 0 deletions

20
src/isr.c Normal file
View file

@ -0,0 +1,20 @@
#include "embedded_types.h"
#include "interrupt-utils.h"
#include "isr.h"
#define reg32(x) (*(volatile uint32_t *)(x))
__attribute__ ((interrupt("IRQ")))
void isr(void)
{
// ISR_ENTRY();
/* check for TMR0 interrupt */
// tmr_isr(); // led turns off if I have this, indicating that the isr does jump to 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 :( */
}