Skip to content

Commit 0c37f25

Browse files
committed
Fix TinyUSB build
1 parent fee3c87 commit 0c37f25

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

components/arduino_tinyusb/src/dcd_esp32sx.c

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,21 @@
3737
#include "soc/dport_reg.h"
3838
#include "soc/gpio_sig_map.h"
3939
#include "soc/usb_periph.h"
40+
#include "soc/usb_reg.h"
41+
#include "soc/usb_struct.h"
4042
#include "soc/periph_defs.h" // for interrupt source
43+
#include "soc/usb_wrap_struct.h"
4144

4245
#include "device/dcd.h"
4346

47+
#ifndef USB_OUT_EP_NUM
48+
#define USB_OUT_EP_NUM ((int) (sizeof(USB0.out_ep_reg) / sizeof(USB0.out_ep_reg[0])))
49+
#endif
50+
51+
#ifndef USB_IN_EP_NUM
52+
#define USB_IN_EP_NUM ((int) (sizeof(USB0.in_ep_reg) / sizeof(USB0.in_ep_reg[0])))
53+
#endif
54+
4455
// Max number of bi-directional endpoints including EP0
4556
// Note: ESP32S2 specs say there are only up to 5 IN active endpoints include EP0
4657
// We should probably prohibit enabling Endpoint IN > 4 (not done yet)

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy