From bd5eb5233cab2b66d0672c1b0d86a3b8b10574cd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20=C5=81yszczek?= Date: Wed, 17 Aug 2016 22:13:27 +0200 Subject: [PATCH] Added check to make sure USBDEV is not set with USBHOST --- configs/stm32butterfly2/src/stm32_butterfly2.h | 4 ++-- configs/stm32butterfly2/src/stm32_usbhost.c | 6 +++++- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/configs/stm32butterfly2/src/stm32_butterfly2.h b/configs/stm32butterfly2/src/stm32_butterfly2.h index 20d43a06dc..d1e498e8cd 100644 --- a/configs/stm32butterfly2/src/stm32_butterfly2.h +++ b/configs/stm32butterfly2/src/stm32_butterfly2.h @@ -32,8 +32,8 @@ * POSSIBILITY OF SUCH DAMAGE. ****************************************************************************/ -#ifndef __CONFIGS_STM32_BUTTERFLY2_SRC_STM32_BUTTERFLY2_H 1 -#define __CONFIGS_STM32_BUTTERFLY2_SRC_STM32_BUTTERFLY2_H +#ifndef __CONFIGS_STM32_BUTTERFLY2_SRC_STM32_BUTTERFLY2_H +#define __CONFIGS_STM32_BUTTERFLY2_SRC_STM32_BUTTERFLY2_H 1 /***************************************************************************** * Included Files diff --git a/configs/stm32butterfly2/src/stm32_usbhost.c b/configs/stm32butterfly2/src/stm32_usbhost.c index d7c7c13e81..dfb8d0c4eb 100644 --- a/configs/stm32butterfly2/src/stm32_usbhost.c +++ b/configs/stm32butterfly2/src/stm32_usbhost.c @@ -56,7 +56,11 @@ ****************************************************************************/ #ifndef CONFIG_STM32_OTGFS -#error "CONFIG_USBHOST requires CONFIG_STM32_OTGFS to be enabled" +# error "CONFIG_USBHOST requires CONFIG_STM32_OTGFS to be enabled" +#endif + +#ifdef CONFIG_USBDEV +# error "CONFIG_USBHOST cannot be set alongside CONFIG_USBDEV" #endif /*****************************************************************************