@@ -162,7 +162,9 @@ AdafruitBluefruit::AdafruitBluefruit(void)
162
162
163
163
_ble_event_sem = NULL ;
164
164
_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
166
168
167
169
_led_blink_th = NULL ;
168
170
_led_conn = true ;
@@ -311,11 +313,11 @@ bool AdafruitBluefruit::begin(uint8_t prph_count, uint8_t central_count)
311
313
#error Clock Source is not configured, define USE_LFXO or USE_LFRC according to your board in variant.h
312
314
#endif
313
315
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
319
321
VERIFY_STATUS ( sd_softdevice_enable (&clock_cfg, nrf_error_cb, ANT_LICENSE_KEY), false );
320
322
#else // #ifdef ANT_LICENSE_KEY
321
323
VERIFY_STATUS ( sd_softdevice_enable (&clock_cfg, nrf_error_cb), false );
@@ -685,8 +687,10 @@ void SD_EVT_IRQHandler(void)
685
687
// Notify both BLE & SOC Task
686
688
xSemaphoreGiveFromISR (Bluefruit._soc_event_sem , NULL );
687
689
xSemaphoreGiveFromISR (Bluefruit._ble_event_sem , NULL );
690
+ #ifdef ANT_LICENSE_KEY
688
691
// 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
690
694
}
691
695
692
696
/* *
0 commit comments