using weak links for individual isrs

This commit is contained in:
Mariano Alvira 2009-04-24 16:04:04 -04:00
parent 2288c9e2ff
commit d869766664
12 changed files with 6 additions and 27 deletions

View file

@ -10,13 +10,9 @@
#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);
extern void tmr_isr(void) __attribute__((weak));
#endif

View file

@ -10,7 +10,9 @@ void irq(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(tmr_isr != NULL) {
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

View file

@ -7,8 +7,6 @@
#include "embedded_types.h"
#include "isr.h"
no_isrs();
__attribute__ ((section ("startup")))
void main(void) {

View file

@ -7,8 +7,6 @@
#include "embedded_types.h"
#include "isr.h"
no_isrs();
__attribute__ ((section ("startup")))
void main(void) {

View file

@ -7,8 +7,6 @@
#include "embedded_types.h"
#include "isr.h"
no_isrs();
__attribute__ ((section ("startup"))) void main(void) {
*(volatile uint32_t *)GPIO_PAD_DIR0 = 0x00000100;

View file

@ -7,8 +7,6 @@
#include "embedded_types.h"
#include "isr.h"
no_isrs();
__attribute__ ((section ("startup")))
void main(void) {

View file

@ -31,8 +31,6 @@ const uint8_t hex[16]={'0','1','2','3','4','5','6','7',
#include "isr.h"
no_isrs();
#define NBYTES 1024
__attribute__ ((section ("startup")))
void main(void) {

View file

@ -14,6 +14,7 @@
#include "maca.h"
#include "embedded_types.h"
#include "isr.h"
#define reg(x) (*(volatile uint32_t *)(x))
@ -77,9 +78,6 @@ void toggle_led(void) {
}
}
#include "isr.h"
no_isrs();
__attribute__ ((section ("startup")))
void main(void) {
uint8_t c;

View file

@ -14,6 +14,7 @@
#include "maca.h"
#include "embedded_types.h"
#include "isr.h"
#define reg(x) (*(volatile uint32_t *)(x))
@ -112,9 +113,6 @@ void fill_data(void) {
}
}
#include "isr.h"
no_isrs();
__attribute__ ((section ("startup")))
void main(void) {
uint8_t c;

View file

@ -29,7 +29,6 @@ const uint8_t hex[16]={'0','1','2','3','4','5','6','7',
//#define DUMP_LEN 16
#include "isr.h"
no_isrs();
__attribute__ ((section ("startup")))
void main(void) {

View file

@ -47,9 +47,7 @@
#define reg16(x) (*(volatile uint16_t *)(x))
#include "embedded_types.h"
#include "isr.h"
no_isrs();
__attribute__ ((section ("startup")))
void main(void) {

View file

@ -10,9 +10,7 @@
#define UART1_BR 0x80005018
#include "embedded_types.h"
#include "isr.h"
no_isrs();
__attribute__ ((section ("startup")))
void main(void) {