diff --git a/cores/nRF5/usb/usb.c b/cores/nRF5/usb/usb.c index e6ea31e3..07adb3f2 100644 --- a/cores/nRF5/usb/usb.c +++ b/cores/nRF5/usb/usb.c @@ -63,6 +63,8 @@ void usb_init(void) nrfx_power_usbevt_enable(); + NVIC_SetPriority(USBD_IRQn, 2); + // USB power may already be ready at this time -> no event generated // We need to invoke the handler based on the status initially uint32_t usb_reg = NRF_POWER->USBREGSTATUS; diff --git a/libraries/Bluefruit52Lib/src/bluefruit.h b/libraries/Bluefruit52Lib/src/bluefruit.h index 21331be3..443a819c 100644 --- a/libraries/Bluefruit52Lib/src/bluefruit.h +++ b/libraries/Bluefruit52Lib/src/bluefruit.h @@ -147,6 +147,11 @@ class AdafruitBluefruit bool setApperance (uint16_t appear); uint16_t getApperance (void); + ble_gap_sec_params_t getSecureParam(void) + { + return _sec_param; + } + void autoConnLed (bool enabled); void setConnLedInterval (uint32_t ms); @@ -200,6 +205,8 @@ class AdafruitBluefruit int8_t _tx_power; + ble_gap_sec_params_t _sec_param; + SemaphoreHandle_t _ble_event_sem; SemaphoreHandle_t _soc_event_sem;