@@ -168,19 +168,6 @@ err_t AdafruitBluefruit::begin(bool prph_enable, bool central_enable)
168168
169169 VERIFY_STATUS ( sd_ble_enable (¶ms, &app_ram_base) );
170170
171- #if 0
172- // Configure Radio inactive interrupt to use with hardtime-critical function
173- // such as Neopixel show()
174- s_radio_inactive_sem = xSemaphoreCreateBinary();
175- VERIFY(s_radio_inactive_sem, NRF_ERROR_NO_MEM);
176-
177- NVIC_ClearPendingIRQ(RADIO_NOTIFICATION_IRQn);
178- NVIC_SetPriority(SD_EVT_IRQn, 7);
179- // NVIC_EnableIRQ(RADIO_NOTIFICATION_IRQn);
180-
181- VERIFY_STATUS( sd_radio_notification_cfg_set(NRF_RADIO_NOTIFICATION_TYPE_INT_ON_INACTIVE, 0) );
182- #endif
183-
184171 /* ------------- Configure GAP -------------*/
185172
186173 // Peripheral Preferred Connection Parameters
@@ -392,30 +379,6 @@ void AdafruitBluefruit::stopConnLed(void)
392379/* ------------------------------------------------------------------*/
393380/* Thread & SoftDevice Event handler
394381 *------------------------------------------------------------------*/
395- #if 0
396- void RADIO_NOTIFICATION_IRQHandler(void)
397- {
398- // PRINT_LOCATION();
399- xSemaphoreGiveFromISR(s_radio_inactive_sem, NULL);
400- }
401-
402- void waitForRadioInactive(void)
403- {
404- // bool radio_inactive = xSemaphoreTake(s_radio_inactive_sem, 0);
405- // PRINT_INT(radio_inactive);
406-
407- // NVIC_ClearPendingIRQ(RADIO_NOTIFICATION_IRQn);
408- // NVIC_EnableIRQ(RADIO_NOTIFICATION_IRQn);
409-
410- // // wait forever
411- // delay(100);
412- // radio_inactive = xSemaphoreTake(s_radio_inactive_sem, 0);
413- //
414- // PRINT_INT(radio_inactive);
415- // NVIC_DisableIRQ(RADIO_NOTIFICATION_IRQn);
416- }
417- #endif
418-
419382void SD_EVT_IRQHandler (void )
420383{
421384 // Notify both BLE & SOC Task
@@ -492,10 +455,7 @@ void AdafruitBluefruit::_ble_handler(void)
492455 if ( ERROR_NONE == err)
493456 {
494457 #if CFG_DEBUG
495- Serial.print (" [BLE]: " );
496- if ( dbg_ble_event_str (evt->header .evt_id ) ) Serial.print (dbg_ble_event_str (evt->header .evt_id ));
497- else Serial.printf (" 0x04X" , evt->header .evt_id );
498- Serial.println ();
458+ Serial.printf (" [BLE]: %s\n " , dbg_ble_event_str (evt->header .evt_id ));
499459 #endif
500460
501461 switch ( evt->header .evt_id )
0 commit comments