From dda23b5d62a3e948f7fb9be28b33fe7d3c473ebd Mon Sep 17 00:00:00 2001 From: batt Date: Thu, 15 Nov 2007 22:59:08 +0000 Subject: [PATCH] Revert wrong commit. git-svn-id: https://src.develer.com/svnoss/bertos/trunk@1000 38d2e660-2303-0410-9eaa-f027e97ec537 --- cpu/arm/drv/sysirq_at91.c | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/cpu/arm/drv/sysirq_at91.c b/cpu/arm/drv/sysirq_at91.c index 7b12af2d..33e6b0cd 100644 --- a/cpu/arm/drv/sysirq_at91.c +++ b/cpu/arm/drv/sysirq_at91.c @@ -98,14 +98,12 @@ static void sysirq_dispatcher(void) __attribute__ ((naked)); static void sysirq_dispatcher(void) { IRQ_ENTRY(); - - /* PIT */ - if ((PIT_MR & BV(PITIEN)) - && (PIT_SR & BV(PITS)) - && sysirq_tab[SYSIRQ_PIT].handler) - sysirq_tab[SYSIRQ_PIT].handler(); - - /* TODO: add other system sources here */ + for (unsigned i = 0; i < countof(sysirq_tab); i++) + { + if (sysirq_tab[i].enabled + && sysirq_tab[i].handler) + sysirq_tab[i].handler(); + } IRQ_EXIT(); } @@ -125,8 +123,8 @@ void sysirq_init(void) IRQ_SAVE_DISABLE(flags); /* Disable all system interrupts */ - PIT_MR &= BV(PITIEN); - /* TODO: add other system sources here */ + for (unsigned i = 0; i < countof(sysirq_tab); i++) + sysirq_tab[i].setEnable(false); /* Set the vector. */ AIC_SVR(SYSC_ID) = sysirq_dispatcher; -- 2.25.1