move yield() usb background in to TinyUSB Core

This commit is contained in:
hathach 2019-05-22 09:02:24 +07:00
parent a75a324a4c
commit 217fe38647
2 changed files with 13 additions and 9 deletions

View file

@ -130,4 +130,17 @@ void Adafruit_TinyUSB_Core_touch1200(void)
initiateReset(250);
}
extern "C"
{
void yield(void)
{
tud_task();
tud_cdc_write_flush();
}
}
#endif // USE_TINYUSB

View file

@ -29,16 +29,7 @@ static void __empty() {
// Empty
}
#ifdef USE_TINYUSB
#include "tusb.h"
void yield(void)
{
tud_task();
tud_cdc_write_flush();
}
#else
void yield(void) __attribute__ ((weak, alias("__empty")));
#endif
/**
* SysTick hook