Skip to content

Commit fd3290c

Browse files
authored
Merge pull request #3011 from hathach/fix-dwc2-host-conflict-max3421e
fix(dwc2) host driver conflict with max3421e
2 parents 6bba410 + 65e44e0 commit fd3290c

File tree

7 files changed

+13
-7
lines changed

7 files changed

+13
-7
lines changed

examples/host/bare_api/src/tusb_config.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,9 +69,10 @@
6969
// Enable Host stack
7070
#define CFG_TUH_ENABLED 1
7171

72+
// #define CFG_TUH_MAX3421 1 // use max3421 as host controller
73+
7274
#if CFG_TUSB_MCU == OPT_MCU_RP2040
7375
// #define CFG_TUH_RPI_PIO_USB 1 // use pio-usb as host controller
74-
// #define CFG_TUH_MAX3421 1 // use max3421 as host controller
7576

7677
// host roothub port is 1 if using either pio-usb or max3421
7778
#if (defined(CFG_TUH_RPI_PIO_USB) && CFG_TUH_RPI_PIO_USB) || (defined(CFG_TUH_MAX3421) && CFG_TUH_MAX3421)

examples/host/cdc_msc_hid/src/tusb_config.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,9 +69,10 @@
6969
// Enable Host stack
7070
#define CFG_TUH_ENABLED 1
7171

72+
// #define CFG_TUH_MAX3421 1 // use max3421 as host controller
73+
7274
#if CFG_TUSB_MCU == OPT_MCU_RP2040
7375
// #define CFG_TUH_RPI_PIO_USB 1 // use pio-usb as host controller
74-
// #define CFG_TUH_MAX3421 1 // use max3421 as host controller
7576

7677
// host roothub port is 1 if using either pio-usb or max3421
7778
#if (defined(CFG_TUH_RPI_PIO_USB) && CFG_TUH_RPI_PIO_USB) || (defined(CFG_TUH_MAX3421) && CFG_TUH_MAX3421)

examples/host/cdc_msc_hid_freertos/src/tusb_config.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,9 +74,10 @@
7474
// Enable Host stack
7575
#define CFG_TUH_ENABLED 1
7676

77+
// #define CFG_TUH_MAX3421 1 // use max3421 as host controller
78+
7779
#if CFG_TUSB_MCU == OPT_MCU_RP2040
7880
// #define CFG_TUH_RPI_PIO_USB 1 // use pio-usb as host controller
79-
// #define CFG_TUH_MAX3421 1 // use max3421 as host controller
8081

8182
// host roothub port is 1 if using either pio-usb or max3421
8283
#if (defined(CFG_TUH_RPI_PIO_USB) && CFG_TUH_RPI_PIO_USB) || (defined(CFG_TUH_MAX3421) && CFG_TUH_MAX3421)

examples/host/device_info/src/tusb_config.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,9 +74,10 @@
7474
// Enable Host stack
7575
#define CFG_TUH_ENABLED 1
7676

77+
// #define CFG_TUH_MAX3421 1 // use max3421 as host controller
78+
7779
#if CFG_TUSB_MCU == OPT_MCU_RP2040
7880
// #define CFG_TUH_RPI_PIO_USB 1 // use pio-usb as host controller
79-
// #define CFG_TUH_MAX3421 1 // use max3421 as host controller
8081

8182
// host roothub port is 1 if using either pio-usb or max3421
8283
#if (defined(CFG_TUH_RPI_PIO_USB) && CFG_TUH_RPI_PIO_USB) || (defined(CFG_TUH_MAX3421) && CFG_TUH_MAX3421)

examples/host/hid_controller/src/tusb_config.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,9 +69,10 @@
6969
// Enable Host stack
7070
#define CFG_TUH_ENABLED 1
7171

72+
// #define CFG_TUH_MAX3421 1 // use max3421 as host controller
73+
7274
#if CFG_TUSB_MCU == OPT_MCU_RP2040
7375
// #define CFG_TUH_RPI_PIO_USB 1 // use pio-usb as host controller
74-
// #define CFG_TUH_MAX3421 1 // use max3421 as host controller
7576

7677
// host roothub port is 1 if using either pio-usb or max3421
7778
#if (defined(CFG_TUH_RPI_PIO_USB) && CFG_TUH_RPI_PIO_USB) || (defined(CFG_TUH_MAX3421) && CFG_TUH_MAX3421)

examples/host/msc_file_explorer/src/tusb_config.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,9 +69,10 @@
6969
// Enable Host stack
7070
#define CFG_TUH_ENABLED 1
7171

72+
// #define CFG_TUH_MAX3421 1 // use max3421 as host controller
73+
7274
#if CFG_TUSB_MCU == OPT_MCU_RP2040
7375
// #define CFG_TUH_RPI_PIO_USB 1 // use pio-usb as host controller
74-
// #define CFG_TUH_MAX3421 1 // use max3421 as host controller
7576

7677
// host roothub port is 1 if using either pio-usb or max3421
7778
#if (defined(CFG_TUH_RPI_PIO_USB) && CFG_TUH_RPI_PIO_USB) || (defined(CFG_TUH_MAX3421) && CFG_TUH_MAX3421)

src/portable/synopsys/dwc2/hcd_dwc2.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626

2727
#include "tusb_option.h"
2828

29-
#if CFG_TUH_ENABLED && defined(TUP_USBIP_DWC2)
29+
#if CFG_TUH_ENABLED && defined(TUP_USBIP_DWC2) && !CFG_TUH_MAX3421
3030

3131
#if !(CFG_TUH_DWC2_SLAVE_ENABLE || CFG_TUH_DWC2_DMA_ENABLE)
3232
#error DWC2 require either CFG_TUH_DWC2_SLAVE_ENABLE or CFG_TUH_DWC2_DMA_ENABLE to be enabled

0 commit comments

Comments
 (0)