Skip to content

Commit 91ecb6c

Browse files
committed
Fix many builds
* DWC common has been factored out. * New time API to implement.
1 parent 82d0004 commit 91ecb6c

File tree

4 files changed

+10
-2
lines changed

4 files changed

+10
-2
lines changed

ports/broadcom/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ SRC_C += bindings/videocore/__init__.c \
4848
lib/sdmmc/sdmmc_mmc.c \
4949
lib/sdmmc/sdmmc_sd.c \
5050
lib/tinyusb/src/portable/synopsys/dwc2/dcd_dwc2.c \
51+
lib/tinyusb/src/portable/synopsys/dwc2/dwc2_common.c \
5152
peripherals/broadcom/caches.c \
5253
peripherals/broadcom/gen/interrupt_handlers.c \
5354
peripherals/broadcom/gen/pins.c \

ports/stm/Makefile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,9 @@ ifneq ($(CIRCUITPY_AUDIOBUSIO_PDMIN),0)
197197
endif
198198

199199
ifneq ($(CIRCUITPY_USB),0)
200-
SRC_C += lib/tinyusb/src/portable/synopsys/dwc2/dcd_dwc2.c
200+
SRC_C += \
201+
lib/tinyusb/src/portable/synopsys/dwc2/dcd_dwc2.c \
202+
lib/tinyusb/src/portable/synopsys/dwc2/dwc2_common.c
201203
endif
202204

203205
SRC_S = \

supervisor/shared/usb/tusb_config.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ extern "C" {
9090
#endif
9191

9292
// Use DMA with the USB peripheral.
93-
#ifdef CONFIG_IDF_TARGET_ESP32P4
93+
#if defined(CONFIG_IDF_TARGET_ESP32P4) || defined(CONFIG_IDF_TARGET_ESP32S2) || defined(CONFIG_IDF_TARGET_ESP32S3)
9494
#define CFG_TUD_DWC2_DMA_ENABLE (1)
9595
#define CFG_TUH_DWC2_DMA_ENABLE (1)
9696
#endif

supervisor/shared/usb/usb.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
#include "py/objstr.h"
88
#include "supervisor/background_callback.h"
99
#include "supervisor/linker.h"
10+
#include "supervisor/shared/tick.h"
1011
#include "supervisor/usb.h"
1112
#include "shared/readline/readline.h"
1213

@@ -152,6 +153,10 @@ void usb_background(void) {
152153
}
153154
}
154155

156+
uint32_t tusb_time_millis_api(void) {
157+
return supervisor_ticks_ms32();
158+
}
159+
155160
static background_callback_t usb_callback;
156161
static void usb_background_do(void *unused) {
157162
usb_background();

0 commit comments

Comments
 (0)