You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by we...@apache.org on 2016/09/30 23:26:02 UTC

incubator-mynewt-core git commit: MYNEWT-401: HAL Timer API

Repository: incubator-mynewt-core
Updated Branches:
  refs/heads/develop 2fce544c9 -> 3fabc8a1f


MYNEWT-401: HAL Timer API

Fix broken builds when no timer is configured.


Project: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/commit/3fabc8a1
Tree: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/tree/3fabc8a1
Diff: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/diff/3fabc8a1

Branch: refs/heads/develop
Commit: 3fabc8a1ffb2dccabb35f19664d2c72a45627831
Parents: 2fce544
Author: William San Filippo <wi...@runtime.io>
Authored: Fri Sep 30 16:11:55 2016 -0700
Committer: William San Filippo <wi...@runtime.io>
Committed: Fri Sep 30 16:11:55 2016 -0700

----------------------------------------------------------------------
 hw/mcu/nordic/nrf52xxx/src/hal_timer.c | 3 +++
 1 file changed, 3 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/3fabc8a1/hw/mcu/nordic/nrf52xxx/src/hal_timer.c
----------------------------------------------------------------------
diff --git a/hw/mcu/nordic/nrf52xxx/src/hal_timer.c b/hw/mcu/nordic/nrf52xxx/src/hal_timer.c
index b89f664..8581142 100644
--- a/hw/mcu/nordic/nrf52xxx/src/hal_timer.c
+++ b/hw/mcu/nordic/nrf52xxx/src/hal_timer.c
@@ -164,6 +164,8 @@ nrf_timer_disable_ocmp(NRF_TIMER_Type *hwtimer)
     hwtimer->INTENCLR = NRF_TIMER_INT_MASK(NRF_TIMER_CC_INT);
 }
 
+#if (MYNEWT_VAL(TIMER_0) || MYNEWT_VAL(TIMER_1) || MYNEWT_VAL(TIMER_2) || \
+     MYNEWT_VAL(TIMER_3) || MYNEWT_VAL(TIMER_4))
 /**
  * hal timer chk queue
  *
@@ -199,6 +201,7 @@ hal_timer_chk_queue(struct nrf52_hal_timer *bsptimer)
     }
     __HAL_ENABLE_INTERRUPTS(ctx);
 }
+#endif
 
 /**
  * hal timer irq handler