Skip to content

Commit 217fe38

Browse files
committed
move yield() usb background in to TinyUSB Core
1 parent a75a324 commit 217fe38

File tree

2 files changed

+13
-9
lines changed

2 files changed

+13
-9
lines changed

cores/arduino/Adafruit_TinyUSB_Core/Adafruit_TinyUSB_Core.cpp

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,4 +130,17 @@ void Adafruit_TinyUSB_Core_touch1200(void)
130130
initiateReset(250);
131131
}
132132

133+
134+
extern "C"
135+
{
136+
137+
void yield(void)
138+
139+
{
140+
tud_task();
141+
tud_cdc_write_flush();
142+
}
143+
144+
}
145+
133146
#endif // USE_TINYUSB

cores/arduino/hooks.c

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -29,16 +29,7 @@ static void __empty() {
2929
// Empty
3030
}
3131

32-
#ifdef USE_TINYUSB
33-
#include "tusb.h"
34-
void yield(void)
35-
{
36-
tud_task();
37-
tud_cdc_write_flush();
38-
}
39-
#else
4032
void yield(void) __attribute__ ((weak, alias("__empty")));
41-
#endif
4233

4334
/**
4435
* SysTick hook

0 commit comments

Comments
 (0)