nordic

Fork of nRF51822 by Nordic Semiconductor

Revision:
431:db7edc9ad0bc
Parent:
430:bff56e081b6e
Child:
432:95158d6d493f
--- a/source/btle/btle.cpp	Fri Sep 25 15:26:39 2015 +0100
+++ b/source/btle/btle.cpp	Fri Sep 25 15:26:40 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
     /**
@@ -107,7 +109,9 @@
 
     dm_ble_evt_handler(p_ble_evt);
 
+#if !defined(MCU_NORDIC_16K_S110) && !defined(MCU_NORDIC_32K_S110)
     bleGattcEventHandler(p_ble_evt);
+#endif
 
     /* Custom event handler */
     switch (p_ble_evt->header.evt_id) {