@@ -162,6 +162,7 @@ AdafruitBluefruit::AdafruitBluefruit(void)
162
162
163
163
_ble_event_sem = NULL ;
164
164
_soc_event_sem = NULL ;
165
+ _mprot_event_sem = NULL ;
165
166
166
167
_led_blink_th = NULL ;
167
168
_led_conn = true ;
@@ -310,7 +311,15 @@ bool AdafruitBluefruit::begin(uint8_t prph_count, uint8_t central_count)
310
311
#error Clock Source is not configured, define USE_LFXO or USE_LFRC according to your board in variant.h
311
312
#endif
312
313
314
+ /* ------------------------------------------------------------------*/
315
+ /* BLE only Softdevices have 2-args sd_softdevice_enable()
316
+ /* BLE & ANT+ Softdevices have 3-args sd_softdevice_enable()
317
+ /*------------------------------------------------------------------*/
318
+ #ifdef ANT_LICENSE_KEY
319
+ VERIFY_STATUS ( sd_softdevice_enable (&clock_cfg, nrf_error_cb, ANT_LICENSE_KEY), false );
320
+ #else // #ifdef ANT_LICENSE_KEY
313
321
VERIFY_STATUS ( sd_softdevice_enable (&clock_cfg, nrf_error_cb), false );
322
+ #endif // #ifdef ANT_LICENSE_KEY
314
323
315
324
#ifdef USE_TINYUSB
316
325
usb_softdevice_post_enable ();
@@ -676,6 +685,8 @@ void SD_EVT_IRQHandler(void)
676
685
// Notify both BLE & SOC Task
677
686
xSemaphoreGiveFromISR (Bluefruit._soc_event_sem , NULL );
678
687
xSemaphoreGiveFromISR (Bluefruit._ble_event_sem , NULL );
688
+ // Notify parallel multiprotocol Task, if any
689
+ if (Bluefruit._mprot_event_sem !=NULL ) xSemaphoreGiveFromISR (*Bluefruit._mprot_event_sem , NULL );
679
690
}
680
691
681
692
/* *
0 commit comments