1

Fork of nRF51822 by Nordic Semiconductor

Files at this revision

API Documentation at this revision

Comitter:
rgrover1
Date:
Tue Aug 11 15:14:23 2015 +0100
Parent:
419:2656c0c1c9b5
Child:
421:154c11ae350e
Commit message:
Synchronized with git rev 1da1aa86
Author: Rohit Grover
fix #39: have a single call to SOFTDEVICE_HANDLER_INIT() to remove duplication of BLE_EVT_BUFFER.

Changed in this revision

source/btle/btle.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/source/btle/btle.cpp	Tue Aug 11 15:14:23 2015 +0100
+++ b/source/btle/btle.cpp	Tue Aug 11 15:14:23 2015 +0100
@@ -52,11 +52,13 @@
 
 error_t btle_init(void)
 {
+    nrf_clock_lfclksrc_t clockSource;
     if (NRF_CLOCK->LFCLKSRC & (CLOCK_LFCLKSRC_SRC_Xtal << CLOCK_LFCLKSRC_SRC_Pos)) {
-        SOFTDEVICE_HANDLER_INIT(NRF_CLOCK_LFCLKSRC_XTAL_20_PPM, NULL);
+        clockSource = NRF_CLOCK_LFCLKSRC_XTAL_20_PPM;
     } else {
-        SOFTDEVICE_HANDLER_INIT(NRF_CLOCK_LFCLKSRC_RC_250_PPM_4000MS_CALIBRATION, NULL);
+        clockSource = NRF_CLOCK_LFCLKSRC_RC_250_PPM_4000MS_CALIBRATION;
     }
+    SOFTDEVICE_HANDLER_INIT(clockSource, NULL);
 
     // Enable BLE stack
     /**