Merge pull request #32 from jpbrucker/dynamic_clksrc

Select the clock source dynamically on SoftDevice initialisation
This commit is contained in:
Rohit Grover 2015-08-05 12:35:28 +01:00
commit 27cd45a37c

View file

@ -52,11 +52,10 @@ static void sys_evt_dispatch(uint32_t sys_evt)
error_t btle_init(void)
{
#if defined(TARGET_DELTA_DFCM_NNN40) || defined(TARGET_HRM1017)
SOFTDEVICE_HANDLER_INIT(NRF_CLOCK_LFCLKSRC_RC_250_PPM_4000MS_CALIBRATION, NULL);
#else
SOFTDEVICE_HANDLER_INIT(NRF_CLOCK_LFCLKSRC_XTAL_20_PPM, NULL);
#endif
if (NRF_CLOCK->LFCLKSRC & (CLOCK_LFCLKSRC_SRC_Xtal << CLOCK_LFCLKSRC_SRC_Pos))
SOFTDEVICE_HANDLER_INIT(NRF_CLOCK_LFCLKSRC_XTAL_20_PPM, NULL);
else
SOFTDEVICE_HANDLER_INIT(NRF_CLOCK_LFCLKSRC_RC_250_PPM_4000MS_CALIBRATION, NULL);
// Enable BLE stack
/**