@@ -162,6 +162,9 @@ AdafruitBluefruit::AdafruitBluefruit(void)
162162
163163 _ble_event_sem = NULL ;
164164 _soc_event_sem = NULL ;
165+ #ifdef ANT_LICENSE_KEY
166+ _mprot_event_sem = NULL ; // additiona semaphore for multiprotocol
167+ #endif
165168
166169 _led_blink_th = NULL ;
167170 _led_conn = true ;
@@ -310,7 +313,15 @@ bool AdafruitBluefruit::begin(uint8_t prph_count, uint8_t central_count)
310313 #error Clock Source is not configured, define USE_LFXO or USE_LFRC according to your board in variant.h
311314#endif
312315
316+ /* ------------------------------------------------------------------
317+ ** BLE only Softdevices have 2-args sd_softdevice_enable()
318+ ** BLE & ANT+ Softdevices have 3-args sd_softdevice_enable()
319+ */
320+ #ifdef ANT_LICENSE_KEY
321+ VERIFY_STATUS ( sd_softdevice_enable (&clock_cfg, nrf_error_cb, ANT_LICENSE_KEY), false );
322+ #else // #ifdef ANT_LICENSE_KEY
313323 VERIFY_STATUS ( sd_softdevice_enable (&clock_cfg, nrf_error_cb), false );
324+ #endif // #ifdef ANT_LICENSE_KEY
314325
315326#ifdef USE_TINYUSB
316327 usb_softdevice_post_enable ();
@@ -676,6 +687,10 @@ void SD_EVT_IRQHandler(void)
676687 // Notify both BLE & SOC Task
677688 xSemaphoreGiveFromISR (Bluefruit._soc_event_sem , NULL );
678689 xSemaphoreGiveFromISR (Bluefruit._ble_event_sem , NULL );
690+ #ifdef ANT_LICENSE_KEY
691+ // Notify parallel multiprotocol Task, if any
692+ if (Bluefruit._mprot_event_sem ) xSemaphoreGiveFromISR (Bluefruit._mprot_event_sem , NULL );
693+ #endif
679694}
680695
681696/* *
0 commit comments