Skip to content

Commit 4278fbc

Browse files
authored
Update dcd_dwc2.c
1 parent 850fcd7 commit 4278fbc

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

components/arduino_tinyusb/src/dcd_dwc2.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -316,7 +316,7 @@ static void dfifo_write_packet(uint8_t rhport, uint8_t fifo_num, uint8_t const*
316316
//--------------------------------------------------------------------
317317
// Endpoint
318318
//--------------------------------------------------------------------
319-
#if TU_CHECK_MCU(OPT_MCU_ESP32S2, OPT_MCU_ESP32S3)
319+
#if defined(TUP_USBIP_DWC2_ESP32)
320320
// Keep count of how many FIFOs are in use
321321
static uint8_t _allocated_fifos = 1; //FIFO0 is always in use
322322

@@ -344,7 +344,7 @@ static void edpt_activate(uint8_t rhport, tusb_desc_endpoint_t const * p_endpoin
344344
if (dir == TUSB_DIR_IN) {
345345
//epctl |= (epnum << DIEPCTL_TXFNUM_Pos);
346346
uint8_t fifo_num = epnum;
347-
#if TU_CHECK_MCU(OPT_MCU_ESP32S2, OPT_MCU_ESP32S3)
347+
#if defined(TUP_USBIP_DWC2_ESP32)
348348
// Special Case for EP5, which is used by CDC but not actually called by the driver
349349
// we can give it a fake FIFO
350350
if (epnum == 5) {
@@ -866,7 +866,7 @@ void dcd_edpt_close_all(uint8_t rhport) {
866866
}
867867
}
868868

869-
#if TU_CHECK_MCU(OPT_MCU_ESP32S2, OPT_MCU_ESP32S3)
869+
#if defined(TUP_USBIP_DWC2_ESP32)
870870
_allocated_fifos = 1;
871871
#endif
872872

@@ -1216,7 +1216,7 @@ void dcd_int_handler(uint8_t rhport) {
12161216
if (int_status & GINTSTS_USBRST) {
12171217
// USBRST is start of reset.
12181218
dwc2->gintsts = GINTSTS_USBRST;
1219-
#if TU_CHECK_MCU(OPT_MCU_ESP32S2, OPT_MCU_ESP32S3)
1219+
#if defined(TUP_USBIP_DWC2_ESP32)
12201220
_allocated_fifos = 1;
12211221
#endif
12221222
bus_reset(rhport);
@@ -1252,7 +1252,7 @@ void dcd_int_handler(uint8_t rhport) {
12521252
dwc2->gintsts = GINTSTS_USBSUSP;
12531253
//dcd_event_bus_signal(rhport, DCD_EVENT_SUSPEND, true);
12541254
dcd_event_bus_signal(rhport, DCD_EVENT_UNPLUGGED, true);
1255-
#if TU_CHECK_MCU(OPT_MCU_ESP32S2, OPT_MCU_ESP32S3)
1255+
#if defined(TUP_USBIP_DWC2_ESP32)
12561256
_allocated_fifos = 1;
12571257
#endif
12581258
}
@@ -1271,7 +1271,7 @@ void dcd_int_handler(uint8_t rhport) {
12711271

12721272
if (otg_int & GOTGINT_SEDET) {
12731273
dcd_event_bus_signal(rhport, DCD_EVENT_UNPLUGGED, true);
1274-
#if TU_CHECK_MCU(OPT_MCU_ESP32S2, OPT_MCU_ESP32S3)
1274+
#if defined(TUP_USBIP_DWC2_ESP32)
12751275
_allocated_fifos = 1;
12761276
#endif
12771277
}

0 commit comments

Comments
 (0)