From 03ab525652226705b4d3eeb7f47608bf0876f88e Mon Sep 17 00:00:00 2001 From: David Kopf Date: Sat, 13 Aug 2011 11:35:03 -0400 Subject: [PATCH] Option for nested rtimer interrupts --- cpu/avr/rtimer-arch.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/cpu/avr/rtimer-arch.c b/cpu/avr/rtimer-arch.c index d5cec6d17..d30bfdb7b 100644 --- a/cpu/avr/rtimer-arch.c +++ b/cpu/avr/rtimer-arch.c @@ -82,9 +82,16 @@ ISR (TIMER3_COMPA_vect) { ENERGEST_ON(ENERGEST_TYPE_IRQ); + /* Disable rtimer interrupts */ ETIMSK &= ~((1 << OCIE3A) | (1 << OCIE3B) | (1 << TOIE3) | (1 << TICIE3) | (1 << OCIE3C)); +#if RTIMER_CONF_NESTED_INTERRUPTS + /* Enable nested interrupts. Allows radio interrupt during rtimer interrupt. */ + /* All interrupts are enabled including recursive rtimer, so use with caution */ + sei(); +#endif + /* Call rtimer callback */ rtimer_run_next();