|
54 | 54 | #define CFG_SOC_TASK_STACKSIZE (200) |
55 | 55 | #endif |
56 | 56 |
|
57 | | -#ifdef USBCON |
| 57 | +#ifdef USE_TINYUSB |
58 | 58 | #include "nrfx_power.h" |
59 | 59 |
|
60 | 60 | /* tinyusb function that handles power event (detected, ready, removed) |
@@ -290,7 +290,7 @@ bool AdafruitBluefruit::begin(uint8_t prph_count, uint8_t central_count) |
290 | 290 | _prph_count = prph_count; |
291 | 291 | _central_count = central_count; |
292 | 292 |
|
293 | | -#ifdef USBCON |
| 293 | +#ifdef USE_TINYUSB |
294 | 294 | usb_softdevice_pre_enable(); |
295 | 295 | #endif |
296 | 296 |
|
@@ -319,7 +319,7 @@ bool AdafruitBluefruit::begin(uint8_t prph_count, uint8_t central_count) |
319 | 319 |
|
320 | 320 | VERIFY_STATUS( sd_softdevice_enable(&clock_cfg, nrf_error_cb), false ); |
321 | 321 |
|
322 | | -#ifdef USBCON |
| 322 | +#ifdef USE_TINYUSB |
323 | 323 | usb_softdevice_post_enable(); |
324 | 324 | #endif |
325 | 325 |
|
@@ -461,7 +461,7 @@ bool AdafruitBluefruit::begin(uint8_t prph_count, uint8_t central_count) |
461 | 461 | VERIFY_STATUS(sd_ble_gap_device_name_set(&sec_mode, (uint8_t const *) CFG_DEFAULT_NAME, strlen(CFG_DEFAULT_NAME)), false); |
462 | 462 |
|
463 | 463 | //------------- USB -------------// |
464 | | -#ifdef USBCON |
| 464 | +#ifdef USE_TINYUSB |
465 | 465 | sd_power_usbdetected_enable(true); |
466 | 466 | sd_power_usbpwrrdy_enable(true); |
467 | 467 | sd_power_usbremoved_enable(true); |
@@ -713,7 +713,7 @@ void adafruit_soc_task(void* arg) |
713 | 713 | if ( flash_nrf5x_event_cb ) flash_nrf5x_event_cb(soc_evt); |
714 | 714 | break; |
715 | 715 |
|
716 | | - #ifdef USBCON |
| 716 | + #ifdef USE_TINYUSB |
717 | 717 | /*------------- usb power event handler -------------*/ |
718 | 718 | case NRF_EVT_POWER_USB_DETECTED: |
719 | 719 | case NRF_EVT_POWER_USB_POWER_READY: |
|
0 commit comments