From 6426fa7ed6af242f05bca44180212cf4c006e477 Mon Sep 17 00:00:00 2001 From: Nathael Pajani Date: Wed, 22 Jul 2015 02:45:05 +0200 Subject: [PATCH] Use the saved flags for intr reset. Do not erase possible other interrupt sources. --- drivers/timers.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/timers.c b/drivers/timers.c index caf7e96..bf4529a 100644 --- a/drivers/timers.c +++ b/drivers/timers.c @@ -57,7 +57,7 @@ void TIMER_Handler(struct timer_device* timer) uint32_t intr_flags = regs->int_reg; /* Backup the flags */ /* Clear the interrupt */ - regs->int_reg = 0xFF; + regs->int_reg = intr_flags; /* And call the user routine if one has been registered */ if (timer->callback != NULL) { timer->callback(intr_flags); -- 2.43.0