Skip to content

Commit 30d0738

Browse files
committed
sync with tinyusb lib latest change
1 parent 704450c commit 30d0738

File tree

4 files changed

+13
-7
lines changed

4 files changed

+13
-7
lines changed

cores/arduino/Arduino.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,6 @@ void loop( void ) ;
152152
#ifdef USE_TINYUSB
153153
#ifdef __cplusplus
154154
// Needed for declaring Serial
155-
#include "Adafruit_USBD_Interface.h"
156155
#include "Adafruit_USBD_CDC.h"
157156
#endif
158157
#else

cores/arduino/delay.c

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,18 @@ void SysTick_DefaultHandler(void)
117117
tickReset();
118118
}
119119

120+
#if defined(USE_TINYUSB)
121+
122+
#include "Adafruit_TinyUSB_API.h"
123+
124+
// run TinyUSB background task when yield()
125+
void yield(void)
126+
{
127+
TinyUSB_Device_Task();
128+
}
129+
130+
#endif
131+
120132
#ifdef __cplusplus
121133
}
122134
#endif

cores/arduino/main.cpp

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,6 @@
2424
void initVariant() __attribute__((weak));
2525
void initVariant() { }
2626

27-
#ifdef USE_TINYUSB
28-
// Called by main.cpp to initialize usb device typically with CDC device for Serial
29-
void TinyUSB_Device_Init(uint8_t rhport) __attribute__((weak));
30-
#endif
31-
3227
// Initialize C library
3328
extern "C" void __libc_init_array(void);
3429

0 commit comments

Comments
 (0)