Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of nRF51822 by
Diff: source/btle/btle.cpp
- Revision:
- 430:db7edc9ad0bc
- Parent:
- 429:bff56e081b6e
- Child:
- 431:95158d6d493f
diff -r bff56e081b6e -r db7edc9ad0bc source/btle/btle.cpp --- 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) {