Repository: incubator-mynewt-core Updated Branches: refs/heads/develop f3a848d40 -> 12b5170d0
nrf51-blenano; don't call os_cputime_init() unless TIMER_0 is set. 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/b83b0f3e Tree: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/tree/b83b0f3e Diff: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/diff/b83b0f3e Branch: refs/heads/develop Commit: b83b0f3e627599e2e301fe4b06cd8084fbc81d20 Parents: f3a848d Author: Marko Kiiskila <[email protected]> Authored: Wed Dec 28 13:15:19 2016 -0800 Committer: Marko Kiiskila <[email protected]> Committed: Wed Dec 28 13:15:48 2016 -0800 ---------------------------------------------------------------------- hw/bsp/nrf51-blenano/src/hal_bsp.c | 5 +++++ 1 file changed, 5 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/b83b0f3e/hw/bsp/nrf51-blenano/src/hal_bsp.c ---------------------------------------------------------------------- diff --git a/hw/bsp/nrf51-blenano/src/hal_bsp.c b/hw/bsp/nrf51-blenano/src/hal_bsp.c index c8eb15f..8350f9f 100644 --- a/hw/bsp/nrf51-blenano/src/hal_bsp.c +++ b/hw/bsp/nrf51-blenano/src/hal_bsp.c @@ -151,9 +151,14 @@ hal_bsp_init(void) assert(rc == 0); #endif + /* + * XXXX, depending on what timer OS_CPUTIME_TIMER_NUM is set to use. + */ +#if MYNEWT_VAL(TIMER_0) /* Set cputime to count at 1 usec increments */ rc = os_cputime_init(MYNEWT_VAL(CLOCK_FREQ)); assert(rc == 0); +#endif #if MYNEWT_VAL(SPI_0_MASTER) rc = hal_spi_init(0, (void *)&os_bsp_spi0m_cfg, HAL_SPI_TYPE_MASTER);
