@@ -162,7 +162,9 @@ AdafruitBluefruit::AdafruitBluefruit(void)
162162
163163 _ble_event_sem = NULL ;
164164 _soc_event_sem = NULL ;
165- _mprot_event_sem = NULL ;
165+ #ifdef ANT_LICENSE_KEY
166+ _mprot_event_sem = NULL ; // additiona semaphore for multiprotocol
167+ #endif
166168
167169 _led_blink_th = NULL ;
168170 _led_conn = true ;
@@ -311,11 +313,11 @@ bool AdafruitBluefruit::begin(uint8_t prph_count, uint8_t central_count)
311313 #error Clock Source is not configured, define USE_LFXO or USE_LFRC according to your board in variant.h
312314#endif
313315
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
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
319321 VERIFY_STATUS ( sd_softdevice_enable (&clock_cfg, nrf_error_cb, ANT_LICENSE_KEY), false );
320322#else // #ifdef ANT_LICENSE_KEY
321323 VERIFY_STATUS ( sd_softdevice_enable (&clock_cfg, nrf_error_cb), false );
@@ -685,8 +687,10 @@ void SD_EVT_IRQHandler(void)
685687 // Notify both BLE & SOC Task
686688 xSemaphoreGiveFromISR (Bluefruit._soc_event_sem , NULL );
687689 xSemaphoreGiveFromISR (Bluefruit._ble_event_sem , NULL );
690+ #ifdef ANT_LICENSE_KEY
688691 // Notify parallel multiprotocol Task, if any
689- if (Bluefruit._mprot_event_sem !=NULL ) xSemaphoreGiveFromISR (*Bluefruit._mprot_event_sem , NULL );
692+ if (Bluefruit._mprot_event_sem ) xSemaphoreGiveFromISR (Bluefruit._mprot_event_sem , NULL );
693+ #endif
690694}
691695
692696/* *
0 commit comments