diff --git a/targets/nrf5x/bluetooth.c b/targets/nrf5x/bluetooth.c index 4b442d5b48..b976c1f816 100644 --- a/targets/nrf5x/bluetooth.c +++ b/targets/nrf5x/bluetooth.c @@ -2442,7 +2442,11 @@ void jsble_kill() { uint32_t err_code; +#if NRF_SD_BLE_API_VERSION < 5 err_code = sd_softdevice_disable(); +#else + err_code = nrf_sdh_disable_request(); +#endif APP_ERROR_CHECK(err_code); }