Skip to content

Commit 9a2f138

Browse files
committed
move Adafruit_TinyUSB_Core_init() inside loop() task
1 parent 81a78d7 commit 9a2f138

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

cores/nRF5/main.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,10 @@ static void loop_task(void* arg)
4444
{
4545
(void) arg;
4646

47+
#ifdef USE_TINYUSB
48+
Adafruit_TinyUSB_Core_init();
49+
#endif
50+
4751
#if CFG_DEBUG
4852
// If Serial is not begin(), call it to avoid hard fault
4953
if(!Serial) Serial.begin(115200);
@@ -82,10 +86,6 @@ int main( void )
8286
// Initialize callback task
8387
ada_callback_init(CALLBACK_STACK_SZ);
8488

85-
#ifdef USE_TINYUSB
86-
Adafruit_TinyUSB_Core_init();
87-
#endif
88-
8989
// Start FreeRTOS scheduler.
9090
vTaskStartScheduler();
9191

0 commit comments

Comments
 (0)