move yield() to main.cpp
This commit is contained in:
parent
b92b61b36f
commit
4f8ccb165c
2 changed files with 11 additions and 13 deletions
|
|
@ -100,19 +100,6 @@ uint8_t Adafruit_USBD_Device::getSerialDescriptor(uint16_t* serial_str)
|
|||
return sizeof(raw_id)*2;
|
||||
}
|
||||
|
||||
|
||||
extern "C"
|
||||
{
|
||||
|
||||
// running tinyusb background task if yield()
|
||||
void yield(void)
|
||||
{
|
||||
tud_task();
|
||||
tud_cdc_write_flush();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------+
|
||||
// Helpers
|
||||
//--------------------------------------------------------------------+
|
||||
|
|
|
|||
|
|
@ -59,3 +59,14 @@ int main( void )
|
|||
|
||||
return 0;
|
||||
}
|
||||
|
||||
#if defined(USE_TINYUSB)
|
||||
|
||||
// run TinyUSB background task when yield()
|
||||
extern "C" void yield(void)
|
||||
{
|
||||
tud_task();
|
||||
tud_cdc_write_flush();
|
||||
}
|
||||
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Reference in a new issue