diff --git a/boards/arm/lpc31xx/olimex-lpc-h3131/src/lpc_h3131.h b/boards/arm/lpc31xx/olimex-lpc-h3131/src/lpc_h3131.h index 6e1dc9656cd..7f59136fdeb 100644 --- a/boards/arm/lpc31xx/olimex-lpc-h3131/src/lpc_h3131.h +++ b/boards/arm/lpc31xx/olimex-lpc-h3131/src/lpc_h3131.h @@ -62,13 +62,21 @@ # undef HAVE_USBHOST #endif -/* Check if we need to support the USB monitor */ +/* Check if we should enable the USB monitor before starting NSH */ + +#ifndef CONFIG_USBMONITOR +# undef HAVE_USBMONITOR +#endif + +#ifndef HAVE_USBDEV +# undef CONFIG_USBDEV_TRACE +#endif #ifndef HAVE_USBHOST # undef CONFIG_USBHOST_TRACE #endif -#if !defined(CONFIG_USBMONITOR) || !defined(CONFIG_USBHOST_TRACE) +#if !defined(CONFIG_USBDEV_TRACE) && !defined(CONFIG_USBHOST_TRACE) # undef HAVE_USBMONITOR #endif diff --git a/boards/arm/sam34/sam4e-ek/src/sam4e-ek.h b/boards/arm/sam34/sam4e-ek/src/sam4e-ek.h index 54a7e619a50..f0c1f64fdc5 100644 --- a/boards/arm/sam34/sam4e-ek/src/sam4e-ek.h +++ b/boards/arm/sam34/sam4e-ek/src/sam4e-ek.h @@ -115,11 +115,19 @@ /* Check if we should enable the USB monitor before starting NSH */ +#ifndef CONFIG_USBMONITOR +# undef HAVE_USBMONITOR +#endif + #ifndef HAVE_USBDEV # undef CONFIG_USBDEV_TRACE #endif -#if !defined(CONFIG_USBMONITOR) || !defined(CONFIG_USBDEV_TRACE) +#ifndef HAVE_USBHOST +# undef CONFIG_USBHOST_TRACE +#endif + +#if !defined(CONFIG_USBDEV_TRACE) && !defined(CONFIG_USBHOST_TRACE) # undef HAVE_USBMONITOR #endif diff --git a/boards/arm/samv7/same70-xplained/src/same70-xplained.h b/boards/arm/samv7/same70-xplained/src/same70-xplained.h index ff8ec2d1210..1a18d066183 100644 --- a/boards/arm/samv7/same70-xplained/src/same70-xplained.h +++ b/boards/arm/samv7/same70-xplained/src/same70-xplained.h @@ -143,11 +143,19 @@ /* Check if we should enable the USB monitor before starting NSH */ +#ifndef CONFIG_USBMONITOR +# undef HAVE_USBMONITOR +#endif + #ifndef HAVE_USBDEV # undef CONFIG_USBDEV_TRACE #endif -#if !defined(CONFIG_USBMONITOR) || !defined(CONFIG_USBDEV_TRACE) +#ifndef HAVE_USBHOST +# undef CONFIG_USBHOST_TRACE +#endif + +#if !defined(CONFIG_USBDEV_TRACE) && !defined(CONFIG_USBHOST_TRACE) # undef HAVE_USBMONITOR #endif diff --git a/boards/arm/samv7/samv71-xult/src/samv71-xult.h b/boards/arm/samv7/samv71-xult/src/samv71-xult.h index 6f03f3bd755..767dc69b25f 100644 --- a/boards/arm/samv7/samv71-xult/src/samv71-xult.h +++ b/boards/arm/samv7/samv71-xult/src/samv71-xult.h @@ -151,11 +151,19 @@ /* Check if we should enable the USB monitor before starting NSH */ +#ifndef CONFIG_USBMONITOR +# undef HAVE_USBMONITOR +#endif + #ifndef HAVE_USBDEV # undef CONFIG_USBDEV_TRACE #endif -#if !defined(CONFIG_USBMONITOR) || !defined(CONFIG_USBDEV_TRACE) +#ifndef HAVE_USBHOST +# undef CONFIG_USBHOST_TRACE +#endif + +#if !defined(CONFIG_USBDEV_TRACE) && !defined(CONFIG_USBHOST_TRACE) # undef HAVE_USBMONITOR #endif diff --git a/boards/arm/stm32/clicker2-stm32/src/clicker2-stm32.h b/boards/arm/stm32/clicker2-stm32/src/clicker2-stm32.h index f223fbb86ba..605e305227b 100644 --- a/boards/arm/stm32/clicker2-stm32/src/clicker2-stm32.h +++ b/boards/arm/stm32/clicker2-stm32/src/clicker2-stm32.h @@ -106,21 +106,25 @@ /* Can't support USB device feature if USB OTG FS is not enabled */ -#ifndef CONFIG_STM32_OTGFS +#if defined(CONFIG_STM32_OTGFS) && defined(CONFIG_USBDEV) # undef HAVE_USBDEV -# undef HAVE_USBMONITOR -#endif - -/* Can't support USB device monitor if USB device is not enabled */ - -#ifndef CONFIG_USBDEV -# undef HAVE_USBDEV -# undef HAVE_USBMONITOR #endif /* Check if we should enable the USB monitor before starting NSH */ -#if !defined(CONFIG_USBDEV_TRACE) || !defined(CONFIG_USBMONITOR) +#ifndef CONFIG_USBMONITOR +# undef HAVE_USBMONITOR +#endif + +#ifndef HAVE_USBDEV +# undef CONFIG_USBDEV_TRACE +#endif + +#ifndef HAVE_USBHOST +# undef CONFIG_USBHOST_TRACE +#endif + +#if !defined(CONFIG_USBDEV_TRACE) && !defined(CONFIG_USBHOST_TRACE) # undef HAVE_USBMONITOR #endif diff --git a/boards/arm/stm32/mikroe-stm32f4/src/stm32_appinit.c b/boards/arm/stm32/mikroe-stm32f4/src/stm32_appinit.c index 0cb0df000e9..0a1906e4e74 100644 --- a/boards/arm/stm32/mikroe-stm32f4/src/stm32_appinit.c +++ b/boards/arm/stm32/mikroe-stm32f4/src/stm32_appinit.c @@ -81,14 +81,12 @@ #ifndef CONFIG_STM32_OTGFS # undef HAVE_USBDEV # undef HAVE_USBHOST -# undef HAVE_USBMONITOR #endif /* Can't support USB device is USB device is not enabled */ #ifndef CONFIG_USBDEV # undef HAVE_USBDEV -# undef HAVE_USBMONITOR #endif /* Can't support USB host is USB host is not enabled */ @@ -99,7 +97,19 @@ /* Check if we should enable the USB monitor before starting NSH */ -#if !defined(CONFIG_USBDEV_TRACE) || !defined(CONFIG_USBMONITOR) +#ifndef CONFIG_USBMONITOR +# undef HAVE_USBMONITOR +#endif + +#ifndef HAVE_USBDEV +# undef CONFIG_USBDEV_TRACE +#endif + +#ifndef HAVE_USBHOST +# undef CONFIG_USBHOST_TRACE +#endif + +#if !defined(CONFIG_USBDEV_TRACE) && !defined(CONFIG_USBHOST_TRACE) # undef HAVE_USBMONITOR #endif diff --git a/boards/arm/stm32/olimex-stm32-e407/src/olimex-stm32-e407.h b/boards/arm/stm32/olimex-stm32-e407/src/olimex-stm32-e407.h index 0a0d6c30d87..caacf49ce25 100644 --- a/boards/arm/stm32/olimex-stm32-e407/src/olimex-stm32-e407.h +++ b/boards/arm/stm32/olimex-stm32-e407/src/olimex-stm32-e407.h @@ -65,14 +65,12 @@ #ifndef CONFIG_STM32_OTGFS # undef HAVE_USBDEV # undef HAVE_USBHOST -# undef HAVE_USBMONITOR #endif -/* Can't support USB device monitor if USB device is not enabled */ +/* Can't support USB device if USB device is not enabled */ #ifndef CONFIG_USBDEV # undef HAVE_USBDEV -# undef HAVE_USBMONITOR #endif /* Can't support USB host is USB host is not enabled */ @@ -83,7 +81,19 @@ /* Check if we should enable the USB monitor before starting NSH */ -#if !defined(CONFIG_USBDEV_TRACE) || !defined(CONFIG_USBMONITOR) +#ifndef CONFIG_USBMONITOR +# undef HAVE_USBMONITOR +#endif + +#ifndef HAVE_USBDEV +# undef CONFIG_USBDEV_TRACE +#endif + +#ifndef HAVE_USBHOST +# undef CONFIG_USBHOST_TRACE +#endif + +#if !defined(CONFIG_USBDEV_TRACE) && !defined(CONFIG_USBHOST_TRACE) # undef HAVE_USBMONITOR #endif diff --git a/boards/arm/stm32/olimex-stm32-e407/src/stm32_bringup.c b/boards/arm/stm32/olimex-stm32-e407/src/stm32_bringup.c index 3c50f5c0171..99fe8ee47c8 100644 --- a/boards/arm/stm32/olimex-stm32-e407/src/stm32_bringup.c +++ b/boards/arm/stm32/olimex-stm32-e407/src/stm32_bringup.c @@ -68,14 +68,12 @@ #ifndef CONFIG_STM32_OTGHS # undef HAVE_USBDEV # undef HAVE_USBHOST -# undef HAVE_USBMONITOR #endif -/* Can't support USB device monitor if USB device is not enabled */ +/* Can't support USB device USB device is not enabled */ #ifndef CONFIG_USBDEV # undef HAVE_USBDEV -# undef HAVE_USBMONITOR #endif /* Can't support USB host is USB host is not enabled */ @@ -86,7 +84,19 @@ /* Check if we should enable the USB monitor before starting NSH */ -#if !defined(CONFIG_USBDEV_TRACE) || !defined(CONFIG_USBMONITOR) +#ifndef CONFIG_USBMONITOR +# undef HAVE_USBMONITOR +#endif + +#ifndef HAVE_USBDEV +# undef CONFIG_USBDEV_TRACE +#endif + +#ifndef HAVE_USBHOST +# undef CONFIG_USBHOST_TRACE +#endif + +#if !defined(CONFIG_USBDEV_TRACE) && !defined(CONFIG_USBHOST_TRACE) # undef HAVE_USBMONITOR #endif diff --git a/boards/arm/stm32/olimex-stm32-h407/src/olimex-stm32-h407.h b/boards/arm/stm32/olimex-stm32-h407/src/olimex-stm32-h407.h index 9879e07e1de..2a737b60483 100644 --- a/boards/arm/stm32/olimex-stm32-h407/src/olimex-stm32-h407.h +++ b/boards/arm/stm32/olimex-stm32-h407/src/olimex-stm32-h407.h @@ -61,14 +61,12 @@ #ifndef CONFIG_STM32_OTGHS # undef HAVE_USBDEV # undef HAVE_USBHOST -# undef HAVE_USBMONITOR #endif -/* Can't support USB device monitor if USB device is not enabled */ +/* Can't support USB device if USB device is not enabled */ #ifndef CONFIG_USBDEV # undef HAVE_USBDEV -# undef HAVE_USBMONITOR #endif /* Can't support USB host is USB host is not enabled */ @@ -79,12 +77,20 @@ /* Check if we should enable the USB monitor before starting NSH */ -#if !defined(CONFIG_USBDEV_TRACE) || !defined(CONFIG_USBMONITOR) +#ifndef CONFIG_USBMONITOR # undef HAVE_USBMONITOR #endif -#if !defined(CONFIG_STM32_CAN1) && !defined(CONFIG_STM32_CAN2) -# undef CONFIG_CAN +#ifndef HAVE_USBDEV +# undef CONFIG_USBDEV_TRACE +#endif + +#ifndef HAVE_USBHOST +# undef CONFIG_USBHOST_TRACE +#endif + +#if !defined(CONFIG_USBDEV_TRACE) && !defined(CONFIG_USBHOST_TRACE) +# undef HAVE_USBMONITOR #endif /* Can't support MMC/SD features if mountpoints are disabled or if SDIO diff --git a/boards/arm/stm32/olimex-stm32-p207/src/stm32_appinit.c b/boards/arm/stm32/olimex-stm32-p207/src/stm32_appinit.c index 374dee33b6e..081a9e9716f 100644 --- a/boards/arm/stm32/olimex-stm32-p207/src/stm32_appinit.c +++ b/boards/arm/stm32/olimex-stm32-p207/src/stm32_appinit.c @@ -57,14 +57,12 @@ #ifndef CONFIG_STM32_OTGFS # undef HAVE_USBDEV # undef HAVE_USBHOST -# undef HAVE_USBMONITOR #endif -/* Can't support USB device monitor if USB device is not enabled */ +/* Can't support USB device if USB device is not enabled */ #ifndef CONFIG_USBDEV # undef HAVE_USBDEV -# undef HAVE_USBMONITOR #endif /* Can't support USB host is USB host is not enabled */ @@ -76,7 +74,19 @@ /* Check if we should enable the USB monitor before starting NSH */ -#if !defined(CONFIG_USBDEV_TRACE) || !defined(CONFIG_USBMONITOR) +#ifndef CONFIG_USBMONITOR +# undef HAVE_USBMONITOR +#endif + +#ifndef HAVE_USBDEV +# undef CONFIG_USBDEV_TRACE +#endif + +#ifndef HAVE_USBHOST +# undef CONFIG_USBHOST_TRACE +#endif + +#if !defined(CONFIG_USBDEV_TRACE) && !defined(CONFIG_USBHOST_TRACE) # undef HAVE_USBMONITOR #endif diff --git a/boards/arm/stm32/olimex-stm32-p407/src/olimex-stm32-p407.h b/boards/arm/stm32/olimex-stm32-p407/src/olimex-stm32-p407.h index bb80b05a5fd..1c5a8478b76 100644 --- a/boards/arm/stm32/olimex-stm32-p407/src/olimex-stm32-p407.h +++ b/boards/arm/stm32/olimex-stm32-p407/src/olimex-stm32-p407.h @@ -105,14 +105,12 @@ #ifndef CONFIG_STM32_OTGFS # undef HAVE_USBDEV # undef HAVE_USBHOST -# undef HAVE_USBMONITOR #endif -/* Can't support USB device monitor if USB device is not enabled */ +/* Can't support USB device if USB device is not enabled */ #ifndef CONFIG_USBDEV # undef HAVE_USBDEV -# undef HAVE_USBMONITOR #endif /* Can't support USB host is USB host is not enabled */ @@ -123,7 +121,19 @@ /* Check if we should enable the USB monitor before starting NSH */ -#if !defined(CONFIG_USBDEV_TRACE) || !defined(CONFIG_USBMONITOR) +#ifndef CONFIG_USBMONITOR +# undef HAVE_USBMONITOR +#endif + +#ifndef HAVE_USBDEV +# undef CONFIG_USBDEV_TRACE +#endif + +#ifndef HAVE_USBHOST +# undef CONFIG_USBHOST_TRACE +#endif + +#if !defined(CONFIG_USBDEV_TRACE) && !defined(CONFIG_USBHOST_TRACE) # undef HAVE_USBMONITOR #endif diff --git a/boards/arm/stm32/stm32f3discovery/src/stm32_bringup.c b/boards/arm/stm32/stm32f3discovery/src/stm32_bringup.c index 9f9c291c9bd..bb120cf9c40 100644 --- a/boards/arm/stm32/stm32f3discovery/src/stm32_bringup.c +++ b/boards/arm/stm32/stm32f3discovery/src/stm32_bringup.c @@ -57,19 +57,29 @@ #ifndef CONFIG_STM32_USB # undef HAVE_USBDEV -# undef HAVE_USBMONITOR #endif /* Can't support USB device is USB device is not enabled */ #ifndef CONFIG_USBDEV # undef HAVE_USBDEV -# undef HAVE_USBMONITOR #endif /* Check if we should enable the USB monitor before starting NSH */ -#if !defined(CONFIG_USBDEV_TRACE) || !defined(CONFIG_USBMONITOR) +#ifndef CONFIG_USBMONITOR +# undef HAVE_USBMONITOR +#endif + +#ifndef HAVE_USBDEV +# undef CONFIG_USBDEV_TRACE +#endif + +#ifndef HAVE_USBHOST +# undef CONFIG_USBHOST_TRACE +#endif + +#if !defined(CONFIG_USBDEV_TRACE) && !defined(CONFIG_USBHOST_TRACE) # undef HAVE_USBMONITOR #endif diff --git a/boards/arm/stm32/stm32f429i-disco/src/stm32f429i-disco.h b/boards/arm/stm32/stm32f429i-disco/src/stm32f429i-disco.h index 4d450b12178..553c8625098 100644 --- a/boards/arm/stm32/stm32f429i-disco/src/stm32f429i-disco.h +++ b/boards/arm/stm32/stm32f429i-disco/src/stm32f429i-disco.h @@ -69,14 +69,12 @@ #ifndef CONFIG_STM32_OTGHS # undef HAVE_USBDEV # undef HAVE_USBHOST -# undef HAVE_USBMONITOR #endif /* Can't support USB device monitor if USB device is not enabled */ #ifndef CONFIG_USBDEV # undef HAVE_USBDEV -# undef HAVE_USBMONITOR #endif /* Can't support USB host is USB host is not enabled */ @@ -87,7 +85,19 @@ /* Check if we should enable the USB monitor before starting NSH */ -#if !defined(CONFIG_USBDEV_TRACE) || !defined(CONFIG_USBMONITOR) +#ifndef CONFIG_USBMONITOR +# undef HAVE_USBMONITOR +#endif + +#ifndef HAVE_USBDEV +# undef CONFIG_USBDEV_TRACE +#endif + +#ifndef HAVE_USBHOST +# undef CONFIG_USBHOST_TRACE +#endif + +#if !defined(CONFIG_USBDEV_TRACE) && !defined(CONFIG_USBHOST_TRACE) # undef HAVE_USBMONITOR #endif diff --git a/boards/arm/stm32/stm32f4discovery/src/stm32f4discovery.h b/boards/arm/stm32/stm32f4discovery/src/stm32f4discovery.h index 69b5260e5bd..417fd02167e 100644 --- a/boards/arm/stm32/stm32f4discovery/src/stm32f4discovery.h +++ b/boards/arm/stm32/stm32f4discovery/src/stm32f4discovery.h @@ -68,14 +68,12 @@ #ifndef CONFIG_STM32_OTGFS # undef HAVE_USBDEV # undef HAVE_USBHOST -# undef HAVE_USBMONITOR #endif -/* Can't support USB device monitor if USB device is not enabled */ +/* Can't support USB device if USB device is not enabled */ #ifndef CONFIG_USBDEV # undef HAVE_USBDEV -# undef HAVE_USBMONITOR #endif /* Can't support USB host is USB host is not enabled */ @@ -86,7 +84,19 @@ /* Check if we should enable the USB monitor before starting NSH */ -#if !defined(CONFIG_USBDEV_TRACE) || !defined(CONFIG_USBMONITOR) +#ifndef CONFIG_USBMONITOR +# undef HAVE_USBMONITOR +#endif + +#ifndef HAVE_USBDEV +# undef CONFIG_USBDEV_TRACE +#endif + +#ifndef HAVE_USBHOST +# undef CONFIG_USBHOST_TRACE +#endif + +#if !defined(CONFIG_USBDEV_TRACE) && !defined(CONFIG_USBHOST_TRACE) # undef HAVE_USBMONITOR #endif diff --git a/boards/arm/stm32h7/nucleo-h743zi/src/nucleo-h743zi.h b/boards/arm/stm32h7/nucleo-h743zi/src/nucleo-h743zi.h index 6919b813e41..5a3077e08eb 100644 --- a/boards/arm/stm32h7/nucleo-h743zi/src/nucleo-h743zi.h +++ b/boards/arm/stm32h7/nucleo-h743zi/src/nucleo-h743zi.h @@ -62,14 +62,12 @@ #ifndef CONFIG_STM32H7_OTGFS # undef HAVE_USBDEV # undef HAVE_USBHOST -# undef HAVE_USBMONITOR #endif -/* Can't support USB device monitor if USB device is not enabled */ +/* Can't support USB device if USB device is not enabled */ #ifndef CONFIG_USBDEV # undef HAVE_USBDEV -# undef HAVE_USBMONITOR #endif /* Can't support USB host is USB host is not enabled */ @@ -80,7 +78,19 @@ /* Check if we should enable the USB monitor before starting NSH */ -#if !defined(CONFIG_USBDEV_TRACE) || !defined(CONFIG_USBMONITOR) +#ifndef CONFIG_USBMONITOR +# undef HAVE_USBMONITOR +#endif + +#ifndef HAVE_USBDEV +# undef CONFIG_USBDEV_TRACE +#endif + +#ifndef HAVE_USBHOST +# undef CONFIG_USBHOST_TRACE +#endif + +#if !defined(CONFIG_USBDEV_TRACE) && !defined(CONFIG_USBHOST_TRACE) # undef HAVE_USBMONITOR #endif diff --git a/boards/arm/stm32l4/stm32l476vg-disco/src/stm32l476vg-disco.h b/boards/arm/stm32l4/stm32l476vg-disco/src/stm32l476vg-disco.h index 5463b60fed3..01b7763c7d9 100644 --- a/boards/arm/stm32l4/stm32l476vg-disco/src/stm32l476vg-disco.h +++ b/boards/arm/stm32l4/stm32l476vg-disco/src/stm32l476vg-disco.h @@ -135,14 +135,12 @@ #ifndef CONFIG_STM32L4_OTGFS # undef HAVE_USBDEV # undef HAVE_USBHOST -# undef HAVE_USBMONITOR #endif -/* Can't support USB device monitor if USB device is not enabled */ +/* Can't support USB device if USB device is not enabled */ #ifndef CONFIG_USBDEV # undef HAVE_USBDEV -# undef HAVE_USBMONITOR #endif /* Can't support USB host is USB host is not enabled */ @@ -153,7 +151,19 @@ /* Check if we should enable the USB monitor before starting NSH */ -#if !defined(CONFIG_USBDEV_TRACE) || !defined(CONFIG_SYSTEM_USBMONITOR) +#ifndef CONFIG_USBMONITOR +# undef HAVE_USBMONITOR +#endif + +#ifndef HAVE_USBDEV +# undef CONFIG_USBDEV_TRACE +#endif + +#ifndef HAVE_USBHOST +# undef CONFIG_USBHOST_TRACE +#endif + +#if !defined(CONFIG_USBDEV_TRACE) && !defined(CONFIG_USBHOST_TRACE) # undef HAVE_USBMONITOR #endif diff --git a/boards/arm/stm32l4/stm32l4r9ai-disco/src/stm32l4r9ai-disco.h b/boards/arm/stm32l4/stm32l4r9ai-disco/src/stm32l4r9ai-disco.h index 907bab79ada..a91f49e0ed1 100644 --- a/boards/arm/stm32l4/stm32l4r9ai-disco/src/stm32l4r9ai-disco.h +++ b/boards/arm/stm32l4/stm32l4r9ai-disco/src/stm32l4r9ai-disco.h @@ -86,14 +86,12 @@ #ifndef CONFIG_STM32L4_OTGFS # undef HAVE_USBDEV # undef HAVE_USBHOST -# undef HAVE_USBMONITOR #endif -/* Can't support USB device monitor if USB device is not enabled */ +/* Can't support USB device if USB device is not enabled */ #ifndef CONFIG_USBDEV # undef HAVE_USBDEV -# undef HAVE_USBMONITOR #endif /* Can't support USB host is USB host is not enabled */ @@ -104,7 +102,19 @@ /* Check if we should enable the USB monitor before starting NSH */ -#if !defined(CONFIG_USBDEV_TRACE) || !defined(CONFIG_SYSTEM_USBMONITOR) +#ifndef CONFIG_USBMONITOR +# undef HAVE_USBMONITOR +#endif + +#ifndef HAVE_USBDEV +# undef CONFIG_USBDEV_TRACE +#endif + +#ifndef HAVE_USBHOST +# undef CONFIG_USBHOST_TRACE +#endif + +#if !defined(CONFIG_USBDEV_TRACE) && !defined(CONFIG_USBHOST_TRACE) # undef HAVE_USBMONITOR #endif diff --git a/boards/mips/pic32mx/sure-pic32mx/src/pic32mx_appinit.c b/boards/mips/pic32mx/sure-pic32mx/src/pic32mx_appinit.c index 82c23b749d5..55c861632a3 100644 --- a/boards/mips/pic32mx/sure-pic32mx/src/pic32mx_appinit.c +++ b/boards/mips/pic32mx/sure-pic32mx/src/pic32mx_appinit.c @@ -130,15 +130,21 @@ /* USB Monitor */ -/* Can't support USB device monitor if USB device is not enabled */ +/* Check if we should enable the USB monitor before starting NSH */ -#ifndef CONFIG_USBDEV +#ifndef CONFIG_USBMONITOR # undef NSH_HAVE_USBMONITOR #endif -/* Check if we should enable the USB monitor before starting NSH */ +#ifndef NSH_HAVE_USBDEV +# undef CONFIG_USBDEV_TRACE +#endif -#if !defined(CONFIG_USBDEV_TRACE) || !defined(CONFIG_USBMONITOR) +#ifndef NSH_HAVE_USBHOST +# undef CONFIG_USBHOST_TRACE +#endif + +#if !defined(CONFIG_USBDEV_TRACE) && !defined(CONFIG_USBHOST_TRACE) # undef NSH_HAVE_USBMONITOR #endif