sync with tinyusb lib latest

This commit is contained in:
hathach committed 2021-05-10 12:56:17 +07:00
1 parent 7c6bf37f5e
commit f91c517d27
5 files changed
+6 -15

No files matched your search

+3 -4
View File
@@ -58,12 +58,11 @@ void resumeLoop(void);
#include "HardwarePWM.h"
#include "utility/SoftwareTimer.h"
#include "Uart.h"
#ifdef USE_TINYUSB
#include "Adafruit_USBD_Interface.h"
#include "Adafruit_USBD_CDC.h"
#endif
#ifdef USE_TINYUSB
// Needed for declaring Serial
#include "Adafruit_USBD_CDC.h"
#endif
#include "delay.h"
+1 -3
View File
@@ -25,8 +25,6 @@
extern "C" {
#endif
uint32_t tud_cdc_n_write_flush(uint8_t itf) ATTR_WEAK;
uint32_t millis( void )
{
return tick2ms(xTaskGetTickCount());
@@ -39,7 +37,7 @@ void delay( uint32_t ms )
#ifdef USE_TINYUSB
// Take chance to flush usb cdc
uint32_t flush_tick = xTaskGetTickCount();
tud_cdc_n_write_flush(0);
TinyUSB_Device_FlushCDC();
flush_tick = xTaskGetTickCount()-flush_tick;
if (flush_tick >= ticks) return;
-6
View File
@@ -39,12 +39,6 @@ void Bluefruit_printInfo() {}
void initVariant() __attribute__((weak));
void initVariant() { }
#ifdef USE_TINYUSB
// Called by main.cpp to initialize usb device typically with CDC device for Serial
void TinyUSB_Device_Init(uint8_t rhport) __attribute__((weak));
#endif
#define LOOP_STACK_SZ (256*4)
#define CALLBACK_STACK_SZ (256*3)
+1 -1
View File
@@ -75,7 +75,7 @@ extern "C"
void yield(void)
{
#ifdef USE_TINYUSB
Serial.flush();
TinyUSB_Device_FlushCDC();
#endif
taskYIELD();