summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorhathach <[email protected]>2022-04-08 13:36:05 +0700
committerhathach <[email protected]>2022-04-08 13:36:05 +0700
commitd5d4909c20f581ef2046932191f487c001d59ca3 (patch)
tree1a9e0023c867554886edc12bd694000ca9d937e4 /src
parentd97c1546957059cfb3063b95d5287e2729f7f79a (diff)
proof of concpet that device pio-usb work with host pio-usb
Diffstat (limited to 'src')
-rw-r--r--src/portable/raspberrypi/rp2040/dcd_rp2040.c2
-rw-r--r--src/tusb_option.h6
2 files changed, 6 insertions, 2 deletions
diff --git a/src/portable/raspberrypi/rp2040/dcd_rp2040.c b/src/portable/raspberrypi/rp2040/dcd_rp2040.c
index 915822798..2d77ad4f9 100644
--- a/src/portable/raspberrypi/rp2040/dcd_rp2040.c
+++ b/src/portable/raspberrypi/rp2040/dcd_rp2040.c
@@ -26,7 +26,7 @@
#include "tusb_option.h"
-#if CFG_TUD_ENABLED && CFG_TUSB_MCU == OPT_MCU_RP2040
+#if CFG_TUD_ENABLED && (CFG_TUSB_MCU == OPT_MCU_RP2040) && !CFG_TUD_RPI_PIO_USB
#include "pico.h"
#include "rp2040_usb.h"
diff --git a/src/tusb_option.h b/src/tusb_option.h
index 61cc283c4..5636b34fe 100644
--- a/src/tusb_option.h
+++ b/src/tusb_option.h
@@ -239,7 +239,7 @@
#define TUH_OPT_RHPORT -1
#endif
-#define CFG_TUH_ENABLED ( TUH_RHPORT_MODE & OPT_MODE_HOST )
+#define CFG_TUH_ENABLED (TUH_RHPORT_MODE & OPT_MODE_HOST)
// For backward compatible
#define TUSB_OPT_DEVICE_ENABLED CFG_TUD_ENABLED
@@ -398,6 +398,10 @@
#define CFG_TUH_RPI_PIO_USB 0
#endif
+#ifndef CFG_TUD_RPI_PIO_USB
+#define CFG_TUD_RPI_PIO_USB 0
+#endif
+
//------------------------------------------------------------------
// Configuration Validation