From f7a78073e8df7b114d34da23905733221d14d78a Mon Sep 17 00:00:00 2001 From: Rohit Grover Date: Wed, 7 Jan 2015 12:38:17 +0000 Subject: [PATCH] add 1 to the scheduler-op pool to allow deleting a timer whilst in its handler. Please note that this commit goes with another recent commit to the nRF51822 repository which updated values under projectconfig.h. Please remember to update nRF51822 as well. This has a bearing on issue #832. --- .../targets/hal/TARGET_NORDIC/TARGET_MCU_NRF51822/us_ticker.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libraries/mbed/targets/hal/TARGET_NORDIC/TARGET_MCU_NRF51822/us_ticker.c b/libraries/mbed/targets/hal/TARGET_NORDIC/TARGET_MCU_NRF51822/us_ticker.c index 1ac290aaba..4834db308d 100644 --- a/libraries/mbed/targets/hal/TARGET_NORDIC/TARGET_MCU_NRF51822/us_ticker.c +++ b/libraries/mbed/targets/hal/TARGET_NORDIC/TARGET_MCU_NRF51822/us_ticker.c @@ -18,6 +18,7 @@ #include "cmsis.h" #include "PeripheralNames.h" #include "app_timer.h" +#include "projectconfig.h" static bool us_ticker_inited = false; static volatile bool us_ticker_appTimerRunning = false; @@ -29,7 +30,7 @@ void us_ticker_init(void) return; } - APP_TIMER_INIT(0 /*CFG_TIMER_PRESCALER*/ , 1 /*CFG_TIMER_MAX_INSTANCE*/, 1 /*CFG_TIMER_OPERATION_QUEUE_SIZE*/, false /*CFG_SCHEDULER_ENABLE*/); + APP_TIMER_INIT(CFG_TIMER_PRESCALER, CFG_TIMER_MAX_INSTANCE, CFG_TIMER_OPERATION_QUEUE_SIZE, CFG_SCHEDULER_ENABLE); us_ticker_inited = true; }