Skip to content

Commit f91c517

Browse files
committed
sync with tinyusb lib latest
1 parent 7c6bf37 commit f91c517

File tree

5 files changed

+6
-15
lines changed

5 files changed

+6
-15
lines changed

cores/nRF5/Arduino.h

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -58,12 +58,11 @@ void resumeLoop(void);
5858
#include "HardwarePWM.h"
5959
#include "utility/SoftwareTimer.h"
6060
#include "Uart.h"
61-
62-
#ifdef USE_TINYUSB
63-
#include "Adafruit_USBD_Interface.h"
64-
#include "Adafruit_USBD_CDC.h"
6561
#endif
6662

63+
#ifdef USE_TINYUSB
64+
// Needed for declaring Serial
65+
#include "Adafruit_USBD_CDC.h"
6766
#endif
6867

6968
#include "delay.h"

cores/nRF5/delay.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,6 @@
2525
extern "C" {
2626
#endif
2727

28-
uint32_t tud_cdc_n_write_flush(uint8_t itf) ATTR_WEAK;
29-
3028
uint32_t millis( void )
3129
{
3230
return tick2ms(xTaskGetTickCount());
@@ -39,7 +37,7 @@ void delay( uint32_t ms )
3937
#ifdef USE_TINYUSB
4038
// Take chance to flush usb cdc
4139
uint32_t flush_tick = xTaskGetTickCount();
42-
tud_cdc_n_write_flush(0);
40+
TinyUSB_Device_FlushCDC();
4341

4442
flush_tick = xTaskGetTickCount()-flush_tick;
4543
if (flush_tick >= ticks) return;

cores/nRF5/main.cpp

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -39,12 +39,6 @@ void Bluefruit_printInfo() {}
3939
void initVariant() __attribute__((weak));
4040
void initVariant() { }
4141

42-
#ifdef USE_TINYUSB
43-
// Called by main.cpp to initialize usb device typically with CDC device for Serial
44-
void TinyUSB_Device_Init(uint8_t rhport) __attribute__((weak));
45-
#endif
46-
47-
4842
#define LOOP_STACK_SZ (256*4)
4943
#define CALLBACK_STACK_SZ (256*3)
5044

cores/nRF5/rtos.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ extern "C"
7575
void yield(void)
7676
{
7777
#ifdef USE_TINYUSB
78-
Serial.flush();
78+
TinyUSB_Device_FlushCDC();
7979
#endif
8080

8181
taskYIELD();

0 commit comments

Comments
 (0)