nrf/drivers/bluetooth: Allow s132 to use LFCLK

This commit is contained in:
Ben Whitten 2017-06-09 10:23:27 +01:00 committed by glennrub
parent decb260890
commit 8326d777cc
1 changed files with 9 additions and 1 deletions

View File

@ -122,6 +122,14 @@ uint32_t ble_drv_stack_enable(void) {
uint32_t err_code = sd_softdevice_enable(NRF_CLOCK_LFCLKSRC_XTAL_20_PPM,
softdevice_assert_handler);
#endif // BLUETOOTH_LFCLK_RC
#else
#if BLUETOOTH_LFCLK_RC
nrf_clock_lf_cfg_t clock_config = {
.source = NRF_CLOCK_LF_SRC_RC,
.rc_ctiv = 16,
.rc_temp_ctiv = 2,
.xtal_accuracy = 0
};
#else
nrf_clock_lf_cfg_t clock_config = {
.source = NRF_CLOCK_LF_SRC_XTAL,
@ -129,7 +137,7 @@ uint32_t ble_drv_stack_enable(void) {
.rc_temp_ctiv = 0,
.xtal_accuracy = NRF_CLOCK_LF_XTAL_ACCURACY_20_PPM
};
#endif
uint32_t err_code = sd_softdevice_enable(&clock_config,
softdevice_assert_handler);
#endif