From: Nathael Pajani Date: Wed, 22 Jul 2015 00:45:05 +0000 (+0200) Subject: Use the saved flags for intr reset. Do not erase possible other interrupt sources. X-Git-Url: http://git.techno-innov.fr/?a=commitdiff_plain;h=6426fa7ed6af242f05bca44180212cf4c006e477;p=soft%2Flpc122x%2Fcore Use the saved flags for intr reset. Do not erase possible other interrupt sources. --- 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);