File tree Expand file tree Collapse file tree 2 files changed +11
-13
lines changed
Expand file tree Collapse file tree 2 files changed +11
-13
lines changed Original file line number Diff line number Diff line change @@ -100,19 +100,6 @@ uint8_t Adafruit_USBD_Device::getSerialDescriptor(uint16_t* serial_str)
100100 return sizeof (raw_id)*2 ;
101101}
102102
103-
104- extern " C"
105- {
106-
107- // running tinyusb background task if yield()
108- void yield (void )
109- {
110- tud_task ();
111- tud_cdc_write_flush ();
112- }
113-
114- }
115-
116103// --------------------------------------------------------------------+
117104// Helpers
118105// --------------------------------------------------------------------+
Original file line number Diff line number Diff line change @@ -59,3 +59,14 @@ int main( void )
5959
6060 return 0 ;
6161}
62+
63+ #if defined(USE_TINYUSB)
64+
65+ // run TinyUSB background task when yield()
66+ extern " C" void yield (void )
67+ {
68+ tud_task ();
69+ tud_cdc_write_flush ();
70+ }
71+
72+ #endif
You can’t perform that action at this time.
0 commit comments