summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZixun LI <[email protected]>2026-09-03 04:55:54 +0200
committerGitHub <[email protected]>2026-09-03 04:55:54 +0200
commitfe3074ede45c53acd66356b4568115410a0bfc0b (patch)
tree587fdba1c88f7148ede4cd67df5d0ec52aebc180
parent762517e6c41bedba73df04bc3c2181d7e5fe1d5e (diff)
parent5d71979f4ee629f5d811bd2e3f4d975f2a87f61a (diff)
Merge pull request #3877 from kilograham/rp2040-pio-usb-fix
rp2040: do not require PICO_DEFAULT_PIO_USB_DP_PIN to be set for pio_usb
-rw-r--r--hw/bsp/rp2040/family.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/hw/bsp/rp2040/family.c b/hw/bsp/rp2040/family.c
index 9de1658eb..3c5022eb6 100644
--- a/hw/bsp/rp2040/family.c
+++ b/hw/bsp/rp2040/family.c
@@ -215,7 +215,9 @@ void board_init(void)
// rp2040 use pico-pio-usb for host tuh_configure() can be used to passed pio configuration to the host stack
// Note: tuh_configure() must be called before tuh_init()
pio_usb_configuration_t pio_cfg = PIO_USB_DEFAULT_CONFIG;
+#ifdef PICO_DEFAULT_PIO_USB_DP_PIN
pio_cfg.pin_dp = PICO_DEFAULT_PIO_USB_DP_PIN;
+#endif
tuh_configure(BOARD_TUH_RHPORT, TUH_CFGID_RPI_PIO_USB_CONFIGURATION, &pio_cfg);
#endif