diff --git a/src/rp2_common/pico_stdio_usb/reset_interface.c b/src/rp2_common/pico_stdio_usb/reset_interface.c index 26afa3de1..061320936 100644 --- a/src/rp2_common/pico_stdio_usb/reset_interface.c +++ b/src/rp2_common/pico_stdio_usb/reset_interface.c @@ -5,10 +5,9 @@ */ #include "tusb.h" +#if !defined(LIB_TINYUSB_HOST) || (defined(LIB_TINYUSB_HOST) && defined(CFG_TUH_RPI_PIO_USB)) #include "pico/bootrom.h" -#if !defined(LIB_TINYUSB_HOST) - #if PICO_STDIO_USB_ENABLE_RESET_VIA_VENDOR_INTERFACE && !(PICO_STDIO_USB_RESET_INTERFACE_SUPPORT_RESET_TO_BOOTSEL || PICO_STDIO_USB_RESET_INTERFACE_SUPPORT_RESET_TO_FLASH_BOOT) #warning PICO_STDIO_USB_ENABLE_RESET_VIA_VENDOR_INTERFACE has been selected but neither PICO_STDIO_USB_RESET_INTERFACE_SUPPORT_RESET_TO_BOOTSEL nor PICO_STDIO_USB_RESET_INTERFACE_SUPPORT_RESET_TO_FLASH_BOOT have been selected. #endif @@ -186,5 +185,4 @@ void tud_cdc_line_coding_cb(__unused uint8_t itf, cdc_line_coding_t const* p_lin } } #endif - -#endif \ No newline at end of file +#endif // !defined(LIB_TINYUSB_HOST) || (defined(LIB_TINYUSB_HOST) && defined(CFG_TUH_RPI_PIO_USB)) diff --git a/src/rp2_common/pico_stdio_usb/stdio_usb.c b/src/rp2_common/pico_stdio_usb/stdio_usb.c index 61aa7089b..bbff5f612 100644 --- a/src/rp2_common/pico_stdio_usb/stdio_usb.c +++ b/src/rp2_common/pico_stdio_usb/stdio_usb.c @@ -4,8 +4,9 @@ * SPDX-License-Identifier: BSD-3-Clause */ -#ifndef LIB_TINYUSB_HOST #include "tusb.h" + +#if !defined(LIB_TINYUSB_HOST) || (defined(LIB_TINYUSB_HOST) && defined(CFG_TUH_RPI_PIO_USB)) #include "pico/stdio_usb.h" // these may not be set if the user is providing tud support (i.e. LIB_TINYUSB_DEVICE is 1 because @@ -302,9 +303,9 @@ bool stdio_usb_init(void) { } #endif // CFG_TUD_ENABLED && CFG_TUD_CDC #else -#warning stdio USB was configured, but is being disabled as TinyUSB host is explicitly linked +#warning stdio USB was configured, but is being disabled as TinyUSB host is explicitly linked and is not using PIO-USB bool stdio_usb_init(void) { return false; } -#endif // !LIB_TINYUSB_HOST +#endif // !defined(LIB_TINYUSB_HOST) || (defined(LIB_TINYUSB_HOST) && defined(CFG_TUH_RPI_PIO_USB))