diff --git a/src/generic/timer.c b/src/generic/timer_irq.c similarity index 98% rename from src/generic/timer.c rename to src/generic/timer_irq.c index fba56051..a0587a72 100644 --- a/src/generic/timer.c +++ b/src/generic/timer_irq.c @@ -7,6 +7,7 @@ #include "autoconf.h" // CONFIG_CLOCK_FREQ #include "board/irq.h" // irq_disable #include "board/misc.h" // timer_from_us +#include "board/timer_irq.h" // timer_dispatch_many #include "command.h" // shutdown #include "sched.h" // sched_timer_kick diff --git a/src/generic/timer_irq.h b/src/generic/timer_irq.h new file mode 100644 index 00000000..0421c98c --- /dev/null +++ b/src/generic/timer_irq.h @@ -0,0 +1,6 @@ +#ifndef __GENERIC_TIMER_IRQ_H +#define __GENERIC_TIMER_IRQ_H + +void timer_dispatch_many(void); + +#endif // timer_irq.h diff --git a/src/sam3x8e/Makefile b/src/sam3x8e/Makefile index d8e63c0c..16f300ac 100644 --- a/src/sam3x8e/Makefile +++ b/src/sam3x8e/Makefile @@ -16,7 +16,7 @@ LDFLAGS-y += --specs=nano.specs --specs=nosys.specs # Add source files src-y += sam3x8e/main.c sam3x8e/timer.c sam3x8e/gpio.c -src-y += generic/crc16_ccitt.c generic/armcm_irq.c generic/timer.c +src-y += generic/crc16_ccitt.c generic/armcm_irq.c generic/timer_irq.c src-y += ../lib/cmsis-sam3x8e/source/system_sam3xa.c src-y += ../lib/cmsis-sam3x8e/source/gcc/startup_sam3xa.c src-$(CONFIG_SERIAL) += sam3x8e/serial.c diff --git a/src/sam3x8e/timer.c b/src/sam3x8e/timer.c index dcc8dbd2..d156588a 100644 --- a/src/sam3x8e/timer.c +++ b/src/sam3x8e/timer.c @@ -6,13 +6,11 @@ #include "board/irq.h" // irq_disable #include "board/misc.h" // timer_read_time +#include "board/timer_irq.h" // timer_dispatch_many #include "command.h" // DECL_SHUTDOWN #include "sam3x8e.h" // TC0 #include "sched.h" // sched_timer_kick -// From generic/timer.c -extern void timer_dispatch_many(void); - // IRQ handler void __visible TC0_Handler(void)