diff options
| author | Dan Halbert <halbert@halwitz.org> | 2018-07-13 09:47:03 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-07-13 09:47:03 -0400 |
| commit | 2f877bd8510c5650b5517e5f1920fb2a155132d3 (patch) | |
| tree | 7b303205a72808c0ea5b81eb211ace03a4ac1858 | |
| parent | 75f48a5bc7a4695bddd16cce0e2176bd809aaf5c (diff) | |
| parent | 9729fc3d3133c36d8d6100a9a1df9b3d21389481 (diff) | |
Merge pull request #1022 from arturo182/nrf_usb_ble
nrf: Fix BLE on nRF52840 after adding the USB functionality
| -rw-r--r-- | ports/nrf/drivers/bluetooth/ble_drv.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/ports/nrf/drivers/bluetooth/ble_drv.c b/ports/nrf/drivers/bluetooth/ble_drv.c index 8200dec2e..28d728d71 100644 --- a/ports/nrf/drivers/bluetooth/ble_drv.c +++ b/ports/nrf/drivers/bluetooth/ble_drv.c @@ -30,12 +30,15 @@ #include <string.h> #include <stdbool.h> +#if (BLUETOOTH_SD == 132) #define NRF52 // Needed for SD132 v2 +#endif #include "py/runtime.h" #include "ble_drv.h" #include "mpconfigport.h" #include "nrf_sdm.h" +#include "nrfx_power.h" #include "ble_gap.h" #include "ble.h" // sd_ble_uuid_encode @@ -142,6 +145,12 @@ uint32_t ble_drv_stack_enable(void) { #endif }; #endif + +#if (BLUETOOTH_SD == 140) + // The SD takes over the POWER IRQ and will fail if the IRQ is already in use + nrfx_power_uninit(); +#endif + uint32_t err_code = sd_softdevice_enable(&clock_config, softdevice_assert_handler); |
