From 89ecbb7daa7132d8815e7b3507a011348ccd0518 Mon Sep 17 00:00:00 2001 From: Diego Ismirlian Date: Sun, 9 Jul 2017 18:36:07 -0300 Subject: USBH: Cleanup example for out-of-tree driver --- testhal/STM32/STM32F4xx/USB_HOST/halconf_community.h | 2 +- testhal/STM32/STM32F4xx/USB_HOST/usbh_custom_class_example.c | 3 +++ testhal/STM32/STM32F4xx/USB_HOST/usbh_custom_class_example.h | 5 +---- 3 files changed, 5 insertions(+), 5 deletions(-) (limited to 'testhal/STM32/STM32F4xx/USB_HOST') diff --git a/testhal/STM32/STM32F4xx/USB_HOST/halconf_community.h b/testhal/STM32/STM32F4xx/USB_HOST/halconf_community.h index da9c7f8..a13aa89 100644 --- a/testhal/STM32/STM32F4xx/USB_HOST/halconf_community.h +++ b/testhal/STM32/STM32F4xx/USB_HOST/halconf_community.h @@ -141,7 +141,7 @@ #define HAL_USBHHUB_MAX_INSTANCES 1 #define HAL_USBHHUB_MAX_PORTS 6 -#define HAL_USBH_USE_ADDITIONAL_CLASS_DRIVERS 1 +#define HAL_USBH_USE_ADDITIONAL_CLASS_DRIVERS TRUE /* debug */ #define USBH_DEBUG_ENABLE TRUE diff --git a/testhal/STM32/STM32F4xx/USB_HOST/usbh_custom_class_example.c b/testhal/STM32/STM32F4xx/USB_HOST/usbh_custom_class_example.c index 23d5559..d8c5bbe 100644 --- a/testhal/STM32/STM32F4xx/USB_HOST/usbh_custom_class_example.c +++ b/testhal/STM32/STM32F4xx/USB_HOST/usbh_custom_class_example.c @@ -16,6 +16,8 @@ */ #include "hal.h" + +#if HAL_USBH_USE_ADDITIONAL_CLASS_DRIVERS #include "usbh/internal.h" #include "usbh_custom_class_example.h" #include @@ -138,3 +140,4 @@ static void _init(void) { } } +#endif diff --git a/testhal/STM32/STM32F4xx/USB_HOST/usbh_custom_class_example.h b/testhal/STM32/STM32F4xx/USB_HOST/usbh_custom_class_example.h index b84f2b7..3f00fe7 100644 --- a/testhal/STM32/STM32F4xx/USB_HOST/usbh_custom_class_example.h +++ b/testhal/STM32/STM32F4xx/USB_HOST/usbh_custom_class_example.h @@ -20,8 +20,7 @@ #include "hal_usbh.h" -#if HAL_USE_USBH - +#if HAL_USE_USBH && HAL_USBH_USE_ADDITIONAL_CLASS_DRIVERS /*===========================================================================*/ /* Driver pre-compile time settings. */ @@ -72,8 +71,6 @@ extern "C" { #endif /* API goes here */ - /* global initializer */ - void usbhCustomInit(void); #ifdef __cplusplus } #endif -- cgit v1.2.3